/[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.73 by mocchiut, Fri Dec 12 14:24:04 2008 UTC revision 1.77 by mocchiut, Fri Feb 20 08:07:43 2009 UTC
# Line 740  Bool_t PamLevel2::IsGood(Bool_t strict){ Line 740  Bool_t PamLevel2::IsGood(Bool_t strict){
740      if(trig_obj && trig_obj->unpackError != 0) goodev = false;      if(trig_obj && trig_obj->unpackError != 0) goodev = false;
741      if(s4_obj && s4_obj->unpackError != 0) goodev = false;        if(s4_obj && s4_obj->unpackError != 0) goodev = false;  
742      if(nd_obj && nd_obj->unpackError != 0) goodev = false;        if(nd_obj && nd_obj->unpackError != 0) goodev = false;  
743      if(ac_obj && (ac_obj->unpackError != 0 || ((ac_obj->status[0]>>3)&1) || ((ac_obj->status[0]>>3)&1)) ) goodev = false;            if(ac_obj && (ac_obj->unpackError != 0 || ((ac_obj->status[0]>>2)&1) || ((ac_obj->status[1]>>2)&1)) ) goodev = false;      
744      //  if(orb_obj)        //  if(orb_obj)  
745    } else {    } else {
746      if(nd_obj && nd_obj->unpackError != 0) goodev = false;        if(nd_obj && nd_obj->unpackError != 0) goodev = false;  
747      if(ac_obj && (ac_obj->unpackError != 0 || ((ac_obj->status[0]>>3)&1) || ((ac_obj->status[0]>>3)&1)) ) goodev = false;            if(ac_obj && (ac_obj->unpackError != 0 || ((ac_obj->status[0]>>2)&1) || ((ac_obj->status[1]>>2)&1)) ) goodev = false;      
748    };    };
749    return(goodev);    return(goodev);
750  };  };
# Line 2637  Bool_t PamLevel2::UpdateRunInfo(Long64_t Line 2637  Bool_t PamLevel2::UpdateRunInfo(Long64_t
2637          if( !GetOrbitalInfo() )cout << "** WARNING ** missing OrbitalInfo ---> run info might be not correctly updated "<<endl;          if( !GetOrbitalInfo() )cout << "** WARNING ** missing OrbitalInfo ---> run info might be not correctly updated "<<endl;
2638          if ( gltsync ) delete gltsync; //Emiliano          if ( gltsync ) delete gltsync; //Emiliano
2639          if(!dbc || (dbc && !dbc->IsConnected()) )SetDBConnection(); //Emiliano          if(!dbc || (dbc && !dbc->IsConnected()) )SetDBConnection(); //Emiliano
2640          gltsync = new GL_TIMESYNC(GetRunInfo()->ID_ROOT_L0,"ID",dbc); //Emiliano          gltsync = new GL_TIMESYNC(GetRunInfo()->ID_ROOT_L0,"ID",dbc,false); //Emiliano // the "false" means not to use level0 file (not necessary here)
2641          if ( dbc ) dbc->Close();// Emiliano          if ( dbc ) dbc->Close();// Emiliano
2642      };            };      
2643      // ---------------------------------------------------------------      // ---------------------------------------------------------------
# Line 2780  Bool_t PamLevel2::UpdateRunInfo(Long64_t Line 2780  Bool_t PamLevel2::UpdateRunInfo(Long64_t
2780              irunt = irun - irunoffset[run_tree->GetTreeNumber()];              irunt = irun - irunoffset[run_tree->GetTreeNumber()];
2781              if ( gltsync ) delete gltsync; // Emiliano              if ( gltsync ) delete gltsync; // Emiliano
2782              if(!dbc || (dbc && !dbc->IsConnected()) )SetDBConnection(); //Emiliano              if(!dbc || (dbc && !dbc->IsConnected()) )SetDBConnection(); //Emiliano
2783              gltsync = new GL_TIMESYNC(GetRunInfo()->ID_ROOT_L0,"ID",dbc); // Emiliano              gltsync = new GL_TIMESYNC(GetRunInfo()->ID_ROOT_L0,"ID",dbc,false); // Emiliano
2784              if ( dbc ) dbc->Close(); // Emiliano              if ( dbc ) dbc->Close(); // Emiliano
2785              if(gltsync->DBobt(GetRunInfo()->RUNHEADER_OBT)>gltsync->DBobt(GetRunInfo()->RUNTRAILER_OBT) ){ // Emiliano              if(gltsync->DBobt(GetRunInfo()->RUNHEADER_OBT)>gltsync->DBobt(GetRunInfo()->RUNTRAILER_OBT) ){ // Emiliano
2786                  cout << "Bool_t PamLevel2::UpdateRunInfo(Long64_t iev) -- WARNING -- irun "<<irun<<"  has RUNHEADER_OBT>=RUNTRAILER_OBT " <<endl;                  cout << "Bool_t PamLevel2::UpdateRunInfo(Long64_t iev) -- WARNING -- irun "<<irun<<"  has RUNHEADER_OBT>=RUNTRAILER_OBT " <<endl;
# Line 3445  Bool_t  PamLevel2::CheckLevel2File(TStri Line 3445  Bool_t  PamLevel2::CheckLevel2File(TStri
3445              if(GP){              if(GP){
3446                  Int_t nevt = ((TTree*)f->Get("h20"))->GetEntries();                  Int_t nevt = ((TTree*)f->Get("h20"))->GetEntries();
3447                  if( nev && nevt!=nev){                  if( nev && nevt!=nev){
3448                      cout << "File: "<< f->GetName() <<" discarded ---- OrbitalInfo tree has "<<nevt<<" events instead of "<<nev<< endl;                      cout << "File: "<< f->GetName() <<" discarded ---- h20 tree has "<<nevt<<" events instead of "<<nev<< endl;
3449                      return false;                      return false;
3450                  }                  }
3451                  nev=nevt;                  nev=nevt;
# Line 3737  void PamLevel2::CreateCloneTrees(TFile * Line 3737  void PamLevel2::CreateCloneTrees(TFile *
3737      };      };
3738      // GPamela      // GPamela
3739      if(GP) {      if(GP) {
3740          pam_tree_clone[i] = new TTree("h20","PAMELA orbital info  ");            pam_tree_clone[i] = new TTree("h20","GPAMELA info ");  
3741          pam_tree_clone[i]->Branch("GPamela","GPamela", GetPointerTo("GPamela"),32000,1);//split          pam_tree_clone[i]->Branch("GPamela","GPamela", GetPointerTo("GPamela"),32000,1);//split
3742          cout << "OrbitalInfo  : branch OrbitalInfo"<<endl;          cout << "OrbitalInfo  : branch OrbitalInfo"<<endl;
3743          i++;          i++;
# Line 3833  Int_t PamLevel2::GetEntry(Long64_t iee){ Line 3833  Int_t PamLevel2::GetEntry(Long64_t iee){
3833      //-------------------------------      //-------------------------------
3834      ii = iee;      ii = iee;
3835      if( !pam_tree->GetEntry(ii) ){            if( !pam_tree->GetEntry(ii) ){      
3836          cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- error reading pam tree"<<endl;        cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- error reading pam tree"<<endl;
3837          return 0;        return 0;
3838      }      }
   
3839      //      //
3840      // ... that's way I put it here. Notice that nothing change in the code (is backward compatible) since in any case you return with 0.      // ... that's way I put it here. Notice that nothing change in the code (is backward compatible) since in any case you return with 0.
3841      // 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

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.77

  ViewVC Help
Powered by ViewVC 1.1.23