--- DarthVader/RunInfo/src/RunInfo.cpp 2006/11/02 12:32:58 1.13 +++ DarthVader/RunInfo/src/RunInfo.cpp 2006/11/09 14:44:08 1.14 @@ -30,6 +30,7 @@ CAL_ver = ""; ND_ver = ""; S4_ver = ""; + DV_ver = ""; } void SoftInfo::Clear(){ @@ -41,8 +42,44 @@ CAL_ver = ""; ND_ver = ""; S4_ver = ""; + DV_ver = ""; } +UInt_t SoftInfo::GetSWinfo(TString Detector){ + TString sver; + UInt_t version = 0; + if ( !strcmp(Detector.Data(),"TRIG") ){ + sver = TRIG_ver; + }; + if ( !strcmp(Detector.Data(),"TOF") ){ + sver = TOF_ver; + }; + if ( !strcmp(Detector.Data(),"AC") ){ + sver = AC_ver; + }; + if ( !strcmp(Detector.Data(),"TRK") ){ + sver = TRK_ver; + }; + if ( !strcmp(Detector.Data(),"CALO") ){ + sver = CAL_ver; + }; + if ( !strcmp(Detector.Data(),"S4") ){ + sver = S4_ver; + }; + if ( !strcmp(Detector.Data(),"DV") ){ + sver = DV_ver; + }; + if ( !strcmp(Detector.Data(),"ND") ){ + sver = ND_ver; + }; + if ( !strcmp(Detector.Data(),"ORB") ){ + sver = ORB_ver; + }; + sver.ReplaceAll("v",1," ",1); + sver.ReplaceAll("r",1," ",1); + version = (UInt_t)sver.Atoi(); + return(version); +}; /** * Fills a struct cSoftInfo with values from a SoftInfo object (to put data into a F77 common). @@ -98,7 +135,7 @@ -TChain *ItoRunInfo::LoadRunInfoTree(TList *fl){ +TChain *ItoRunInfo::GetRunTree(TList *fl){ // TChain *Tout = new TChain("Run"); // loop over files and create chains @@ -185,6 +222,7 @@ newver->ORB_ver = sinfo->ORB_ver; newver->CAL_ver = sinfo->CAL_ver; newver->S4_ver = sinfo->S4_ver; + newver->DV_ver = sinfo->DV_ver; newver->ND_ver = sinfo->ND_ver; // }; @@ -234,6 +272,7 @@ version->ORB_ver = Version; version->CAL_ver = Version; version->S4_ver = Version; + version->DV_ver = Version; version->ND_ver = Version; } else { if ( !strcmp(Detector.Data(),"TRIG") ) version->TRIG_ver = Version; @@ -242,9 +281,10 @@ if ( !strcmp(Detector.Data(),"TRK") ) version->TRK_ver = Version; if ( !strcmp(Detector.Data(),"CALO") ) version->CAL_ver = Version; if ( !strcmp(Detector.Data(),"S4") ) version->S4_ver = Version; + if ( !strcmp(Detector.Data(),"DV") ) version->DV_ver = Version; if ( !strcmp(Detector.Data(),"ND") ) version->ND_ver = Version; if ( !strcmp(Detector.Data(),"ORB") ) version->ORB_ver = Version; - 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); }; // if ( !oldtree ) { @@ -368,6 +408,7 @@ newver->ORB_ver = oldver->ORB_ver; newver->CAL_ver = oldver->CAL_ver; newver->S4_ver = oldver->S4_ver; + newver->DV_ver = oldver->DV_ver; newver->ND_ver = oldver->ND_ver; if ( strcmp(oldver->TRIG_ver.Data(),"") ) reprocessing = true; }; @@ -378,6 +419,7 @@ newver->TRK_ver = oldver->TRK_ver; newver->ORB_ver = oldver->ORB_ver; newver->CAL_ver = oldver->CAL_ver; + newver->DV_ver = oldver->DV_ver; newver->S4_ver = oldver->S4_ver; newver->ND_ver = oldver->ND_ver; if ( strcmp(oldver->TOF_ver.Data(),"") ) reprocessing = true; @@ -388,6 +430,7 @@ newver->TRK_ver = oldver->TRK_ver; newver->ORB_ver = oldver->ORB_ver; newver->CAL_ver = oldver->CAL_ver; + newver->DV_ver = oldver->DV_ver; newver->S4_ver = oldver->S4_ver; newver->ND_ver = oldver->ND_ver; newver->AC_ver = version->AC_ver; @@ -398,6 +441,7 @@ newver->TOF_ver = oldver->TOF_ver; newver->CAL_ver = oldver->CAL_ver; newver->ORB_ver = oldver->ORB_ver; + newver->DV_ver = oldver->DV_ver; newver->S4_ver = oldver->S4_ver; newver->ND_ver = oldver->ND_ver; newver->AC_ver = oldver->AC_ver; @@ -409,6 +453,7 @@ newver->TOF_ver = oldver->TOF_ver; newver->CAL_ver = oldver->CAL_ver; newver->TRK_ver = oldver->TRK_ver; + newver->DV_ver = oldver->DV_ver; newver->S4_ver = oldver->S4_ver; newver->ND_ver = oldver->ND_ver; newver->AC_ver = oldver->AC_ver; @@ -418,6 +463,7 @@ if ( !strcmp(Detector.Data(),"CALO") ){ newver->TRIG_ver = oldver->TRIG_ver; newver->TOF_ver = oldver->TOF_ver; + newver->DV_ver = oldver->DV_ver; newver->S4_ver = oldver->S4_ver; newver->ORB_ver = oldver->ORB_ver; newver->ND_ver = oldver->ND_ver; @@ -434,12 +480,26 @@ newver->TRK_ver = oldver->TRK_ver; newver->ORB_ver = oldver->ORB_ver; newver->CAL_ver = oldver->CAL_ver; + newver->DV_ver = oldver->DV_ver; newver->S4_ver = version->S4_ver; if ( strcmp(oldver->S4_ver.Data(),"") ) reprocessing = true; }; + if ( !strcmp(Detector.Data(),"DV") ){ + newver->TRIG_ver = oldver->TRIG_ver; + newver->TOF_ver = oldver->TOF_ver; + newver->ND_ver = oldver->ND_ver; + newver->AC_ver = oldver->AC_ver; + newver->TRK_ver = oldver->TRK_ver; + newver->ORB_ver = oldver->ORB_ver; + newver->CAL_ver = oldver->CAL_ver; + newver->S4_ver = oldver->S4_ver; + newver->DV_ver = version->DV_ver; + if ( strcmp(oldver->DV_ver.Data(),"") ) reprocessing = true; + }; if ( !strcmp(Detector.Data(),"ND") ){ newver->TRIG_ver = oldver->TRIG_ver; newver->TOF_ver = oldver->TOF_ver; + newver->DV_ver = oldver->DV_ver; newver->S4_ver = oldver->S4_ver; newver->AC_ver = oldver->AC_ver; newver->ORB_ver = oldver->ORB_ver; @@ -547,7 +607,8 @@ file_entries = 0; norun = 0; delete runlist; - file = new TFile(); + // file = new TFile(); + file = 0; if ( isreadonly ) newtree->Delete(); }