/[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.9 by mocchiut, Tue Sep 5 13:21:10 2006 UTC revision 1.20 by mocchiut, Tue May 15 14:31:22 2012 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 = "";    
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 41  void SoftInfo::Clear(){ Line 34  void SoftInfo::Clear(){
34    CAL_ver = "";    CAL_ver = "";
35    ND_ver = "";    ND_ver = "";
36    S4_ver = "";      S4_ver = "";  
37      DV_ver = "";
38  }  }
39    
40    UInt_t SoftInfo::GetSWinfo(TString Detector){
41      TString sver;
42      UInt_t version = 0;
43      if ( !strcmp(Detector.Data(),"TRIG") ){
44        sver = TRIG_ver;
45      };
46      if ( !strcmp(Detector.Data(),"TOF") ){
47        sver = TOF_ver;
48      };
49      if ( !strcmp(Detector.Data(),"AC") ){
50        sver = AC_ver;
51      };
52      if ( !strcmp(Detector.Data(),"TRK") ){
53        sver = TRK_ver;
54      };
55      if ( !strcmp(Detector.Data(),"CALO") ){
56        sver = CAL_ver;
57      };
58      if ( !strcmp(Detector.Data(),"S4") ){
59        sver = S4_ver;
60      };
61      if ( !strcmp(Detector.Data(),"DV") ){
62        sver = DV_ver;
63      };
64      if ( !strcmp(Detector.Data(),"ND") ){
65        sver = ND_ver;
66      };
67      if ( !strcmp(Detector.Data(),"ORB") ){
68        sver = ORB_ver;
69      };
70      sver.ReplaceAll("v",1," ",1);
71      sver.ReplaceAll("r",1," ",1);
72      version = (UInt_t)sver.Atoi();
73      return(version);
74    };
75    
76  /**  /**
77   * Fills a struct cSoftInfo with values from a SoftInfo object (to put data into a F77 common).   * Fills a struct cSoftInfo with values from a SoftInfo object (to put data into a F77 common).
# Line 59  void SoftInfo::GetLevel2Struct(cSoftInfo Line 88  void SoftInfo::GetLevel2Struct(cSoftInfo
88  }  }
89  /***********************/  /***********************/
90    
91    ItoRunInfo::~ItoRunInfo() {
92      this->GL_RUN::Clear();
93    }
94    
95  ItoRunInfo::ItoRunInfo() {  ItoRunInfo::ItoRunInfo() {
96    reprocessing = false;    reprocessing = false;
97    updating = false;    updating = false;
# Line 72  ItoRunInfo::ItoRunInfo() { Line 105  ItoRunInfo::ItoRunInfo() {
105    norun = 0;    norun = 0;
106    runlist = new TArrayI(500);    runlist = new TArrayI(500);
107    file = NULL;    file = NULL;
108    newtree = new TTree();    newtree = NULL;//new TTree();
109  }  }
110    
111  ItoRunInfo::ItoRunInfo(TFile *processFl){  ItoRunInfo::ItoRunInfo(TFile *processFl){
# Line 89  ItoRunInfo::ItoRunInfo(TFile *processFl) Line 122  ItoRunInfo::ItoRunInfo(TFile *processFl)
122    last_file_entry = 0;    last_file_entry = 0;
123    file_entries = 0;    file_entries = 0;
124    version = new SoftInfo();    version = new SoftInfo();
125      //  glrun = new GL_RUN();
126    norun = 0;    norun = 0;
127    totnorun = 0;    totnorun = 0;
128    runlist = new TArrayI(500);    runlist = new TArrayI(500);
129      newtree = NULL;
130    //    //
131  }  }
132    
133    
134    
135  TChain *ItoRunInfo::LoadRunInfoTree(TList *fl){  TChain *ItoRunInfo::GetRunTree(TList *fl){
   //  
   TChain *Tout=0;  
136    //    //
137    TChain *RI = 0;          TChain *Tout = new TChain("Run");    
   TChain *SI = 0;        
   RI = new TChain("RunInfo");    
   SI = new TChain("SoftInfo");            
138    // loop over files and create chains      // loop over files and create chains  
139    TIter next(fl);    TIter next(fl);
140    TSystemFile *questo = 0;    TSystemFile *questo = 0;
141    while ( (questo = (TSystemFile*) next()) ) {    while ( (questo = (TSystemFile*) next()) ) {
142      TString name =  questo->GetName();      TString name =  questo->GetName();
143      RI->Add(name);      Tout->Add(name);
     SI->Add(name);  
144    };    };
145    //    //
146    RI->SetBranchAddress("RunInfo", GetPointerToRI());    Tout->SetBranchAddress("RunInfo", GetPointerToRI());
147    Tout = RI;    printf("Run          : set branch address RunInfo\n");
148    SI->SetBranchAddress("SoftInfo", GetPointerToSI());    Tout->SetBranchAddress("SoftInfo", GetPointerToSI());
149    Tout->AddFriend("SoftInfo");    printf("Software     : set branch address SoftInfo\n");
150    //    //
151    return Tout;                      return Tout;                  
152    //    //
# Line 145  void ItoRunInfo::CopyFromTo(GL_RUN *glru Line 174  void ItoRunInfo::CopyFromTo(GL_RUN *glru
174    //    //
175    if ( glrun && newrun ){    if ( glrun && newrun ){
176      //      //
177      //    printf("copy \n");      printf("copy \n");
178      //      //
179      newrun->ID = glrun->ID                         ;      newrun->ID = glrun->ID                         ;
180      newrun->ID_RUN_FRAG = glrun-> ID_RUN_FRAG                ;      newrun->ID_RUN_FRAG = glrun-> ID_RUN_FRAG                ;
# Line 177  void ItoRunInfo::CopyFromTo(GL_RUN *glru Line 206  void ItoRunInfo::CopyFromTo(GL_RUN *glru
206      newrun->TRK_CALIB_USED = glrun->TRK_CALIB_USED             ;      newrun->TRK_CALIB_USED = glrun->TRK_CALIB_USED             ;
207      newrun->CAL_DSP_MASK  = glrun->CAL_DSP_MASK               ;      newrun->CAL_DSP_MASK  = glrun->CAL_DSP_MASK               ;
208      newrun->BOOT_NUMBER  = glrun->BOOT_NUMBER                ;      newrun->BOOT_NUMBER  = glrun->BOOT_NUMBER                ;
209        newrun->PHYSENDRUN_MASK_S3S2S12  = glrun->PHYSENDRUN_MASK_S3S2S12                 ;
210        newrun->PHYSENDRUN_MASK_S11CRC  = glrun->PHYSENDRUN_MASK_S11CRC                 ;
211      newrun->VALIDATION  = glrun->VALIDATION                 ;      newrun->VALIDATION  = glrun->VALIDATION                 ;
212      //      //
213    };    };
# Line 190  void ItoRunInfo::CopyFromTo(GL_RUN *glru Line 221  void ItoRunInfo::CopyFromTo(GL_RUN *glru
221      newver->ORB_ver = sinfo->ORB_ver;      newver->ORB_ver = sinfo->ORB_ver;
222      newver->CAL_ver = sinfo->CAL_ver;      newver->CAL_ver = sinfo->CAL_ver;
223      newver->S4_ver = sinfo->S4_ver;      newver->S4_ver = sinfo->S4_ver;
224        newver->DV_ver = sinfo->DV_ver;
225      newver->ND_ver = sinfo->ND_ver;      newver->ND_ver = sinfo->ND_ver;
226      //      //
227    };    };
# Line 202  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 234  Int_t ItoRunInfo::Update(UInt_t run, TSt
234    //    //
235    Bool_t debug = true;    Bool_t debug = true;
236    //    //
237    Bool_t ismydir = false;    //  Bool_t ismydir = false;
238    //    //
239    if ( !strcmp(processFolder.Data(),"") ){    if ( !strcmp(processFolder.Data(),"") ){
240      processFolder = "runinfoFolder";      processFolder = "runinfoFolder";
241      ismydir = true;      //    ismydir = true;
242    };    };
243    //    //
244    GL_RUN *oldrun = new GL_RUN();    GL_RUN *oldrun = new GL_RUN();
# Line 239  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 271  Int_t ItoRunInfo::Update(UInt_t run, TSt
271      version->ORB_ver = Version;      version->ORB_ver = Version;
272      version->CAL_ver = Version;          version->CAL_ver = Version;    
273      version->S4_ver = Version;      version->S4_ver = Version;
274        version->DV_ver = Version;
275      version->ND_ver = Version;      version->ND_ver = Version;
276    } else {    } else {
277      if ( !strcmp(Detector.Data(),"TRIG") ) version->TRIG_ver = Version;      if ( !strcmp(Detector.Data(),"TRIG") ) version->TRIG_ver = Version;
# Line 247  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 280  Int_t ItoRunInfo::Update(UInt_t run, TSt
280      if ( !strcmp(Detector.Data(),"TRK") ) version->TRK_ver = Version;      if ( !strcmp(Detector.Data(),"TRK") ) version->TRK_ver = Version;
281      if ( !strcmp(Detector.Data(),"CALO") ) version->CAL_ver = Version;      if ( !strcmp(Detector.Data(),"CALO") ) version->CAL_ver = Version;
282      if ( !strcmp(Detector.Data(),"S4") ) version->S4_ver = Version;      if ( !strcmp(Detector.Data(),"S4") ) version->S4_ver = Version;
283        if ( !strcmp(Detector.Data(),"DV") ) version->DV_ver = Version;
284      if ( !strcmp(Detector.Data(),"ND") ) version->ND_ver = Version;      if ( !strcmp(Detector.Data(),"ND") ) version->ND_ver = Version;
285      if ( !strcmp(Detector.Data(),"ORB") ) version->ORB_ver = Version;      if ( !strcmp(Detector.Data(),"ORB") ) version->ORB_ver = Version;
286      if ( strcmp(Detector.Data(),"TRIG") && strcmp(Detector.Data(),"TOF") &&  strcmp(Detector.Data(),"AC") && strcmp(Detector.Data(),"TRK") &&  strcmp(Detector.Data(),"CALO") && strcmp(Detector.Data(),"S4") && strcmp(Detector.Data(),"ND") && strcmp(Detector.Data(),"ORB") ) return(-804);      if ( strcmp(Detector.Data(),"TRIG") && strcmp(Detector.Data(),"TOF") &&  strcmp(Detector.Data(),"AC") && strcmp(Detector.Data(),"TRK") &&  strcmp(Detector.Data(),"CALO") && strcmp(Detector.Data(),"S4") && strcmp(Detector.Data(),"ND") && strcmp(Detector.Data(),"ORB") && strcmp(Detector.Data(),"DV") ) return(-804);
287    };    };
288    //    //
289    if ( !oldtree ) {    if ( !oldtree ) {
# Line 301  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 335  Int_t ItoRunInfo::Update(UInt_t run, TSt
335      totnorun = 1;      totnorun = 1;
336      reprocessing = false;      reprocessing = false;
337      first_file_entry = 0;      first_file_entry = 0;
338      last_file_entry = (UInt_t)(EV_TO - EV_FROM);      if ( EV_TO >= EV_FROM ) last_file_entry = (UInt_t)(EV_TO - EV_FROM);
339      norun = 1;      norun = 1;
340      runlist->AddAt((Int_t)ID,0);      runlist->AddAt((Int_t)ID,0);
341      //      //
# Line 333  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 367  Int_t ItoRunInfo::Update(UInt_t run, TSt
367      //      //
368      for ( UInt_t run = 0; run < totnorun; run++){      for ( UInt_t run = 0; run < totnorun; run++){
369        //        //
370        oldtree->GetEntry(run);        if ( oldtree->GetEntry(run) <= 0 ) throw -36;
371        //        //
372        CopyFromTo(oldrun,newrun,oldver,newver);        CopyFromTo(oldrun,newrun,oldver,newver);
373        //        //
# Line 343  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 377  Int_t ItoRunInfo::Update(UInt_t run, TSt
377        //        //
378        if ( idRun == 0 || idRun == newrun->ID ) {        if ( idRun == 0 || idRun == newrun->ID ) {
379          //          //
380          if ( debug ) printf(" Updating run number %u \n",idRun);          if ( debug ) printf(" Updating run number %u newrun->ID %i \n",idRun,(int)newrun->ID);
381          //          //
382          found = true;          found = true;
383          //          //
# Line 373  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 407  Int_t ItoRunInfo::Update(UInt_t run, TSt
407              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
408              newver->CAL_ver = oldver->CAL_ver;              newver->CAL_ver = oldver->CAL_ver;
409              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
410                newver->DV_ver = oldver->DV_ver;
411              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
412              if ( strcmp(oldver->TRIG_ver.Data(),"") ) reprocessing = true;              if ( strcmp(oldver->TRIG_ver.Data(),"") ) reprocessing = true;
413            };            };
# Line 383  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 418  Int_t ItoRunInfo::Update(UInt_t run, TSt
418              newver->TRK_ver = oldver->TRK_ver;              newver->TRK_ver = oldver->TRK_ver;
419              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
420              newver->CAL_ver = oldver->CAL_ver;              newver->CAL_ver = oldver->CAL_ver;
421                newver->DV_ver = oldver->DV_ver;
422              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
423              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
424              if ( strcmp(oldver->TOF_ver.Data(),"") ) reprocessing = true;              if ( strcmp(oldver->TOF_ver.Data(),"") ) reprocessing = true;
# Line 393  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 429  Int_t ItoRunInfo::Update(UInt_t run, TSt
429              newver->TRK_ver = oldver->TRK_ver;              newver->TRK_ver = oldver->TRK_ver;
430              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
431              newver->CAL_ver = oldver->CAL_ver;              newver->CAL_ver = oldver->CAL_ver;
432                newver->DV_ver = oldver->DV_ver;
433              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
434              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
435              newver->AC_ver = version->AC_ver;              newver->AC_ver = version->AC_ver;
# Line 403  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 440  Int_t ItoRunInfo::Update(UInt_t run, TSt
440              newver->TOF_ver = oldver->TOF_ver;              newver->TOF_ver = oldver->TOF_ver;
441              newver->CAL_ver = oldver->CAL_ver;              newver->CAL_ver = oldver->CAL_ver;
442              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
443                newver->DV_ver = oldver->DV_ver;
444              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
445              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
446              newver->AC_ver = oldver->AC_ver;              newver->AC_ver = oldver->AC_ver;
# Line 414  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 452  Int_t ItoRunInfo::Update(UInt_t run, TSt
452              newver->TOF_ver = oldver->TOF_ver;              newver->TOF_ver = oldver->TOF_ver;
453              newver->CAL_ver = oldver->CAL_ver;              newver->CAL_ver = oldver->CAL_ver;
454              newver->TRK_ver = oldver->TRK_ver;              newver->TRK_ver = oldver->TRK_ver;
455                newver->DV_ver = oldver->DV_ver;
456              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
457              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
458              newver->AC_ver = oldver->AC_ver;              newver->AC_ver = oldver->AC_ver;
# Line 423  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 462  Int_t ItoRunInfo::Update(UInt_t run, TSt
462            if ( !strcmp(Detector.Data(),"CALO") ){            if ( !strcmp(Detector.Data(),"CALO") ){
463              newver->TRIG_ver = oldver->TRIG_ver;              newver->TRIG_ver = oldver->TRIG_ver;
464              newver->TOF_ver = oldver->TOF_ver;              newver->TOF_ver = oldver->TOF_ver;
465                newver->DV_ver = oldver->DV_ver;
466              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
467              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
468              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
# Line 439  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 479  Int_t ItoRunInfo::Update(UInt_t run, TSt
479              newver->TRK_ver = oldver->TRK_ver;              newver->TRK_ver = oldver->TRK_ver;
480              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
481              newver->CAL_ver = oldver->CAL_ver;              newver->CAL_ver = oldver->CAL_ver;
482                newver->DV_ver = oldver->DV_ver;
483              newver->S4_ver = version->S4_ver;              newver->S4_ver = version->S4_ver;
484              if ( strcmp(oldver->S4_ver.Data(),"") ) reprocessing = true;              if ( strcmp(oldver->S4_ver.Data(),"") ) reprocessing = true;
485            };            };
486              if ( !strcmp(Detector.Data(),"DV") ){
487                newver->TRIG_ver = oldver->TRIG_ver;
488                newver->TOF_ver = oldver->TOF_ver;
489                newver->ND_ver = oldver->ND_ver;
490                newver->AC_ver = oldver->AC_ver;
491                newver->TRK_ver = oldver->TRK_ver;
492                newver->ORB_ver = oldver->ORB_ver;
493                newver->CAL_ver = oldver->CAL_ver;
494                newver->S4_ver = oldver->S4_ver;
495                newver->DV_ver = version->DV_ver;
496                if ( strcmp(oldver->DV_ver.Data(),"") ) reprocessing = true;
497              };
498            if ( !strcmp(Detector.Data(),"ND") ){            if ( !strcmp(Detector.Data(),"ND") ){
499              newver->TRIG_ver = oldver->TRIG_ver;              newver->TRIG_ver = oldver->TRIG_ver;
500              newver->TOF_ver = oldver->TOF_ver;              newver->TOF_ver = oldver->TOF_ver;
501                newver->DV_ver = oldver->DV_ver;
502              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
503              newver->AC_ver = oldver->AC_ver;              newver->AC_ver = oldver->AC_ver;
504              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
# Line 455  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 509  Int_t ItoRunInfo::Update(UInt_t run, TSt
509            };            };
510          };          };
511          //          //
512          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);
513          //          //
514        } else {        } else {
515          if ( !found ) first_file_entry += (oldrun->EV_TO - oldrun->EV_FROM + 1);          if ( !found ) first_file_entry += (oldrun->EV_TO - oldrun->EV_FROM + 1);
516        };        };
517        //        //
518        file->cd();        file->cd();
519          if ( debug ) printf("filling: totnorun %i idRun %i newrun->ID %i \n",(int)totnorun,(int)idRun,(int)newrun->ID);
520        newtree->Fill();        newtree->Fill();
521        //        //
522      };      };
# Line 480  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 535  Int_t ItoRunInfo::Update(UInt_t run, TSt
535        return(-5);        return(-5);
536      };      };
537      //      //
538        this->Write();
539      //    newtree->Write();      //    newtree->Write();
540    };    };
541    //  if ( oldtree ) oldtree->Delete(); // crasha qua in queste righe e se non le metti...
542    //  if ( newver ) delete newver;
543    //  if ( newrun ) delete newrun;
544    //  if ( oldver ) delete oldver;
545    //  if ( oldrun ) delete oldrun;
546    return(0);    return(0);
547  }  }
548    
549    void ItoRunInfo::Write(){
550      file->cd();
551      newtree->Write("Run",TObject::kOverwrite);
552    }
553    
554  Int_t ItoRunInfo::Read(UInt_t idRun){  Int_t ItoRunInfo::Read(UInt_t idRun){
555    //    //
556    isreadonly = true;    isreadonly = true;
# Line 521  Int_t ItoRunInfo::Read(UInt_t idRun){ Line 587  Int_t ItoRunInfo::Read(UInt_t idRun){
587      //      //
588      for ( UInt_t run = 0; run < totnorun; run++){      for ( UInt_t run = 0; run < totnorun; run++){
589        //        //
590        newtree->GetEntry(run);        if ( newtree->GetEntry(run) <= 0 ) throw -36;
591        //        //
592        file_entries += (newrun->EV_TO - newrun->EV_FROM + 1);        file_entries += (newrun->EV_TO - newrun->EV_FROM + 1);
593        //        //
# Line 532  Int_t ItoRunInfo::Read(UInt_t idRun){ Line 598  Int_t ItoRunInfo::Read(UInt_t idRun){
598          runlist->AddAt(newrun->ID,norun);          runlist->AddAt(newrun->ID,norun);
599          norun++;          norun++;
600        };        };
601        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);
602      };      };
603    };    };
604    if ( debug ) printf("norun %i \n",(int)norun);    if ( debug ) printf("norun %i \n",(int)norun);
# Line 552  void ItoRunInfo::Close(){ Line 618  void ItoRunInfo::Close(){
618    file_entries = 0;    file_entries = 0;
619    norun = 0;    norun = 0;
620    delete runlist;    delete runlist;
621    file = new TFile();      //  file = new TFile();  
622    if ( isreadonly ) newtree->Delete();    file = 0;  
623      //  if ( isreadonly ) newtree->Delete();
624  }  }
625    
626  void ItoRunInfo::Clear(){  void ItoRunInfo::Clear(Option_t *t){
627    if ( newtree ) newtree->Delete();    if ( newtree ) newtree->Delete();
628  }  }
629    
# Line 609  Int_t ItoRunInfo::GetRunInfo(UInt_t run) Line 676  Int_t ItoRunInfo::GetRunInfo(UInt_t run)
676    totnorun = newtree->GetEntries();    totnorun = newtree->GetEntries();
677    //    //
678    for ( UInt_t nrun = 0; nrun < totnorun; nrun++){      for ( UInt_t nrun = 0; nrun < totnorun; nrun++){  
679      newtree->GetEntry(nrun);      if ( newtree->GetEntry(nrun) <= 0 ) throw -36;
680      //      //
681      if ( nwrun->ID == run || run == 0 ){      if ( nwrun->ID == run || run == 0 ){
682        CopyFromTo(nwrun,(GL_RUN*)this,nwver,version);        CopyFromTo(nwrun,(GL_RUN*)this,nwver,version);
683        found = true;        found = true;
684        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);
685      };      };
686      if ( !found ) first_file_entry += (nwrun->EV_TO - nwrun->EV_FROM + 1);      if ( !found ) first_file_entry += (nwrun->EV_TO - nwrun->EV_FROM + 1);
687    };    };

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.23