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" |
34 |
|
fHierarchy(kTRUE), |
35 |
|
fDoProxy(kFALSE), |
36 |
|
fDoObjTabClean(kTRUE), |
37 |
+ |
fParallel(kFALSE), |
38 |
|
fState(kPristine), |
39 |
|
fNFriends(0), |
40 |
|
fList(new TList), |
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 |
|
|
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 |
|
|
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); |
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 |
|
|
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 |
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); |
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 |