/[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.3 by mocchiut, Fri Jun 30 09:21:59 2006 UTC revision 1.6 by pam-fi, Fri Jul 21 11:00:13 2006 UTC
# Line 30  SoftInfo::SoftInfo() { Line 30  SoftInfo::SoftInfo() {
30    S4_ver = "";      S4_ver = "";  
31  }  }
32    
33    /**
34     * Fills a struct cSoftInfo with values from a SoftInfo object (to put data into a F77 common).
35     */
36    void SoftInfo::GetLevel2Struct(cSoftInfo *l2) const{
37      l2->FillTrigWith(TRIG_ver);
38      l2->FillTofWith(TOF_ver);
39      l2->FillAcWith(AC_ver);
40      l2->FillTrkWith(TRK_ver);
41      l2->FillOrbWith(ORB_ver);
42      l2->FillCalWith(CAL_ver);
43      l2->FillNdWith(ND_ver);
44      l2->FillS4With(S4_ver);
45    }
46    /***********************/
47    
48  ItoRunInfo::ItoRunInfo() {  ItoRunInfo::ItoRunInfo() {
49    reprocessing = false;    reprocessing = false;
50    updating = false;    updating = false;
# Line 77  ItoRunInfo::ItoRunInfo(TFile *processFl) Line 92  ItoRunInfo::ItoRunInfo(TFile *processFl)
92    version->S4_ver = "";      version->S4_ver = "";  
93    norun = 0;    norun = 0;
94    totnorun = 0;    totnorun = 0;
95      //  runlist = new TArrayL(0,NULL);
96    //    //
97  }  }
98    
# Line 102  ItoRunInfo::ItoRunInfo(TSQLServer *db, T Line 118  ItoRunInfo::ItoRunInfo(TSQLServer *db, T
118    version->S4_ver = "";      version->S4_ver = "";  
119    norun = 0;    norun = 0;
120    totnorun = 0;    totnorun = 0;
121      runlist = new TArrayL(0,NULL);
122    //    //
123  }  }
124    
# Line 150  Int_t ItoRunInfo::Update(ULong64_t run, Line 167  Int_t ItoRunInfo::Update(ULong64_t run,
167    //    //
168    norun = 0;    norun = 0;
169    runlist = new TArrayL(0,NULL);    runlist = new TArrayL(0,NULL);
170      //runlist->Reset();
171    //    //
172    Bool_t found = false;    Bool_t found = false;
173    Int_t error = 0;    Int_t error = 0;
# Line 612  void ItoRunInfo::Clear(){ Line 630  void ItoRunInfo::Clear(){
630    
631  UInt_t ItoRunInfo::GetRunForEntry(UInt_t entry){  UInt_t ItoRunInfo::GetRunForEntry(UInt_t entry){
632    //    //
633    ItoRunInfo *run = new ItoRunInfo();    UInt_t startfrom = 0;
634      //
635      if ( entry >= (UInt_t)first_file_entry && entry <= (UInt_t)last_file_entry ) return(ID);
636    //    //
637    for ( UInt_t nrun = 0; nrun < norun; nrun++){      if ( entry > (UInt_t)last_file_entry ){
638      run->GetRunInfo((ULong64_t)nrun);      for ( UInt_t nrun = 0; nrun < norun; nrun++){  
639      if ( entry >= (UInt_t)run->first_file_entry && entry <= (UInt_t)run->last_file_entry ){        if ( ID == (ULong64_t)runlist->At(nrun) ) {
640        run->newtree->Delete();          startfrom = nrun+1;
641        delete run;          break;
642        return(nrun);        };
643      };      };
644      } else {
645        startfrom = 0;
646    };    };
647    run->newtree->Delete();    //
648    delete run;    if ( startfrom >= norun ) startfrom = 0;
649      //
650     retry:
651      //
652      for ( UInt_t nrun = startfrom; nrun < norun; nrun++){  
653        GetRunInfo((ULong64_t)runlist->At(nrun));
654        if ( entry >= (UInt_t)first_file_entry && entry <= (UInt_t)last_file_entry ){
655          return((UInt_t)runlist->At(nrun));
656        };
657      };
658      if ( startfrom ){
659        startfrom = 0;
660        goto retry;
661      };
662      printf(" ERROR! run not found \n");
663    return(0);    return(0);
664  }  }
665    
# Line 672  Int_t ItoRunInfo::GetRunInfo(ULong64_t r Line 708  Int_t ItoRunInfo::GetRunInfo(ULong64_t r
708      };      };
709      if ( !found ) first_file_entry += (nwrun->EV_REG_PHYS_TO - nwrun->EV_REG_PHYS_FROM + 1);      if ( !found ) first_file_entry += (nwrun->EV_REG_PHYS_TO - nwrun->EV_REG_PHYS_FROM + 1);
710    };    };
   if ( found ) return(0);  
711    delete nwver;    delete nwver;
712    delete nwrun;    delete nwrun;
713      if ( found ) return(0);
714    return(-800);    return(-800);
715  }  }
716    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.23