16 const char *recoInFile,
const char *assyInFile)
21 printf(
"EicRootManager is a singleton instance, do not try to initialize twice!\n");
34 if (recoInFile || assyInFile)
60 TClonesArray *PndPidChargedCand,
EicRcEvent **EicRcEventHack)
65 printf(
"EicRootManager is a singleton instance, do not try to initialize twice!\n");
95 branch->GetEntry(currentEntry);
104 const char *branchName,
void *addr)
106 if (!tfile)
return 0;
108 TBranch *branch = tfile->
SetupBranch(treeName, branchName, addr);
109 if (!branch)
return 0;
116 TTree *ttree = tfile->
GetTree(treeName);
157 mFptr =
new TFile(fileName);
159 if (!
mFptr->IsOpen()) {
160 printf(
"Failed to open input file '%s'!\n", fileName);
169 if (!
mFptr)
return 0;
171 TTree *tree = (TTree*)
mFptr->Get(treeName);
173 printf(
"Tree '%s' is missing in the input file '%s'!\n", treeName,
mFileName.Data());
177 TBranch *branch = tree->GetBranch(branchName);
179 if (!branch)
return 0;
181 tree->SetBranchAddress(branchName, addr);