/[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.75 by mocchiut, Tue Jan 27 11:37:39 2009 UTC revision 1.77 by mocchiut, Fri Feb 20 08:07:43 2009 UTC
# 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.75  
changed lines
  Added in v.1.77

  ViewVC Help
Powered by ViewVC 1.1.23