/[PAMELA software]/PamelaLevel2/src/PamLevel2.cpp
ViewVC logotype

Diff of /PamelaLevel2/src/PamLevel2.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.59 by pam-fi, Thu Feb 14 09:13:44 2008 UTC revision 1.60 by pam-fi, Tue Mar 11 13:48:40 2008 UTC
# Line 2286  TChain *PamLevel2::GetRunTree(TList *fl) Line 2286  TChain *PamLevel2::GetRunTree(TList *fl)
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        
# Line 2298  TChain *PamLevel2::GetRunTree(TList *fl) Line 2300  TChain *PamLevel2::GetRunTree(TList *fl)
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;
# Line 2342  TChain *PamLevel2::GetRunTree(TList *fl) Line 2345  TChain *PamLevel2::GetRunTree(TList *fl)
2345          delete R;          delete R;
2346          R=0;          R=0;
2347      }      }
2348        
2349    
2350      run_tree = R;      run_tree = R;
2351    
# Line 3419  Bool_t  PamLevel2::CheckLevel2File(TStri Line 3423  Bool_t  PamLevel2::CheckLevel2File(TStri
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){
# Line 3543  void PamLevel2::CreateCloneTrees(TFile * Line 3547  void PamLevel2::CreateCloneTrees(TFile *
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;
# Line 3764  Int_t PamLevel2::GetEntry(Long64_t iee){ Line 3769  Int_t PamLevel2::GetEntry(Long64_t iee){
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;

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.60

  ViewVC Help
Powered by ViewVC 1.1.23