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(){ |
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). |
126 |
last_file_entry = 0; |
last_file_entry = 0; |
127 |
file_entries = 0; |
file_entries = 0; |
128 |
version = new SoftInfo(); |
version = new SoftInfo(); |
129 |
|
// glrun = new GL_RUN(); |
130 |
norun = 0; |
norun = 0; |
131 |
totnorun = 0; |
totnorun = 0; |
132 |
runlist = new TArrayI(500); |
runlist = new TArrayI(500); |
135 |
|
|
136 |
|
|
137 |
|
|
138 |
TChain *ItoRunInfo::LoadRunInfoTree(TList *fl){ |
TChain *ItoRunInfo::GetRunTree(TList *fl){ |
139 |
// |
// |
140 |
TChain *Tout=0; |
TChain *Tout = new TChain("Run"); |
|
// |
|
|
TChain *RI = 0; |
|
|
TChain *SI = 0; |
|
|
RI = new TChain("RunInfo"); |
|
|
SI = new TChain("SoftInfo"); |
|
141 |
// loop over files and create chains |
// loop over files and create chains |
142 |
TIter next(fl); |
TIter next(fl); |
143 |
TSystemFile *questo = 0; |
TSystemFile *questo = 0; |
144 |
while ( (questo = (TSystemFile*) next()) ) { |
while ( (questo = (TSystemFile*) next()) ) { |
145 |
TString name = questo->GetName(); |
TString name = questo->GetName(); |
146 |
RI->Add(name); |
Tout->Add(name); |
|
SI->Add(name); |
|
147 |
}; |
}; |
148 |
// |
// |
149 |
RI->SetBranchAddress("RunInfo", GetPointerToRI()); |
Tout->SetBranchAddress("RunInfo", GetPointerToRI()); |
150 |
Tout = RI; |
printf("Run : set branch address RunInfo\n"); |
151 |
SI->SetBranchAddress("SoftInfo", GetPointerToSI()); |
Tout->SetBranchAddress("SoftInfo", GetPointerToSI()); |
152 |
Tout->AddFriend("SoftInfo"); |
printf("Software : set branch address SoftInfo\n"); |
153 |
// |
// |
154 |
return Tout; |
return Tout; |
155 |
// |
// |
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 |
}; |
}; |
233 |
isreadonly = false; |
isreadonly = false; |
234 |
idRun = run; |
idRun = run; |
235 |
// |
// |
236 |
Bool_t debug = true; |
Bool_t debug = false; |
237 |
// |
// |
238 |
Bool_t ismydir = false; |
Bool_t ismydir = false; |
239 |
// |
// |
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; |
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 ) { |
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 |
}; |
}; |
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; |
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; |
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; |
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; |
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; |
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; |
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 |
|
|