/[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.13 by mocchiut, Thu Nov 2 12:32:58 2006 UTC revision 1.14 by mocchiut, Thu Nov 9 14:44:08 2006 UTC
# Line 30  SoftInfo::SoftInfo() { Line 30  SoftInfo::SoftInfo() {
30    CAL_ver = "";    CAL_ver = "";
31    ND_ver = "";    ND_ver = "";
32    S4_ver = "";      S4_ver = "";  
33      DV_ver = "";
34  }  }
35    
36  void SoftInfo::Clear(){  void SoftInfo::Clear(){
# Line 41  void SoftInfo::Clear(){ Line 42  void SoftInfo::Clear(){
42    CAL_ver = "";    CAL_ver = "";
43    ND_ver = "";    ND_ver = "";
44    S4_ver = "";      S4_ver = "";  
45      DV_ver = "";
46  }  }
47    
48    UInt_t SoftInfo::GetSWinfo(TString Detector){
49      TString sver;
50      UInt_t version = 0;
51      if ( !strcmp(Detector.Data(),"TRIG") ){
52        sver = TRIG_ver;
53      };
54      if ( !strcmp(Detector.Data(),"TOF") ){
55        sver = TOF_ver;
56      };
57      if ( !strcmp(Detector.Data(),"AC") ){
58        sver = AC_ver;
59      };
60      if ( !strcmp(Detector.Data(),"TRK") ){
61        sver = TRK_ver;
62      };
63      if ( !strcmp(Detector.Data(),"CALO") ){
64        sver = CAL_ver;
65      };
66      if ( !strcmp(Detector.Data(),"S4") ){
67        sver = S4_ver;
68      };
69      if ( !strcmp(Detector.Data(),"DV") ){
70        sver = DV_ver;
71      };
72      if ( !strcmp(Detector.Data(),"ND") ){
73        sver = ND_ver;
74      };
75      if ( !strcmp(Detector.Data(),"ORB") ){
76        sver = ORB_ver;
77      };
78      sver.ReplaceAll("v",1," ",1);
79      sver.ReplaceAll("r",1," ",1);
80      version = (UInt_t)sver.Atoi();
81      return(version);
82    };
83    
84  /**  /**
85   * 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 98  ItoRunInfo::ItoRunInfo(TFile *processFl) Line 135  ItoRunInfo::ItoRunInfo(TFile *processFl)
135    
136    
137    
138  TChain *ItoRunInfo::LoadRunInfoTree(TList *fl){  TChain *ItoRunInfo::GetRunTree(TList *fl){
139    //    //
140    TChain *Tout = new TChain("Run");        TChain *Tout = new TChain("Run");    
141    // loop over files and create chains      // loop over files and create chains  
# Line 185  void ItoRunInfo::CopyFromTo(GL_RUN *glru Line 222  void ItoRunInfo::CopyFromTo(GL_RUN *glru
222      newver->ORB_ver = sinfo->ORB_ver;      newver->ORB_ver = sinfo->ORB_ver;
223      newver->CAL_ver = sinfo->CAL_ver;      newver->CAL_ver = sinfo->CAL_ver;
224      newver->S4_ver = sinfo->S4_ver;      newver->S4_ver = sinfo->S4_ver;
225        newver->DV_ver = sinfo->DV_ver;
226      newver->ND_ver = sinfo->ND_ver;      newver->ND_ver = sinfo->ND_ver;
227      //      //
228    };    };
# Line 234  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 272  Int_t ItoRunInfo::Update(UInt_t run, TSt
272      version->ORB_ver = Version;      version->ORB_ver = Version;
273      version->CAL_ver = Version;          version->CAL_ver = Version;    
274      version->S4_ver = Version;      version->S4_ver = Version;
275        version->DV_ver = Version;
276      version->ND_ver = Version;      version->ND_ver = Version;
277    } else {    } else {
278      if ( !strcmp(Detector.Data(),"TRIG") ) version->TRIG_ver = Version;      if ( !strcmp(Detector.Data(),"TRIG") ) version->TRIG_ver = Version;
# Line 242  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 281  Int_t ItoRunInfo::Update(UInt_t run, TSt
281      if ( !strcmp(Detector.Data(),"TRK") ) version->TRK_ver = Version;      if ( !strcmp(Detector.Data(),"TRK") ) version->TRK_ver = Version;
282      if ( !strcmp(Detector.Data(),"CALO") ) version->CAL_ver = Version;      if ( !strcmp(Detector.Data(),"CALO") ) version->CAL_ver = Version;
283      if ( !strcmp(Detector.Data(),"S4") ) version->S4_ver = Version;      if ( !strcmp(Detector.Data(),"S4") ) version->S4_ver = Version;
284        if ( !strcmp(Detector.Data(),"DV") ) version->DV_ver = Version;
285      if ( !strcmp(Detector.Data(),"ND") ) version->ND_ver = Version;      if ( !strcmp(Detector.Data(),"ND") ) version->ND_ver = Version;
286      if ( !strcmp(Detector.Data(),"ORB") ) version->ORB_ver = Version;      if ( !strcmp(Detector.Data(),"ORB") ) version->ORB_ver = Version;
287      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);
288    };    };
289    //    //
290    if ( !oldtree ) {    if ( !oldtree ) {
# Line 368  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 408  Int_t ItoRunInfo::Update(UInt_t run, TSt
408              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
409              newver->CAL_ver = oldver->CAL_ver;              newver->CAL_ver = oldver->CAL_ver;
410              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
411                newver->DV_ver = oldver->DV_ver;
412              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
413              if ( strcmp(oldver->TRIG_ver.Data(),"") ) reprocessing = true;              if ( strcmp(oldver->TRIG_ver.Data(),"") ) reprocessing = true;
414            };            };
# Line 378  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 419  Int_t ItoRunInfo::Update(UInt_t run, TSt
419              newver->TRK_ver = oldver->TRK_ver;              newver->TRK_ver = oldver->TRK_ver;
420              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
421              newver->CAL_ver = oldver->CAL_ver;              newver->CAL_ver = oldver->CAL_ver;
422                newver->DV_ver = oldver->DV_ver;
423              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
424              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
425              if ( strcmp(oldver->TOF_ver.Data(),"") ) reprocessing = true;              if ( strcmp(oldver->TOF_ver.Data(),"") ) reprocessing = true;
# Line 388  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 430  Int_t ItoRunInfo::Update(UInt_t run, TSt
430              newver->TRK_ver = oldver->TRK_ver;              newver->TRK_ver = oldver->TRK_ver;
431              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
432              newver->CAL_ver = oldver->CAL_ver;              newver->CAL_ver = oldver->CAL_ver;
433                newver->DV_ver = oldver->DV_ver;
434              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
435              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
436              newver->AC_ver = version->AC_ver;              newver->AC_ver = version->AC_ver;
# Line 398  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 441  Int_t ItoRunInfo::Update(UInt_t run, TSt
441              newver->TOF_ver = oldver->TOF_ver;              newver->TOF_ver = oldver->TOF_ver;
442              newver->CAL_ver = oldver->CAL_ver;              newver->CAL_ver = oldver->CAL_ver;
443              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
444                newver->DV_ver = oldver->DV_ver;
445              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
446              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
447              newver->AC_ver = oldver->AC_ver;              newver->AC_ver = oldver->AC_ver;
# Line 409  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 453  Int_t ItoRunInfo::Update(UInt_t run, TSt
453              newver->TOF_ver = oldver->TOF_ver;              newver->TOF_ver = oldver->TOF_ver;
454              newver->CAL_ver = oldver->CAL_ver;              newver->CAL_ver = oldver->CAL_ver;
455              newver->TRK_ver = oldver->TRK_ver;              newver->TRK_ver = oldver->TRK_ver;
456                newver->DV_ver = oldver->DV_ver;
457              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
458              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
459              newver->AC_ver = oldver->AC_ver;              newver->AC_ver = oldver->AC_ver;
# Line 418  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 463  Int_t ItoRunInfo::Update(UInt_t run, TSt
463            if ( !strcmp(Detector.Data(),"CALO") ){            if ( !strcmp(Detector.Data(),"CALO") ){
464              newver->TRIG_ver = oldver->TRIG_ver;              newver->TRIG_ver = oldver->TRIG_ver;
465              newver->TOF_ver = oldver->TOF_ver;              newver->TOF_ver = oldver->TOF_ver;
466                newver->DV_ver = oldver->DV_ver;
467              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
468              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
469              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
# Line 434  Int_t ItoRunInfo::Update(UInt_t run, TSt Line 480  Int_t ItoRunInfo::Update(UInt_t run, TSt
480              newver->TRK_ver = oldver->TRK_ver;              newver->TRK_ver = oldver->TRK_ver;
481              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
482              newver->CAL_ver = oldver->CAL_ver;              newver->CAL_ver = oldver->CAL_ver;
483                newver->DV_ver = oldver->DV_ver;
484              newver->S4_ver = version->S4_ver;              newver->S4_ver = version->S4_ver;
485              if ( strcmp(oldver->S4_ver.Data(),"") ) reprocessing = true;              if ( strcmp(oldver->S4_ver.Data(),"") ) reprocessing = true;
486            };            };
487              if ( !strcmp(Detector.Data(),"DV") ){
488                newver->TRIG_ver = oldver->TRIG_ver;
489                newver->TOF_ver = oldver->TOF_ver;
490                newver->ND_ver = oldver->ND_ver;
491                newver->AC_ver = oldver->AC_ver;
492                newver->TRK_ver = oldver->TRK_ver;
493                newver->ORB_ver = oldver->ORB_ver;
494                newver->CAL_ver = oldver->CAL_ver;
495                newver->S4_ver = oldver->S4_ver;
496                newver->DV_ver = version->DV_ver;
497                if ( strcmp(oldver->DV_ver.Data(),"") ) reprocessing = true;
498              };
499            if ( !strcmp(Detector.Data(),"ND") ){            if ( !strcmp(Detector.Data(),"ND") ){
500              newver->TRIG_ver = oldver->TRIG_ver;              newver->TRIG_ver = oldver->TRIG_ver;
501              newver->TOF_ver = oldver->TOF_ver;              newver->TOF_ver = oldver->TOF_ver;
502                newver->DV_ver = oldver->DV_ver;
503              newver->S4_ver = oldver->S4_ver;              newver->S4_ver = oldver->S4_ver;
504              newver->AC_ver = oldver->AC_ver;              newver->AC_ver = oldver->AC_ver;
505              newver->ORB_ver = oldver->ORB_ver;              newver->ORB_ver = oldver->ORB_ver;
# Line 547  void ItoRunInfo::Close(){ Line 607  void ItoRunInfo::Close(){
607    file_entries = 0;    file_entries = 0;
608    norun = 0;    norun = 0;
609    delete runlist;    delete runlist;
610    file = new TFile();      //  file = new TFile();  
611      file = 0;  
612    if ( isreadonly ) newtree->Delete();    if ( isreadonly ) newtree->Delete();
613  }  }
614    

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

  ViewVC Help
Powered by ViewVC 1.1.23