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.30 by loizides, Mon Mar 23 08:31:30 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 49 | Line 51 | Analysis::Analysis(Bool_t useproof) :
51    fProof(0),
52    fDoNEvents(TChain::kBigNumber),
53    fSkipNEvents(0),
54 +  fPrintScale(1),
55    fCacheSize(-1)
56   {
57    // Default constructor.
# Line 191 | 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 386 | 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().BeginsWith("/castor/cern.ch"))
392 >        if (fCacheSize<0 && obj->GetString().Contains("/castor/"))
393            fCacheSize = 64*1024*1024;
394        }
395      } else {
# Line 397 | 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().BeginsWith("/castor/cern.ch"))
403 >        if (fCacheSize<0 && obj->GetString().Contains("/castor/"))
404            fCacheSize = 64*1024*1024;
405        }
406  
# Line 412 | Line 415 | Bool_t Analysis::Init()
415      }
416    }
417  
418 <  if (fCacheSize>=0)
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
# Line 423 | Line 429 | Bool_t Analysis::Init()
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