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.33 by loizides, Fri Jun 19 07:39:01 2009 UTC

# Line 45 | Line 45 | Analysis::Analysis(Bool_t useproof) :
45    fSet(0),
46    fDeleteList(new TList),
47    fTreeName(Names::gkEvtTreeName),
48 <  fCompLevel(2),
48 >  fCompLevel(7),
49    fProof(0),
50    fDoNEvents(TChain::kBigNumber),
51 <  fCacheSize(134217728)
51 >  fSkipNEvents(0),
52 >  fPrintScale(100),
53 >  fCacheSize(-1)
54   {
55    // Default constructor.
56  
# Line 190 | Line 192 | Bool_t Analysis::AddFiles(const char *pn
192    ifstream in;
193    in.open(pname);
194    if (!in) {
195 <    Error("AddFiles", "Can not open file with name %s", pname);
195 >    Error("AddFiles", "Cannot open file with name %s", pname);
196      return kFALSE;
197    }
198  
# Line 372 | Line 374 | Bool_t Analysis::Init()
374  
375    fChain = new TChain(fTreeName);
376    fSet   = new TDSet("TTree",fTreeName);
375  
376  fChain->SetCacheSize(fCacheSize);
377  
378    for (Int_t i=0; i<fNFriends; ++i) {
379
379      TList *l = dynamic_cast<TList*>(fList->At(i));
380      if (!l) {
381        Fatal("Init", "List %d not found!", i);
# Line 388 | Line 387 | Bool_t Analysis::Init()
387        while (TObjString *obj = dynamic_cast<TObjString*>(next())) {
388          fChain->Add(obj->GetName());
389          fSet->Add(obj->GetName());
390 +        if (fCacheSize<0 && obj->GetString().Contains("/castor/"))
391 +          fCacheSize = 64*1024*1024;
392        }
392
393      } else {
394
394        TChain *chain = new TChain(fTreeName);
395        TDSet *set    = new TDSet("TTree",fTreeName);
396  
# Line 399 | Line 398 | Bool_t Analysis::Init()
398        while (TObjString *obj = dynamic_cast<TObjString*>(next())) {
399          chain->Add(obj->GetName());
400          set->Add(obj->GetName());
401 +        if (fCacheSize<0 && obj->GetString().Contains("/castor/"))
402 +          fCacheSize = 64*1024*1024;
403        }
404  
405        TString alias("TAMTREE_"); // aliases currently not used
# Line 410 | Line 411 | Bool_t Analysis::Init()
411        fDeleteList->Add(chain);
412        fDeleteList->Add(set);
413      }
413
414    }
415  
416 +  if (fCacheSize>=0)
417 +    fChain->SetCacheSize(fCacheSize);
418 +
419    // create our customized loader plugin for TAM
420    TreeLoader *bl = new TreeLoader;
421    fLoaders->Add(bl);
# Line 420 | Line 423 | Bool_t Analysis::Init()
423  
424    // create our ana framework module
425    AnaFwkMod *anamod = new AnaFwkMod;
426 +  anamod->SetSkipNEvents(fSkipNEvents);
427 +  anamod->SetPrintScale(fPrintScale);
428    fDeleteList->Add(anamod);
429  
430    // create our HLT framework module

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines