/[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.33 by pam-fi, Wed Mar 21 09:07:32 2007 UTC revision 1.34 by pam-fi, Wed Mar 21 10:49:43 2007 UTC
# Line 1524  Bool_t PamLevel2::UpdateRunInfo(TChain * Line 1524  Bool_t PamLevel2::UpdateRunInfo(TChain *
1524    //    //
1525    // check if we have already called once GetEntry, if not call it    // check if we have already called once GetEntry, if not call it
1526    //    //
1527    if ( run->GetEntries() <= 0 ) return(false);      if(!run){
1528              cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, ULong64_t iev) -- ERROR -- missing RunInfo tree "<<endl;
1529              return(false);        
1530        }
1531        if ( run->GetEntries() <= 0 ) return(false);
1532    //    //
1533        
1534  //  Int_t oldrun = irun;  //  Int_t oldrun = irun;
# Line 1596  Bool_t PamLevel2::UpdateRunInfo(TChain * Line 1600  Bool_t PamLevel2::UpdateRunInfo(TChain *
1600        //        //
1601        prevshift = 0;        prevshift = 0;
1602        cout << " ))))) UPDATE RUN INFO (((((  @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl;        cout << " ))))) UPDATE RUN INFO (((((  @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl;
1603        cout << "runfirstentry "<<runfirstentry<<endl;  //      cout << "runfirstentry "<<runfirstentry<<endl;
1604        return(true);            return(true);    
1605    };    };
1606    // ----------------------------------------------------    // ----------------------------------------------------
# Line 1605  Bool_t PamLevel2::UpdateRunInfo(TChain * Line 1609  Bool_t PamLevel2::UpdateRunInfo(TChain *
1609    // ----------------------------------------------------    // ----------------------------------------------------
1610    if(SELLI==1){          if(SELLI==1){      
1611        sel_tree->GetEntry(iev);        sel_tree->GetEntry(iev);
1612    //      cout << irun << " "<< irunentry << endl;
1613        if(irun != oldrun){        if(irun != oldrun){
1614            run->GetEntry(irun);            run->GetEntry(irun);
1615            cout << " ))))) UPDATE RUN INFO (((((  @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl;            cout << " ))))) UPDATE RUN INFO (((((  @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl;
# Line 2338  void PamLevel2::CreateCloneTrees(TFile * Line 2343  void PamLevel2::CreateCloneTrees(TFile *
2343    
2344    
2345      sel_tree_clone = new TTree("SelectionList","List of selected events ");      sel_tree_clone = new TTree("SelectionList","List of selected events ");
2346      sel_tree_clone->Branch("RunEntry",&irun,"runentry/I");      sel_tree_clone->Branch("RunEntry",&irun,"runentry/L");
2347      sel_tree_clone->Branch("EventEntry",&irunentry,"eventry/I");      sel_tree_clone->Branch("EventEntry",&irunentry,"eventry/L");
2348            
2349    
2350      Int_t i=0;      Int_t i=0;
# Line 2546  TTree* PamLevel2::GetYodaTree( ){ Line 2551  TTree* PamLevel2::GetYodaTree( ){
2551      // check if iroot has changed      // check if iroot has changed
2552      //===================================      //===================================
2553      if( irun<0 ){      if( irun<0 ){
2554          cout << "PamLevel2::GetYodaTree() -- ERROR "<<endl;          cout << "PamLevel2::GetYodaTree() -- ERROR -- irun = "<<irun<<endl;
2555          cout << "In order to use this method you have to load the RunInfo tree "<<endl;  //      cout << "In order to use this method you have to first load the RunInfo tree "<<endl;
         cout << "with the method TChain* PamLevel2::GetRunTree(TString, TString)"<<endl;  
 //      cout << " - read the event with PamLevel2::GetEntry(Int_t)"<<endl;  
2556          return NULL;          return NULL;
2557      }          }    
2558      Int_t irootnew = run_obj->ID_ROOT_L0;      Int_t irootnew = run_obj->ID_ROOT_L0;
# Line 2679  Int_t PamLevel2::GetYodaEntry(){ Line 2682  Int_t PamLevel2::GetYodaEntry(){
2682          cout << "Int_t PamLevel2::GetYodaEntry() -- ERROR -- missing OrbitalInfo "<<endl;          cout << "Int_t PamLevel2::GetYodaEntry() -- ERROR -- missing OrbitalInfo "<<endl;
2683          return 0;          return 0;
2684      }      }
2685        if( GetOrbitalInfo()->OBT==0 && GetOrbitalInfo()->pkt_num==0 ){
2686            cout << "Int_t PamLevel2::GetYodaEntry() -- ERROR -- level2 event corrupted ?? "<<endl;
2687            return 0;
2688        }
2689    
2690      // ---------------------------------------------------------------------      // ---------------------------------------------------------------------
2691      // ATTENTION!!!      // ATTENTION!!!
# Line 2704  Int_t PamLevel2::GetYodaEntry(){ Line 2711  Int_t PamLevel2::GetYodaEntry(){
2711              cout << "Int_t PamLevel2::GetYodaEntry() -- ERROR -- missing EventHeader "<<endl;              cout << "Int_t PamLevel2::GetYodaEntry() -- ERROR -- missing EventHeader "<<endl;
2712              return 0;              return 0;
2713          }          }
2714          cout << "PKTNUM "<<shift<<" ==  L2 --- "<< GetOrbitalInfo()->pkt_num << " --- L0 --- "<< GetEventHeader()->GetPscuHeader()->GetCounter()<<endl;  //      cout << "PKTNUM "<<shift<<" ==  L2 --- "<< GetOrbitalInfo()->pkt_num << " --- L0 --- "<< GetEventHeader()->GetPscuHeader()->GetCounter()<<endl;
2715  //      cout << " L2 --- "<< GetOrbitalInfo()->OBT << " --- L0 --- "<< GetEventHeader()->GetPscuHeader()->GetOrbitalTime()<<endl;  //      cout << " L2 --- "<< GetOrbitalInfo()->OBT << " --- L0 --- "<< GetEventHeader()->GetPscuHeader()->GetOrbitalTime()<<endl;
2716  //      if( (quellagiusta+shift) == l0_tree->GetEntries()+1 )cout << ">>> end of level0 tree <<<"<<endl;  //      if( (quellagiusta+shift) == l0_tree->GetEntries()+1 )cout << ">>> end of level0 tree <<<"<<endl;
2717  //      cout << " GetOrbitalInfo()->OBT "<< GetOrbitalInfo()->OBT << endl;  //      cout << " GetOrbitalInfo()->OBT "<< GetOrbitalInfo()->OBT << endl;

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

  ViewVC Help
Powered by ViewVC 1.1.23