/[PAMELA software]/DarthVader/RunInfo/src/RunInfo.cpp
ViewVC logotype

Diff of /DarthVader/RunInfo/src/RunInfo.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by mocchiut, Thu Nov 9 14:44:08 2006 UTC revision 1.18 by mocchiut, Thu Sep 25 10:40:56 2008 UTC
# Line 22  using namespace std; Line 22  using namespace std;
22  //  //
23    
24  SoftInfo::SoftInfo() {  SoftInfo::SoftInfo() {
25    TRIG_ver = "";    Clear();
   TOF_ver = "";  
   AC_ver = "";  
   TRK_ver = "";  
   ORB_ver = "";  
   CAL_ver = "";  
   ND_ver = "";  
   S4_ver = "";    
   DV_ver = "";  
26  }  }
27    
28  void SoftInfo::Clear(){  void SoftInfo::Clear(Option_t *t){
29    TRIG_ver = "";    TRIG_ver = "";
30    TOF_ver = "";    TOF_ver = "";
31    AC_ver = "";    AC_ver = "";
# Line 209  void ItoRunInfo::CopyFromTo(GL_RUN *glru Line 201  void ItoRunInfo::CopyFromTo(GL_RUN *glru
201      newrun->TRK_CALIB_USED = glrun->TRK_CALIB_USED             ;      newrun->TRK_CALIB_USED = glrun->TRK_CALIB_USED             ;
202      newrun->CAL_DSP_MASK  = glrun->CAL_DSP_MASK               ;      newrun->CAL_DSP_MASK  = glrun->CAL_DSP_MASK               ;
203      newrun->BOOT_NUMBER  = glrun->BOOT_NUMBER                ;      newrun->BOOT_NUMBER  = glrun->BOOT_NUMBER                ;
204        newrun->PHYSENDRUN_MASK_S3S2S12  = glrun->PHYSENDRUN_MASK_S3S2S12                 ;
205        newrun->PHYSENDRUN_MASK_S11CRC  = glrun->PHYSENDRUN_MASK_S11CRC                 ;
206      newrun->VALIDATION  = glrun->VALIDATION                 ;      newrun->VALIDATION  = glrun->VALIDATION                 ;
207      //      //
208    };    };
# Line 336  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 330  Int_t ItoRunInfo::Update(UInt_t run, TSt
330      totnorun = 1;      totnorun = 1;
331      reprocessing = false;      reprocessing = false;
332      first_file_entry = 0;      first_file_entry = 0;
333      last_file_entry = (UInt_t)(EV_TO - EV_FROM);      if ( EV_TO >= EV_FROM ) last_file_entry = (UInt_t)(EV_TO - EV_FROM);
334      norun = 1;      norun = 1;
335      runlist->AddAt((Int_t)ID,0);      runlist->AddAt((Int_t)ID,0);
336      //      //
# Line 510  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 504  Int_t ItoRunInfo::Update(UInt_t run, TSt
504            };            };
505          };          };
506          //          //
507          last_file_entry = first_file_entry + (oldrun->EV_TO - oldrun->EV_FROM + 1);          if ( oldrun->EV_TO >= oldrun->EV_FROM ) last_file_entry = first_file_entry + (oldrun->EV_TO - oldrun->EV_FROM + 1);
508          //          //
509        } else {        } else {
510          if ( !found ) first_file_entry += (oldrun->EV_TO - oldrun->EV_FROM + 1);          if ( !found ) first_file_entry += (oldrun->EV_TO - oldrun->EV_FROM + 1);
# Line 587  Int_t ItoRunInfo::Read(UInt_t idRun){ Line 581  Int_t ItoRunInfo::Read(UInt_t idRun){
581          runlist->AddAt(newrun->ID,norun);          runlist->AddAt(newrun->ID,norun);
582          norun++;          norun++;
583        };        };
584        last_file_entry = first_file_entry + (newrun->EV_TO - newrun->EV_FROM + 1);        if ( newrun->EV_TO >= newrun->EV_FROM ) last_file_entry = first_file_entry + (newrun->EV_TO - newrun->EV_FROM + 1);
585      };      };
586    };    };
587    if ( debug ) printf("norun %i \n",(int)norun);    if ( debug ) printf("norun %i \n",(int)norun);
# Line 612  void ItoRunInfo::Close(){ Line 606  void ItoRunInfo::Close(){
606    if ( isreadonly ) newtree->Delete();    if ( isreadonly ) newtree->Delete();
607  }  }
608    
609  void ItoRunInfo::Clear(){  void ItoRunInfo::Clear(Option_t *t){
610    if ( newtree ) newtree->Delete();    if ( newtree ) newtree->Delete();
611  }  }
612    
# Line 670  Int_t ItoRunInfo::GetRunInfo(UInt_t run) Line 664  Int_t ItoRunInfo::GetRunInfo(UInt_t run)
664      if ( nwrun->ID == run || run == 0 ){      if ( nwrun->ID == run || run == 0 ){
665        CopyFromTo(nwrun,(GL_RUN*)this,nwver,version);        CopyFromTo(nwrun,(GL_RUN*)this,nwver,version);
666        found = true;        found = true;
667        last_file_entry = first_file_entry + (nwrun->EV_TO - nwrun->EV_FROM + 1);        if ( nwrun->EV_TO >= nwrun->EV_FROM ) last_file_entry = first_file_entry + (nwrun->EV_TO - nwrun->EV_FROM + 1);
668      };      };
669      if ( !found ) first_file_entry += (nwrun->EV_TO - nwrun->EV_FROM + 1);      if ( !found ) first_file_entry += (nwrun->EV_TO - nwrun->EV_FROM + 1);
670    };    };

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.23