/[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.20 by pam-fi, Fri Feb 16 15:00:35 2007 UTC revision 1.23 by mocchiut, Thu Mar 8 15:25:27 2007 UTC
# Line 969  TTree *PamLevel2::GetPamTree(TFile *f, T Line 969  TTree *PamLevel2::GetPamTree(TFile *f, T
969            
970      cout<<endl<<" Number of entries: "<<Trout->GetEntries()<<endl<<endl;      cout<<endl<<" Number of entries: "<<Trout->GetEntries()<<endl<<endl;
971            
972        pam_tree = (TChain*)Trout;
973    
974      return Trout;      return Trout;
975            
976  }  }
# Line 1497  TTree *PamLevel2::GetRunTree(TFile *f){ Line 1499  TTree *PamLevel2::GetRunTree(TFile *f){
1499          R->SetBranchAddress("SoftInfo", GetPointerTo("SoftInfo")); // Emiliano          R->SetBranchAddress("SoftInfo", GetPointerTo("SoftInfo")); // Emiliano
1500          cout << "Software    : set branch address SoftInfo"<<endl; // Emiliano          cout << "Software    : set branch address SoftInfo"<<endl; // Emiliano
1501      }      }
1502    
1503        run_tree = (TChain*)R;
1504    
1505      return R;      return R;
1506            
1507  }  }
# Line 2294  void PamLevel2::FillCloneTrees(){ Line 2299  void PamLevel2::FillCloneTrees(){
2299      }      }
2300      if(sel_tree_clone)sel_tree_clone->Fill();          if(sel_tree_clone)sel_tree_clone->Fill();    
2301  //    if( irunentry == 0 || run_tree_clone->GetEntries()==0 )run_tree_clone->Fill();  //    if( irunentry == 0 || run_tree_clone->GetEntries()==0 )run_tree_clone->Fill();
2302      Int_t nstoredruns = run_tree_clone->GetEntries();  //    Int_t nstoredruns = run_tree_clone->GetEntries();
2303      if( irun ==  nstoredruns )run_tree_clone->Fill();  //     if( irun ==  nstoredruns )run_tree_clone->Fill();
2304      else if( irun > nstoredruns || irun < nstoredruns-1){  //     else if( irun > nstoredruns || irun < nstoredruns-1){
2305          cout << " PamLevel2::FillCloneTrees() -- ERROR -- current run "<< irun <<" stored runs "<< nstoredruns <<endl;  //      cout << " PamLevel2::FillCloneTrees() -- ERROR -- current run "<< irun <<" stored runs "<< nstoredruns <<endl;
2306      }  //     }
2307    
2308  }  }
2309    
2310    
# Line 2346  void PamLevel2::WriteCloneTrees(){ Line 2352  void PamLevel2::WriteCloneTrees(){
2352  Int_t PamLevel2::GetEntry(Int_t iee){  Int_t PamLevel2::GetEntry(Int_t iee){
2353            
2354      if(!pam_tree){      if(!pam_tree){
2355          cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- level2 trees not loeaded"<<endl;          cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- level2 trees not loaded"<<endl;
         return 0;  
     }  
     if(!run_tree ){  
         cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- run tree not loeaded"<<endl;  
2356          return 0;          return 0;
2357      }      }
2358    
# Line 2359  Int_t PamLevel2::GetEntry(Int_t iee){ Line 2361  Int_t PamLevel2::GetEntry(Int_t iee){
2361      ii = iee;      ii = iee;
2362      if( !pam_tree->GetEntry(ii) ) return 0;      if( !pam_tree->GetEntry(ii) ) return 0;
2363      //-------------------------------      //-------------------------------
2364    
2365        if(!run_tree ){
2366            cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- run tree not loaded"<<endl;
2367            return 0;
2368        }
2369    
2370      ii = iee;      ii = iee;
2371      UpdateRunInfo(run_tree,ii);      Bool_t UPDATED = UpdateRunInfo(run_tree,ii);
2372      if(SELLI==0)irunentry = iee-runfirstentry;      if(SELLI==0)irunentry = iee-runfirstentry;
2373        if(UPDATED && run_tree_clone)run_tree_clone->Fill();
2374    
2375  //    cout << "PamLevel2::GetEntry("<<iee<<") "<<irun<<" "<<runfirstentry<<" "<<irunentry<<endl;  //    cout << "PamLevel2::GetEntry("<<iee<<") "<<irun<<" "<<runfirstentry<<" "<<irunentry<<endl;
2376    

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.23