/[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.58 by pam-fi, Tue Nov 27 19:34:08 2007 UTC revision 1.59 by pam-fi, Thu Feb 14 09:13:44 2008 UTC
# Line 492  void PamLevel2::Initialize(){ Line 492  void PamLevel2::Initialize(){
492    
493      ISGP = false;      ISGP = false;
494    
495        DBG = false;
496    
497      tsorted=0;      tsorted=0;
498      timage=0;      timage=0;
499            
# Line 2169  void PamLevel2::SetBranchAddress(TTree * Line 2171  void PamLevel2::SetBranchAddress(TTree *
2171  //      GetPointerTo("GPamela");  //      GetPointerTo("GPamela");
2172          if(!gp_obj)gp_obj = new GPamela();          if(!gp_obj)gp_obj = new GPamela();
2173          gp_obj->SetBranchAddress(t); //ho dovuto fare in maniera diversa dagli altri          gp_obj->SetBranchAddress(t); //ho dovuto fare in maniera diversa dagli altri
2174    //      t->SetBranchAddress("GPamela", GetPointerTo("GPamela"));
2175          cout << "h20          : set branch address GPamela "<<endl;          cout << "h20          : set branch address GPamela "<<endl;
2176      };      };
2177            
# Line 2304  TChain *PamLevel2::GetRunTree(TList *fl) Line 2307  TChain *PamLevel2::GetRunTree(TList *fl)
2307          cout << "Software    : set branch address SoftInfo"<<endl; // Emiliano          cout << "Software    : set branch address SoftInfo"<<endl; // Emiliano
2308    
2309          irunoffset = new int[R->GetNtrees()];          irunoffset = new int[R->GetNtrees()];
2310          cout << "----------------------------------------------------"<<endl;          if(DBG){
2311          cout << "irun\t | ";              cout << "----------------------------------------------------"<<endl;
2312          cout << "tree\t |";              cout << "irun\t | ";
2313                cout << "tree\t |";
2314  //      cout << "offset\t |";  //      cout << "offset\t |";
2315          cout << "RUN\t";              cout << "RUN\t";
2316          cout << "FRAG\t";              cout << "FRAG\t";
2317          cout << "NEVENTS\t";              cout << "NEVENTS\t";
2318          cout << "absolute time\t\t\t";              cout << "absolute time\t\t\t";
2319          cout << "on-board time";              cout << "on-board time";
2320          cout<<endl;              cout<<endl;
2321            }
2322          for (Int_t ii=0; ii<R->GetEntries(); ii++){          for (Int_t ii=0; ii<R->GetEntries(); ii++){
2323              R->GetEntry(ii);              R->GetEntry(ii);
2324              cout << ii<< "\t | ";              if(DBG){
2325              cout << R->GetTreeNumber()<< "\t |";                  cout << ii<< "\t | ";
2326                    cout << R->GetTreeNumber()<< "\t |";
2327  //          cout << R->GetChainOffset()<< "\t |";  //          cout << R->GetChainOffset()<< "\t |";
2328              cout <<GetRunInfo()->ID<<"\t";                  cout <<GetRunInfo()->ID<<"\t";
2329              cout <<GetRunInfo()->ID_RUN_FRAG<<"\t";                  cout <<GetRunInfo()->ID_RUN_FRAG<<"\t";
2330              cout <<GetRunInfo()->NEVENTS<< "\t";                  cout <<GetRunInfo()->NEVENTS<< "\t";
2331              cout <<GetRunInfo()->RUNHEADER_TIME<<" <---> "<<GetRunInfo()->RUNTRAILER_TIME <<"\t";                  cout <<GetRunInfo()->RUNHEADER_TIME<<" <---> "<<GetRunInfo()->RUNTRAILER_TIME <<"\t";
2332              cout <<GetRunInfo()->RUNHEADER_OBT<<" <---> "<<GetRunInfo()->RUNTRAILER_OBT<<"\t";                  cout <<GetRunInfo()->RUNHEADER_OBT<<" <---> "<<GetRunInfo()->RUNTRAILER_OBT<<"\t";
2333              cout <<endl;                  cout <<endl;
2334                }
2335              irunoffset[R->GetTreeNumber()]=R->GetChainOffset();              irunoffset[R->GetTreeNumber()]=R->GetChainOffset();
2336          }          }
2337            cout << "N.run = "<<R->GetEntries()<<endl;
2338          cout << "----------------------------------------------------"<<endl;          cout << "----------------------------------------------------"<<endl;
2339    
2340    
   
2341      }else{      }else{
2342          delete R;          delete R;
2343          R=0;          R=0;
# Line 2784  Bool_t PamLevel2::UpdateRunInfo(Long64_t Line 2791  Bool_t PamLevel2::UpdateRunInfo(Long64_t
2791                      )                      )
2792  //              && irun < run_tree->GetEntries()  //              && irun < run_tree->GetEntries()
2793                  ){                  ){
2794                  cout << " (test) ";  
2795                  cout << " tree "<<sel_tree->GetTreeNumber();                  if(DBG){
2796                  cout << " irunt "<<irunt;                      cout << " (test) ";
2797                  cout << " offset "<<irunoffset[sel_tree->GetTreeNumber()];                      cout << " tree "<<sel_tree->GetTreeNumber();
2798                  cout << " abs "<<abstime;                      cout << " irunt "<<irunt;
2799                  cout <<" >> "<<GetRunInfo()->RUNHEADER_TIME<<" "<<GetRunInfo()->RUNTRAILER_TIME;                      cout << " offset "<<irunoffset[sel_tree->GetTreeNumber()];
2800                  cout << " obt "<<obt;                      cout << " abs "<<abstime;
2801                  cout <<" >> "<<GetRunInfo()->RUNHEADER_OBT<<" "<<GetRunInfo()->RUNTRAILER_OBT;                      cout <<" >> "<<GetRunInfo()->RUNHEADER_TIME<<" "<<GetRunInfo()->RUNTRAILER_TIME;
2802                  cout << " *** JUMP RUN *** irun "<<irun;                      cout << " obt "<<obt;
2803                        cout <<" >> "<<GetRunInfo()->RUNHEADER_OBT<<" "<<GetRunInfo()->RUNTRAILER_OBT;
2804                        cout << " *** JUMP RUN *** irun "<<irun;
2805  //              if(!SECONDO_GIRO)cout << " (don't worry)";  //              if(!SECONDO_GIRO)cout << " (don't worry)";
2806  //              else             cout << " (start worring...)";  //              else             cout << " (start worring...)";
2807                  cout << endl;                      cout << endl;
2808                    }
2809  //              irun++;  //              irun++;
2810                  irunoffset[sel_tree->GetTreeNumber()]++;                  irunoffset[sel_tree->GetTreeNumber()]++;
2811                  irun = irunt + irunoffset[sel_tree->GetTreeNumber()];//NEWNEW                            irun = irunt + irunoffset[sel_tree->GetTreeNumber()];//NEWNEW          
# Line 2814  Bool_t PamLevel2::UpdateRunInfo(Long64_t Line 2824  Bool_t PamLevel2::UpdateRunInfo(Long64_t
2824                  run_tree->GetEntry(irun);                  run_tree->GetEntry(irun);
2825              }              }
2826    
2827              cout << " (test) ";  
2828              cout << " tree "<<sel_tree->GetTreeNumber();              if(DBG){
2829              cout << " irunt "<<irunt;                  cout << " (test) ";
2830              cout << " offset "<<irunoffset[sel_tree->GetTreeNumber()];                  cout << " tree "<<sel_tree->GetTreeNumber();
2831              cout << " abs "<<abstime;                  cout << " irunt "<<irunt;
2832              cout <<" >> "<<GetRunInfo()->RUNHEADER_TIME<<" "<<GetRunInfo()->RUNTRAILER_TIME;                  cout << " offset "<<irunoffset[sel_tree->GetTreeNumber()];
2833              cout << " obt "<<obt;                  cout << " abs "<<abstime;
2834              cout <<" >> "<<GetRunInfo()->RUNHEADER_OBT<<" "<<GetRunInfo()->RUNTRAILER_OBT;                  cout <<" >> "<<GetRunInfo()->RUNHEADER_TIME<<" "<<GetRunInfo()->RUNTRAILER_TIME;
2835              cout << endl;                  cout << " obt "<<obt;
2836              cout << endl << " ))))) UPDATE RUN INFO (((((  @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl;                  cout <<" >> "<<GetRunInfo()->RUNHEADER_OBT<<" "<<GetRunInfo()->RUNTRAILER_OBT;
2837                }
2838              cout << endl;              cout << endl;
2839                cout << endl << " ))))) UPDATE RUN INFO (((((  @iev "<<iev<<" run "<<GetRunInfo()->ID<<" (run-entry "<<irun<<")"<<endl;
2840    //          cout << endl;
2841              prevshift = 0;              prevshift = 0;
2842              return true;              return true;
2843          }          }
# Line 3031  void  PamLevel2::GetWhichTrees(TFile* f) Line 3044  void  PamLevel2::GetWhichTrees(TFile* f)
3044            
3045      RUN    = false;      RUN    = false;
3046                    
3047      cout << "Checking file: "<<f->GetName()<<endl;  //    cout << "Checking file: "<<f->GetName()<<endl;
3048      if( !f || f->IsZombie() ){      if( !f || f->IsZombie() ){
3049          cout << "File: "<< f->GetName() <<" Non valid root file"<< endl;          cout << "File: "<< f->GetName() <<" Non valid root file"<< endl;
3050          return;          return;

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

  ViewVC Help
Powered by ViewVC 1.1.23