| 2286 |
return run_tree; |
return run_tree; |
| 2287 |
}; |
}; |
| 2288 |
// |
// |
| 2289 |
|
|
| 2290 |
|
|
| 2291 |
TChain *R = new TChain("Run"); |
TChain *R = new TChain("Run"); |
| 2292 |
|
|
| 2293 |
// loop over files and create chains |
// loop over files and create chains |
| 2300 |
R->Add(name); |
R->Add(name); |
| 2301 |
}; |
}; |
| 2302 |
} |
} |
| 2303 |
|
|
| 2304 |
|
|
| 2305 |
if(R->GetNtrees()){ |
if(RUN && R->GetNtrees()){ |
| 2306 |
|
|
| 2307 |
R->SetBranchAddress("RunInfo", GetPointerTo("RunInfo")); |
R->SetBranchAddress("RunInfo", GetPointerTo("RunInfo")); |
| 2308 |
cout << "Run : set branch address RunInfo"<<endl; |
cout << "Run : set branch address RunInfo"<<endl; |
| 2345 |
delete R; |
delete R; |
| 2346 |
R=0; |
R=0; |
| 2347 |
} |
} |
| 2348 |
|
|
| 2349 |
|
|
| 2350 |
run_tree = R; |
run_tree = R; |
| 2351 |
|
|
| 3423 |
|
|
| 3424 |
|
|
| 3425 |
if(!RUN__ok) { |
if(!RUN__ok) { |
| 3426 |
cout << "File: "<< f->GetName() <<" *WARNING* ---- Missing RunInfo tree"<< endl; |
cout << "File: "<< f->GetName() <<" *WARNING* ---- Missing RunInfo tree (NB: RUN infos will not be updated)"<< endl; |
| 3427 |
// return false; |
RUN = false; |
| 3428 |
}; |
}; |
| 3429 |
|
|
| 3430 |
if(CAL1 && !CAL1__ok){ |
if(CAL1 && !CAL1__ok){ |
| 3547 |
|
|
| 3548 |
|
|
| 3549 |
// if the pointer is null, create a default file |
// if the pointer is null, create a default file |
| 3550 |
|
if(!run_tree)return; |
| 3551 |
|
|
| 3552 |
if(!ofile){ |
if(!ofile){ |
| 3553 |
cout << "void PamLevel2::CreateCloneTrees(TFile*) -- WARNING -- Creating file: clone-tree.root "<<endl; |
cout << "void PamLevel2::CreateCloneTrees(TFile*) -- WARNING -- Creating file: clone-tree.root "<<endl; |
| 3769 |
// in theory one would like to return 1 if run is not loaded but now I don't have the will to add that 2 lines of code and it is not |
// in theory one would like to return 1 if run is not loaded but now I don't have the will to add that 2 lines of code and it is not |
| 3770 |
// a problem if you don't check the return code of getentry. |
// a problem if you don't check the return code of getentry. |
| 3771 |
// |
// |
| 3772 |
if(!run_tree ){ |
if(!RUN || !run_tree ){ |
| 3773 |
if ( TRK0 || CAL0 || TOF0 || RUN ) { //forse cosi` va bene per tornare 1? |
if ( TRK0 || CAL0 || TOF0 || RUN ) { //forse cosi` va bene per tornare 1? |
| 3774 |
cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- run tree not loaded"<<endl; |
cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- run tree not loaded"<<endl; |
| 3775 |
return 0; |
return 0; |