ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/TreeMod/src/Analysis.cc
(Generate patch)

Comparing UserCode/MitAna/TreeMod/src/Analysis.cc (file contents):
Revision 1.27 by loizides, Mon Mar 2 12:35:29 2009 UTC vs.
Revision 1.35 by loizides, Mon Jul 13 20:05:31 2009 UTC

# Line 11 | Line 11
11   #include <TProof.h>
12   #include <TROOT.h>
13   #include <TBrowser.h>
14 + #include <TTreeCacheUnzip.h>
15   #include "MitAna/DataUtil/interface/Debug.h"
16   #include "MitAna/DataTree/interface/Names.h"
17   #include "MitAna/TAM/interface/TAMVirtualLoader.h"
# Line 33 | Line 34 | Analysis::Analysis(Bool_t useproof) :
34    fHierarchy(kTRUE),
35    fDoProxy(kFALSE),
36    fDoObjTabClean(kTRUE),
37 +  fParallel(kFALSE),
38    fState(kPristine),
39    fNFriends(0),
40    fList(new TList),
# Line 45 | Line 47 | Analysis::Analysis(Bool_t useproof) :
47    fSet(0),
48    fDeleteList(new TList),
49    fTreeName(Names::gkEvtTreeName),
50 <  fCompLevel(2),
50 >  fCompLevel(7),
51    fProof(0),
52    fDoNEvents(TChain::kBigNumber),
53 <  fCacheSize(134217728)
53 >  fSkipNEvents(0),
54 >  fPrintScale(1),
55 >  fCacheSize(-1)
56   {
57    // Default constructor.
58  
# Line 190 | Line 194 | Bool_t Analysis::AddFiles(const char *pn
194    ifstream in;
195    in.open(pname);
196    if (!in) {
197 <    Error("AddFiles", "Can not open file with name %s", pname);
197 >    Error("AddFiles", "Cannot open file with name %s", pname);
198      return kFALSE;
199    }
200  
# Line 372 | Line 376 | Bool_t Analysis::Init()
376  
377    fChain = new TChain(fTreeName);
378    fSet   = new TDSet("TTree",fTreeName);
375  
376  fChain->SetCacheSize(fCacheSize);
379  
380    for (Int_t i=0; i<fNFriends; ++i) {
379
381      TList *l = dynamic_cast<TList*>(fList->At(i));
382      if (!l) {
383        Fatal("Init", "List %d not found!", i);
# Line 388 | Line 389 | Bool_t Analysis::Init()
389        while (TObjString *obj = dynamic_cast<TObjString*>(next())) {
390          fChain->Add(obj->GetName());
391          fSet->Add(obj->GetName());
392 +        if (fCacheSize<0 && obj->GetString().Contains("/castor/"))
393 +          fCacheSize = 64*1024*1024;
394        }
392
395      } else {
394
396        TChain *chain = new TChain(fTreeName);
397        TDSet *set    = new TDSet("TTree",fTreeName);
398  
# Line 399 | Line 400 | Bool_t Analysis::Init()
400        while (TObjString *obj = dynamic_cast<TObjString*>(next())) {
401          chain->Add(obj->GetName());
402          set->Add(obj->GetName());
403 +        if (fCacheSize<0 && obj->GetString().Contains("/castor/"))
404 +          fCacheSize = 64*1024*1024;
405        }
406  
407        TString alias("TAMTREE_"); // aliases currently not used
# Line 410 | Line 413 | Bool_t Analysis::Init()
413        fDeleteList->Add(chain);
414        fDeleteList->Add(set);
415      }
413
416    }
417  
418 +  if (fParallel)
419 +    TTreeCacheUnzip::SetParallelUnzip(TTreeCacheUnzip::kEnable);
420 +
421 +  if (fCacheSize>=0)
422 +    fChain->SetCacheSize(fCacheSize);
423 +
424    // create our customized loader plugin for TAM
425    TreeLoader *bl = new TreeLoader;
426    fLoaders->Add(bl);
# Line 420 | Line 428 | Bool_t Analysis::Init()
428  
429    // create our ana framework module
430    AnaFwkMod *anamod = new AnaFwkMod;
431 +  anamod->SetSkipNEvents(fSkipNEvents);
432 +  anamod->SetPrintScale(fPrintScale);
433    fDeleteList->Add(anamod);
434  
435    // create our HLT framework module

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines