30 |
S4_ver = ""; |
S4_ver = ""; |
31 |
} |
} |
32 |
|
|
33 |
|
/** |
34 |
|
* Fills a struct cSoftInfo with values from a SoftInfo object (to put data into a F77 common). |
35 |
|
*/ |
36 |
|
void SoftInfo::GetLevel2Struct(cSoftInfo *l2) const{ |
37 |
|
l2->FillTrigWith(TRIG_ver); |
38 |
|
l2->FillTofWith(TOF_ver); |
39 |
|
l2->FillAcWith(AC_ver); |
40 |
|
l2->FillTrkWith(TRK_ver); |
41 |
|
l2->FillOrbWith(ORB_ver); |
42 |
|
l2->FillCalWith(CAL_ver); |
43 |
|
l2->FillNdWith(ND_ver); |
44 |
|
l2->FillS4With(S4_ver); |
45 |
|
} |
46 |
|
/***********************/ |
47 |
|
|
48 |
ItoRunInfo::ItoRunInfo() { |
ItoRunInfo::ItoRunInfo() { |
49 |
reprocessing = false; |
reprocessing = false; |
50 |
updating = false; |
updating = false; |
63 |
version->S4_ver = ""; |
version->S4_ver = ""; |
64 |
version->ORB_ver = ""; |
version->ORB_ver = ""; |
65 |
norun = 0; |
norun = 0; |
66 |
runlist = new TArrayL(0,NULL); |
// runlist = new TArrayL(0,NULL); |
67 |
file = new TFile(); |
runlist = new TArrayL(500); |
68 |
|
// file = new TFile(); |
69 |
|
file = NULL;//new TFile(); |
70 |
newtree = new TTree(); |
newtree = new TTree(); |
71 |
} |
} |
72 |
|
|
94 |
version->S4_ver = ""; |
version->S4_ver = ""; |
95 |
norun = 0; |
norun = 0; |
96 |
totnorun = 0; |
totnorun = 0; |
97 |
|
runlist = new TArrayL(500); |
98 |
|
// runlist = new TArrayL(0,NULL); |
99 |
// |
// |
100 |
} |
} |
101 |
|
|
121 |
version->S4_ver = ""; |
version->S4_ver = ""; |
122 |
norun = 0; |
norun = 0; |
123 |
totnorun = 0; |
totnorun = 0; |
124 |
|
// runlist = new TArrayL(0,NULL); |
125 |
|
runlist = new TArrayL(500); |
126 |
// |
// |
127 |
} |
} |
128 |
|
|
170 |
version->S4_ver = ""; |
version->S4_ver = ""; |
171 |
// |
// |
172 |
norun = 0; |
norun = 0; |
173 |
runlist = new TArrayL(0,NULL); |
// runlist = new TArrayL(0,NULL); |
174 |
|
//runlist->Reset(); |
175 |
// |
// |
176 |
Bool_t found = false; |
Bool_t found = false; |
177 |
Int_t error = 0; |
Int_t error = 0; |
269 |
return(-805); |
return(-805); |
270 |
}; |
}; |
271 |
// |
// |
272 |
runlist = new TArrayL(1); |
// runlist = new TArrayL(1); |
273 |
// |
// |
274 |
error = Query_GL_RUN(idRun, dbc); |
error = Query_GL_RUN(idRun, dbc); |
275 |
// |
// |
341 |
// |
// |
342 |
totnorun = oldtree->GetEntries(); |
totnorun = oldtree->GetEntries(); |
343 |
// |
// |
344 |
runlist = new TArrayL((Int_t)totnorun); |
if ( totnorun > 500 ){ |
345 |
|
if ( debug ) printf("\n RUNINFO - ERROR: can not handle more than 500 runs!\n"); |
346 |
|
return(-806); |
347 |
|
}; |
348 |
|
// runlist = new TArrayL((Int_t)totnorun); |
349 |
// |
// |
350 |
found = false; |
found = false; |
351 |
// |
// |
569 |
// |
// |
570 |
totnorun = newtree->GetEntries(); |
totnorun = newtree->GetEntries(); |
571 |
// |
// |
572 |
runlist = new TArrayL((Int_t)totnorun); |
if ( totnorun > 500 ){ |
573 |
|
if ( debug ) printf("\n RUNINFO - ERROR: can not handle more than 500 runs!\n"); |
574 |
|
return(-806); |
575 |
|
}; |
576 |
|
// runlist = new TArrayL((Int_t)totnorun); |
577 |
// |
// |
578 |
first_file_entry = 0; |
first_file_entry = 0; |
579 |
// |
// |
631 |
last_file_entry = 0; |
last_file_entry = 0; |
632 |
file_entries = 0ULL; |
file_entries = 0ULL; |
633 |
norun = 0; |
norun = 0; |
634 |
runlist = new TArrayL(0,NULL); |
// runlist = new TArrayL(0,NULL); |
635 |
|
delete runlist; |
636 |
|
//if ( file ) delete file; |
637 |
file = new TFile(); |
file = new TFile(); |
638 |
if ( isreadonly ) newtree->Delete(); |
if ( isreadonly ) newtree->Delete(); |
639 |
} |
} |
644 |
|
|
645 |
UInt_t ItoRunInfo::GetRunForEntry(UInt_t entry){ |
UInt_t ItoRunInfo::GetRunForEntry(UInt_t entry){ |
646 |
// |
// |
647 |
// ItoRunInfo *run = new ItoRunInfo(file); |
UInt_t startfrom = 0; |
648 |
|
// |
649 |
|
if ( entry >= (UInt_t)first_file_entry && entry <= (UInt_t)last_file_entry ) return(ID); |
650 |
|
// |
651 |
|
if ( entry > (UInt_t)last_file_entry ){ |
652 |
|
for ( UInt_t nrun = 0; nrun < norun; nrun++){ |
653 |
|
if ( ID == (ULong64_t)runlist->At(nrun) ) { |
654 |
|
startfrom = nrun+1; |
655 |
|
break; |
656 |
|
}; |
657 |
|
}; |
658 |
|
} else { |
659 |
|
startfrom = 0; |
660 |
|
}; |
661 |
|
// |
662 |
|
if ( startfrom >= norun ) startfrom = 0; |
663 |
// |
// |
664 |
for ( UInt_t nrun = 0; nrun < norun; nrun++){ |
retry: |
665 |
// run->GetRunInfo((ULong64_t)nrun); |
// |
666 |
// printf("nrun = %i runlist = %llu \n",nrun,(ULong64_t)runlist->At(nrun)); |
for ( UInt_t nrun = startfrom; nrun < norun; nrun++){ |
667 |
GetRunInfo((ULong64_t)runlist->At(nrun)); |
GetRunInfo((ULong64_t)runlist->At(nrun)); |
|
// printf("entry %i first %i last %i \n",entry,(UInt_t)first_file_entry,(UInt_t)last_file_entry ); |
|
668 |
if ( entry >= (UInt_t)first_file_entry && entry <= (UInt_t)last_file_entry ){ |
if ( entry >= (UInt_t)first_file_entry && entry <= (UInt_t)last_file_entry ){ |
|
// run->newtree->Delete(); |
|
|
// delete run; |
|
|
//printf("nrun is %i \n",nrun); |
|
669 |
return((UInt_t)runlist->At(nrun)); |
return((UInt_t)runlist->At(nrun)); |
670 |
}; |
}; |
671 |
}; |
}; |
672 |
// run->newtree->Delete(); |
if ( startfrom ){ |
673 |
// delete run; |
startfrom = 0; |
674 |
|
goto retry; |
675 |
|
}; |
676 |
|
printf(" ERROR! run not found \n"); |
677 |
return(0); |
return(0); |
678 |
} |
} |
679 |
|
|
727 |
if ( found ) return(0); |
if ( found ) return(0); |
728 |
return(-800); |
return(-800); |
729 |
} |
} |
730 |
|
|