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 = ""; |
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). |
118 |
last_file_entry = 0; |
last_file_entry = 0; |
119 |
file_entries = 0; |
file_entries = 0; |
120 |
version = new SoftInfo(); |
version = new SoftInfo(); |
121 |
|
// glrun = new GL_RUN(); |
122 |
norun = 0; |
norun = 0; |
123 |
totnorun = 0; |
totnorun = 0; |
124 |
runlist = new TArrayI(500); |
runlist = new TArrayI(500); |
127 |
|
|
128 |
|
|
129 |
|
|
130 |
TChain *ItoRunInfo::LoadRunInfoTree(TList *fl){ |
TChain *ItoRunInfo::GetRunTree(TList *fl){ |
131 |
// |
// |
132 |
TChain *Tout=0; |
TChain *Tout = new TChain("Run"); |
|
// |
|
|
TChain *RI = 0; |
|
|
TChain *SI = 0; |
|
|
RI = new TChain("RunInfo"); |
|
|
SI = new TChain("SoftInfo"); |
|
133 |
// loop over files and create chains |
// loop over files and create chains |
134 |
TIter next(fl); |
TIter next(fl); |
135 |
TSystemFile *questo = 0; |
TSystemFile *questo = 0; |
136 |
while ( (questo = (TSystemFile*) next()) ) { |
while ( (questo = (TSystemFile*) next()) ) { |
137 |
TString name = questo->GetName(); |
TString name = questo->GetName(); |
138 |
RI->Add(name); |
Tout->Add(name); |
|
SI->Add(name); |
|
139 |
}; |
}; |
140 |
// |
// |
141 |
RI->SetBranchAddress("RunInfo", GetPointerToRI()); |
Tout->SetBranchAddress("RunInfo", GetPointerToRI()); |
142 |
Tout = RI; |
printf("Run : set branch address RunInfo\n"); |
143 |
SI->SetBranchAddress("SoftInfo", GetPointerToSI()); |
Tout->SetBranchAddress("SoftInfo", GetPointerToSI()); |
144 |
Tout->AddFriend("SoftInfo"); |
printf("Software : set branch address SoftInfo\n"); |
145 |
// |
// |
146 |
return Tout; |
return Tout; |
147 |
// |
// |
201 |
newrun->TRK_CALIB_USED = glrun->TRK_CALIB_USED ; |
newrun->TRK_CALIB_USED = glrun->TRK_CALIB_USED ; |
202 |
newrun->CAL_DSP_MASK = glrun->CAL_DSP_MASK ; |
newrun->CAL_DSP_MASK = glrun->CAL_DSP_MASK ; |
203 |
newrun->BOOT_NUMBER = glrun->BOOT_NUMBER ; |
newrun->BOOT_NUMBER = glrun->BOOT_NUMBER ; |
204 |
|
newrun->PHYSENDRUN_MASK_S3S2S12 = glrun->PHYSENDRUN_MASK_S3S2S12 ; |
205 |
|
newrun->PHYSENDRUN_MASK_S11CRC = glrun->PHYSENDRUN_MASK_S11CRC ; |
206 |
newrun->VALIDATION = glrun->VALIDATION ; |
newrun->VALIDATION = glrun->VALIDATION ; |
207 |
// |
// |
208 |
}; |
}; |
216 |
newver->ORB_ver = sinfo->ORB_ver; |
newver->ORB_ver = sinfo->ORB_ver; |
217 |
newver->CAL_ver = sinfo->CAL_ver; |
newver->CAL_ver = sinfo->CAL_ver; |
218 |
newver->S4_ver = sinfo->S4_ver; |
newver->S4_ver = sinfo->S4_ver; |
219 |
|
newver->DV_ver = sinfo->DV_ver; |
220 |
newver->ND_ver = sinfo->ND_ver; |
newver->ND_ver = sinfo->ND_ver; |
221 |
// |
// |
222 |
}; |
}; |
227 |
isreadonly = false; |
isreadonly = false; |
228 |
idRun = run; |
idRun = run; |
229 |
// |
// |
230 |
Bool_t debug = true; |
Bool_t debug = false; |
231 |
// |
// |
232 |
Bool_t ismydir = false; |
Bool_t ismydir = false; |
233 |
// |
// |
266 |
version->ORB_ver = Version; |
version->ORB_ver = Version; |
267 |
version->CAL_ver = Version; |
version->CAL_ver = Version; |
268 |
version->S4_ver = Version; |
version->S4_ver = Version; |
269 |
|
version->DV_ver = Version; |
270 |
version->ND_ver = Version; |
version->ND_ver = Version; |
271 |
} else { |
} else { |
272 |
if ( !strcmp(Detector.Data(),"TRIG") ) version->TRIG_ver = Version; |
if ( !strcmp(Detector.Data(),"TRIG") ) version->TRIG_ver = Version; |
275 |
if ( !strcmp(Detector.Data(),"TRK") ) version->TRK_ver = Version; |
if ( !strcmp(Detector.Data(),"TRK") ) version->TRK_ver = Version; |
276 |
if ( !strcmp(Detector.Data(),"CALO") ) version->CAL_ver = Version; |
if ( !strcmp(Detector.Data(),"CALO") ) version->CAL_ver = Version; |
277 |
if ( !strcmp(Detector.Data(),"S4") ) version->S4_ver = Version; |
if ( !strcmp(Detector.Data(),"S4") ) version->S4_ver = Version; |
278 |
|
if ( !strcmp(Detector.Data(),"DV") ) version->DV_ver = Version; |
279 |
if ( !strcmp(Detector.Data(),"ND") ) version->ND_ver = Version; |
if ( !strcmp(Detector.Data(),"ND") ) version->ND_ver = Version; |
280 |
if ( !strcmp(Detector.Data(),"ORB") ) version->ORB_ver = Version; |
if ( !strcmp(Detector.Data(),"ORB") ) version->ORB_ver = Version; |
281 |
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); |
282 |
}; |
}; |
283 |
// |
// |
284 |
if ( !oldtree ) { |
if ( !oldtree ) { |
330 |
totnorun = 1; |
totnorun = 1; |
331 |
reprocessing = false; |
reprocessing = false; |
332 |
first_file_entry = 0; |
first_file_entry = 0; |
333 |
last_file_entry = (UInt_t)(EV_TO - EV_FROM); |
if ( EV_TO >= EV_FROM ) last_file_entry = (UInt_t)(EV_TO - EV_FROM); |
334 |
norun = 1; |
norun = 1; |
335 |
runlist->AddAt((Int_t)ID,0); |
runlist->AddAt((Int_t)ID,0); |
336 |
// |
// |
402 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
403 |
newver->CAL_ver = oldver->CAL_ver; |
newver->CAL_ver = oldver->CAL_ver; |
404 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
405 |
|
newver->DV_ver = oldver->DV_ver; |
406 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
407 |
if ( strcmp(oldver->TRIG_ver.Data(),"") ) reprocessing = true; |
if ( strcmp(oldver->TRIG_ver.Data(),"") ) reprocessing = true; |
408 |
}; |
}; |
413 |
newver->TRK_ver = oldver->TRK_ver; |
newver->TRK_ver = oldver->TRK_ver; |
414 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
415 |
newver->CAL_ver = oldver->CAL_ver; |
newver->CAL_ver = oldver->CAL_ver; |
416 |
|
newver->DV_ver = oldver->DV_ver; |
417 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
418 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
419 |
if ( strcmp(oldver->TOF_ver.Data(),"") ) reprocessing = true; |
if ( strcmp(oldver->TOF_ver.Data(),"") ) reprocessing = true; |
424 |
newver->TRK_ver = oldver->TRK_ver; |
newver->TRK_ver = oldver->TRK_ver; |
425 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
426 |
newver->CAL_ver = oldver->CAL_ver; |
newver->CAL_ver = oldver->CAL_ver; |
427 |
|
newver->DV_ver = oldver->DV_ver; |
428 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
429 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
430 |
newver->AC_ver = version->AC_ver; |
newver->AC_ver = version->AC_ver; |
435 |
newver->TOF_ver = oldver->TOF_ver; |
newver->TOF_ver = oldver->TOF_ver; |
436 |
newver->CAL_ver = oldver->CAL_ver; |
newver->CAL_ver = oldver->CAL_ver; |
437 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
438 |
|
newver->DV_ver = oldver->DV_ver; |
439 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
440 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
441 |
newver->AC_ver = oldver->AC_ver; |
newver->AC_ver = oldver->AC_ver; |
447 |
newver->TOF_ver = oldver->TOF_ver; |
newver->TOF_ver = oldver->TOF_ver; |
448 |
newver->CAL_ver = oldver->CAL_ver; |
newver->CAL_ver = oldver->CAL_ver; |
449 |
newver->TRK_ver = oldver->TRK_ver; |
newver->TRK_ver = oldver->TRK_ver; |
450 |
|
newver->DV_ver = oldver->DV_ver; |
451 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
452 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
453 |
newver->AC_ver = oldver->AC_ver; |
newver->AC_ver = oldver->AC_ver; |
457 |
if ( !strcmp(Detector.Data(),"CALO") ){ |
if ( !strcmp(Detector.Data(),"CALO") ){ |
458 |
newver->TRIG_ver = oldver->TRIG_ver; |
newver->TRIG_ver = oldver->TRIG_ver; |
459 |
newver->TOF_ver = oldver->TOF_ver; |
newver->TOF_ver = oldver->TOF_ver; |
460 |
|
newver->DV_ver = oldver->DV_ver; |
461 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
462 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
463 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
474 |
newver->TRK_ver = oldver->TRK_ver; |
newver->TRK_ver = oldver->TRK_ver; |
475 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
476 |
newver->CAL_ver = oldver->CAL_ver; |
newver->CAL_ver = oldver->CAL_ver; |
477 |
|
newver->DV_ver = oldver->DV_ver; |
478 |
newver->S4_ver = version->S4_ver; |
newver->S4_ver = version->S4_ver; |
479 |
if ( strcmp(oldver->S4_ver.Data(),"") ) reprocessing = true; |
if ( strcmp(oldver->S4_ver.Data(),"") ) reprocessing = true; |
480 |
}; |
}; |
481 |
|
if ( !strcmp(Detector.Data(),"DV") ){ |
482 |
|
newver->TRIG_ver = oldver->TRIG_ver; |
483 |
|
newver->TOF_ver = oldver->TOF_ver; |
484 |
|
newver->ND_ver = oldver->ND_ver; |
485 |
|
newver->AC_ver = oldver->AC_ver; |
486 |
|
newver->TRK_ver = oldver->TRK_ver; |
487 |
|
newver->ORB_ver = oldver->ORB_ver; |
488 |
|
newver->CAL_ver = oldver->CAL_ver; |
489 |
|
newver->S4_ver = oldver->S4_ver; |
490 |
|
newver->DV_ver = version->DV_ver; |
491 |
|
if ( strcmp(oldver->DV_ver.Data(),"") ) reprocessing = true; |
492 |
|
}; |
493 |
if ( !strcmp(Detector.Data(),"ND") ){ |
if ( !strcmp(Detector.Data(),"ND") ){ |
494 |
newver->TRIG_ver = oldver->TRIG_ver; |
newver->TRIG_ver = oldver->TRIG_ver; |
495 |
newver->TOF_ver = oldver->TOF_ver; |
newver->TOF_ver = oldver->TOF_ver; |
496 |
|
newver->DV_ver = oldver->DV_ver; |
497 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
498 |
newver->AC_ver = oldver->AC_ver; |
newver->AC_ver = oldver->AC_ver; |
499 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
504 |
}; |
}; |
505 |
}; |
}; |
506 |
// |
// |
507 |
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); |
508 |
// |
// |
509 |
} else { |
} else { |
510 |
if ( !found ) first_file_entry += (oldrun->EV_TO - oldrun->EV_FROM + 1); |
if ( !found ) first_file_entry += (oldrun->EV_TO - oldrun->EV_FROM + 1); |
581 |
runlist->AddAt(newrun->ID,norun); |
runlist->AddAt(newrun->ID,norun); |
582 |
norun++; |
norun++; |
583 |
}; |
}; |
584 |
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); |
585 |
}; |
}; |
586 |
}; |
}; |
587 |
if ( debug ) printf("norun %i \n",(int)norun); |
if ( debug ) printf("norun %i \n",(int)norun); |
601 |
file_entries = 0; |
file_entries = 0; |
602 |
norun = 0; |
norun = 0; |
603 |
delete runlist; |
delete runlist; |
604 |
file = new TFile(); |
// file = new TFile(); |
605 |
|
file = 0; |
606 |
if ( isreadonly ) newtree->Delete(); |
if ( isreadonly ) newtree->Delete(); |
607 |
} |
} |
608 |
|
|
609 |
void ItoRunInfo::Clear(){ |
void ItoRunInfo::Clear(Option_t *t){ |
610 |
if ( newtree ) newtree->Delete(); |
if ( newtree ) newtree->Delete(); |
611 |
} |
} |
612 |
|
|
664 |
if ( nwrun->ID == run || run == 0 ){ |
if ( nwrun->ID == run || run == 0 ){ |
665 |
CopyFromTo(nwrun,(GL_RUN*)this,nwver,version); |
CopyFromTo(nwrun,(GL_RUN*)this,nwver,version); |
666 |
found = true; |
found = true; |
667 |
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); |
668 |
}; |
}; |
669 |
if ( !found ) first_file_entry += (nwrun->EV_TO - nwrun->EV_FROM + 1); |
if ( !found ) first_file_entry += (nwrun->EV_TO - nwrun->EV_FROM + 1); |
670 |
}; |
}; |