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(){ |
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). |
127 |
|
|
128 |
|
|
129 |
|
|
130 |
TChain *ItoRunInfo::LoadRunInfoTree(TList *fl){ |
TChain *ItoRunInfo::GetRunTree(TList *fl){ |
131 |
// |
// |
132 |
TChain *Tout = new TChain("Run"); |
TChain *Tout = new TChain("Run"); |
133 |
// loop over files and create chains |
// loop over files and create chains |
214 |
newver->ORB_ver = sinfo->ORB_ver; |
newver->ORB_ver = sinfo->ORB_ver; |
215 |
newver->CAL_ver = sinfo->CAL_ver; |
newver->CAL_ver = sinfo->CAL_ver; |
216 |
newver->S4_ver = sinfo->S4_ver; |
newver->S4_ver = sinfo->S4_ver; |
217 |
|
newver->DV_ver = sinfo->DV_ver; |
218 |
newver->ND_ver = sinfo->ND_ver; |
newver->ND_ver = sinfo->ND_ver; |
219 |
// |
// |
220 |
}; |
}; |
264 |
version->ORB_ver = Version; |
version->ORB_ver = Version; |
265 |
version->CAL_ver = Version; |
version->CAL_ver = Version; |
266 |
version->S4_ver = Version; |
version->S4_ver = Version; |
267 |
|
version->DV_ver = Version; |
268 |
version->ND_ver = Version; |
version->ND_ver = Version; |
269 |
} else { |
} else { |
270 |
if ( !strcmp(Detector.Data(),"TRIG") ) version->TRIG_ver = Version; |
if ( !strcmp(Detector.Data(),"TRIG") ) version->TRIG_ver = Version; |
273 |
if ( !strcmp(Detector.Data(),"TRK") ) version->TRK_ver = Version; |
if ( !strcmp(Detector.Data(),"TRK") ) version->TRK_ver = Version; |
274 |
if ( !strcmp(Detector.Data(),"CALO") ) version->CAL_ver = Version; |
if ( !strcmp(Detector.Data(),"CALO") ) version->CAL_ver = Version; |
275 |
if ( !strcmp(Detector.Data(),"S4") ) version->S4_ver = Version; |
if ( !strcmp(Detector.Data(),"S4") ) version->S4_ver = Version; |
276 |
|
if ( !strcmp(Detector.Data(),"DV") ) version->DV_ver = Version; |
277 |
if ( !strcmp(Detector.Data(),"ND") ) version->ND_ver = Version; |
if ( !strcmp(Detector.Data(),"ND") ) version->ND_ver = Version; |
278 |
if ( !strcmp(Detector.Data(),"ORB") ) version->ORB_ver = Version; |
if ( !strcmp(Detector.Data(),"ORB") ) version->ORB_ver = Version; |
279 |
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); |
280 |
}; |
}; |
281 |
// |
// |
282 |
if ( !oldtree ) { |
if ( !oldtree ) { |
328 |
totnorun = 1; |
totnorun = 1; |
329 |
reprocessing = false; |
reprocessing = false; |
330 |
first_file_entry = 0; |
first_file_entry = 0; |
331 |
last_file_entry = (UInt_t)(EV_TO - EV_FROM); |
if ( EV_TO >= EV_FROM ) last_file_entry = (UInt_t)(EV_TO - EV_FROM); |
332 |
norun = 1; |
norun = 1; |
333 |
runlist->AddAt((Int_t)ID,0); |
runlist->AddAt((Int_t)ID,0); |
334 |
// |
// |
400 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
401 |
newver->CAL_ver = oldver->CAL_ver; |
newver->CAL_ver = oldver->CAL_ver; |
402 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
403 |
|
newver->DV_ver = oldver->DV_ver; |
404 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
405 |
if ( strcmp(oldver->TRIG_ver.Data(),"") ) reprocessing = true; |
if ( strcmp(oldver->TRIG_ver.Data(),"") ) reprocessing = true; |
406 |
}; |
}; |
411 |
newver->TRK_ver = oldver->TRK_ver; |
newver->TRK_ver = oldver->TRK_ver; |
412 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
413 |
newver->CAL_ver = oldver->CAL_ver; |
newver->CAL_ver = oldver->CAL_ver; |
414 |
|
newver->DV_ver = oldver->DV_ver; |
415 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
416 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
417 |
if ( strcmp(oldver->TOF_ver.Data(),"") ) reprocessing = true; |
if ( strcmp(oldver->TOF_ver.Data(),"") ) reprocessing = true; |
422 |
newver->TRK_ver = oldver->TRK_ver; |
newver->TRK_ver = oldver->TRK_ver; |
423 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
424 |
newver->CAL_ver = oldver->CAL_ver; |
newver->CAL_ver = oldver->CAL_ver; |
425 |
|
newver->DV_ver = oldver->DV_ver; |
426 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
427 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
428 |
newver->AC_ver = version->AC_ver; |
newver->AC_ver = version->AC_ver; |
433 |
newver->TOF_ver = oldver->TOF_ver; |
newver->TOF_ver = oldver->TOF_ver; |
434 |
newver->CAL_ver = oldver->CAL_ver; |
newver->CAL_ver = oldver->CAL_ver; |
435 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
436 |
|
newver->DV_ver = oldver->DV_ver; |
437 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
438 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
439 |
newver->AC_ver = oldver->AC_ver; |
newver->AC_ver = oldver->AC_ver; |
445 |
newver->TOF_ver = oldver->TOF_ver; |
newver->TOF_ver = oldver->TOF_ver; |
446 |
newver->CAL_ver = oldver->CAL_ver; |
newver->CAL_ver = oldver->CAL_ver; |
447 |
newver->TRK_ver = oldver->TRK_ver; |
newver->TRK_ver = oldver->TRK_ver; |
448 |
|
newver->DV_ver = oldver->DV_ver; |
449 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
450 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
451 |
newver->AC_ver = oldver->AC_ver; |
newver->AC_ver = oldver->AC_ver; |
455 |
if ( !strcmp(Detector.Data(),"CALO") ){ |
if ( !strcmp(Detector.Data(),"CALO") ){ |
456 |
newver->TRIG_ver = oldver->TRIG_ver; |
newver->TRIG_ver = oldver->TRIG_ver; |
457 |
newver->TOF_ver = oldver->TOF_ver; |
newver->TOF_ver = oldver->TOF_ver; |
458 |
|
newver->DV_ver = oldver->DV_ver; |
459 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
460 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
461 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
472 |
newver->TRK_ver = oldver->TRK_ver; |
newver->TRK_ver = oldver->TRK_ver; |
473 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
474 |
newver->CAL_ver = oldver->CAL_ver; |
newver->CAL_ver = oldver->CAL_ver; |
475 |
|
newver->DV_ver = oldver->DV_ver; |
476 |
newver->S4_ver = version->S4_ver; |
newver->S4_ver = version->S4_ver; |
477 |
if ( strcmp(oldver->S4_ver.Data(),"") ) reprocessing = true; |
if ( strcmp(oldver->S4_ver.Data(),"") ) reprocessing = true; |
478 |
}; |
}; |
479 |
|
if ( !strcmp(Detector.Data(),"DV") ){ |
480 |
|
newver->TRIG_ver = oldver->TRIG_ver; |
481 |
|
newver->TOF_ver = oldver->TOF_ver; |
482 |
|
newver->ND_ver = oldver->ND_ver; |
483 |
|
newver->AC_ver = oldver->AC_ver; |
484 |
|
newver->TRK_ver = oldver->TRK_ver; |
485 |
|
newver->ORB_ver = oldver->ORB_ver; |
486 |
|
newver->CAL_ver = oldver->CAL_ver; |
487 |
|
newver->S4_ver = oldver->S4_ver; |
488 |
|
newver->DV_ver = version->DV_ver; |
489 |
|
if ( strcmp(oldver->DV_ver.Data(),"") ) reprocessing = true; |
490 |
|
}; |
491 |
if ( !strcmp(Detector.Data(),"ND") ){ |
if ( !strcmp(Detector.Data(),"ND") ){ |
492 |
newver->TRIG_ver = oldver->TRIG_ver; |
newver->TRIG_ver = oldver->TRIG_ver; |
493 |
newver->TOF_ver = oldver->TOF_ver; |
newver->TOF_ver = oldver->TOF_ver; |
494 |
|
newver->DV_ver = oldver->DV_ver; |
495 |
newver->S4_ver = oldver->S4_ver; |
newver->S4_ver = oldver->S4_ver; |
496 |
newver->AC_ver = oldver->AC_ver; |
newver->AC_ver = oldver->AC_ver; |
497 |
newver->ORB_ver = oldver->ORB_ver; |
newver->ORB_ver = oldver->ORB_ver; |
502 |
}; |
}; |
503 |
}; |
}; |
504 |
// |
// |
505 |
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); |
506 |
// |
// |
507 |
} else { |
} else { |
508 |
if ( !found ) first_file_entry += (oldrun->EV_TO - oldrun->EV_FROM + 1); |
if ( !found ) first_file_entry += (oldrun->EV_TO - oldrun->EV_FROM + 1); |
579 |
runlist->AddAt(newrun->ID,norun); |
runlist->AddAt(newrun->ID,norun); |
580 |
norun++; |
norun++; |
581 |
}; |
}; |
582 |
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); |
583 |
}; |
}; |
584 |
}; |
}; |
585 |
if ( debug ) printf("norun %i \n",(int)norun); |
if ( debug ) printf("norun %i \n",(int)norun); |
599 |
file_entries = 0; |
file_entries = 0; |
600 |
norun = 0; |
norun = 0; |
601 |
delete runlist; |
delete runlist; |
602 |
file = new TFile(); |
// file = new TFile(); |
603 |
|
file = 0; |
604 |
if ( isreadonly ) newtree->Delete(); |
if ( isreadonly ) newtree->Delete(); |
605 |
} |
} |
606 |
|
|
662 |
if ( nwrun->ID == run || run == 0 ){ |
if ( nwrun->ID == run || run == 0 ){ |
663 |
CopyFromTo(nwrun,(GL_RUN*)this,nwver,version); |
CopyFromTo(nwrun,(GL_RUN*)this,nwver,version); |
664 |
found = true; |
found = true; |
665 |
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); |
666 |
}; |
}; |
667 |
if ( !found ) first_file_entry += (nwrun->EV_TO - nwrun->EV_FROM + 1); |
if ( !found ) first_file_entry += (nwrun->EV_TO - nwrun->EV_FROM + 1); |
668 |
}; |
}; |