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.23 by loizides, Thu Dec 11 15:53:26 2008 UTC vs.
Revision 1.26 by bendavid, Tue Feb 17 21:54:29 2009 UTC

# Line 32 | Line 32 | Analysis::Analysis(Bool_t useproof) :
32    fUseHLT(kTRUE),
33    fHierarchy(kTRUE),
34    fDoProxy(kTRUE),
35 +  fDoObjTableCleaning(kTRUE),
36    fState(kPristine),
37    fNFriends(0),
38    fList(new TList),
# Line 46 | Line 47 | Analysis::Analysis(Bool_t useproof) :
47    fTreeName(Names::gkEvtTreeName),
48    fCompLevel(2),
49    fProof(0),
50 <  fDoNEvents(TChain::kBigNumber)
50 >  fDoNEvents(TChain::kBigNumber),
51 >  fCacheSize(134217728)
52   {
53    // Default constructor.
54  
# Line 287 | Line 289 | void Analysis::FileInputFromEnv()
289        return;
290    }
291  
290
292    if (!files.IsNull()) { // add local files
293      Info("FileInputFromEnv", "Got from environment:\n"
294           "\n\tMIT_FILES=%s\n", files.Data());
# Line 309 | Line 310 | void Analysis::FileInputFromEnv()
310         catalog.Data(), book.Data(), dataset.Data(), filesets.Data());
311  
312    Catalog cat(catalog);
313 <  TString tok(";");
314 <  TObjArray *arr = filesets.Tokenize(tok);
315 <  if (arr) {
315 <    for (Int_t i=0; i<arr->GetEntries(); ++i) {
316 <      TObjString *fileset = dynamic_cast<TObjString*>(arr->At(i));
317 <      if (!fileset) continue;
318 <      Dataset *d = cat.FindDataset(book, dataset, fileset->String());
319 <      if (!d)
320 <        continue;
313 >  if (filesets.IsNull()) {
314 >    Dataset *d = cat.FindDataset(book, dataset);
315 >    if (d) {
316        AddDataset(d);
317        delete d;
318      }
319 <    delete arr;
319 >  } else {
320 >    TString tok(";");
321 >    TObjArray *arr = filesets.Tokenize(tok);
322 >    if (arr) {
323 >      for (Int_t i=0; i<arr->GetEntries(); ++i) {
324 >        TObjString *fileset = dynamic_cast<TObjString*>(arr->At(i));
325 >        if (!fileset) continue;
326 >        Dataset *d = cat.FindDataset(book, dataset, fileset->String());
327 >        if (!d)
328 >          continue;
329 >        AddDataset(d);
330 >        delete d;
331 >      }
332 >      delete arr;
333 >    }
334    }
335   }
336  
# Line 363 | Line 372 | Bool_t Analysis::Init()
372  
373    fChain = new TChain(fTreeName);
374    fSet   = new TDSet("TTree",fTreeName);
375 +  
376 +  fChain->SetCacheSize(fCacheSize);
377  
378    for (Int_t i=0; i<fNFriends; ++i) {
379  
# Line 439 | Line 450 | Bool_t Analysis::Init()
450      // when not running Proof, we must make a selector
451      fSelector = new Selector;
452      fSelector->SetDoProxy(fDoProxy);
453 +    fSelector->SetDoObjTableCleaning(fDoObjTableCleaning);
454  
455      fSelector->AddInput(anamod);
456  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines