| 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; |
| 92 |
version->S4_ver = ""; |
version->S4_ver = ""; |
| 93 |
norun = 0; |
norun = 0; |
| 94 |
totnorun = 0; |
totnorun = 0; |
| 95 |
|
// runlist = new TArrayL(0,NULL); |
| 96 |
// |
// |
| 97 |
} |
} |
| 98 |
|
|
| 118 |
version->S4_ver = ""; |
version->S4_ver = ""; |
| 119 |
norun = 0; |
norun = 0; |
| 120 |
totnorun = 0; |
totnorun = 0; |
| 121 |
|
runlist = new TArrayL(0,NULL); |
| 122 |
// |
// |
| 123 |
} |
} |
| 124 |
|
|
| 167 |
// |
// |
| 168 |
norun = 0; |
norun = 0; |
| 169 |
runlist = new TArrayL(0,NULL); |
runlist = new TArrayL(0,NULL); |
| 170 |
|
//runlist->Reset(); |
| 171 |
// |
// |
| 172 |
Bool_t found = false; |
Bool_t found = false; |
| 173 |
Int_t error = 0; |
Int_t error = 0; |
| 320 |
file->cd(); |
file->cd(); |
| 321 |
// file->Write("Run"); |
// file->Write("Run"); |
| 322 |
//newtree->Delete(); |
//newtree->Delete(); |
| 323 |
|
delete newver; |
| 324 |
|
delete newrun; |
| 325 |
|
delete oldver; |
| 326 |
|
delete oldrun; |
| 327 |
// |
// |
| 328 |
return(0); |
return(0); |
| 329 |
// |
// |
| 463 |
newver->ND_ver = oldver->ND_ver; |
newver->ND_ver = oldver->ND_ver; |
| 464 |
newver->AC_ver = oldver->AC_ver; |
newver->AC_ver = oldver->AC_ver; |
| 465 |
newver->ORB_ver = version->ORB_ver; |
newver->ORB_ver = version->ORB_ver; |
| 466 |
if ( strcmp(oldver->TRK_ver.Data(),"") ) reprocessing = true; |
if ( strcmp(oldver->ORB_ver.Data(),"") ) reprocessing = true; |
| 467 |
}; |
}; |
| 468 |
if ( !strcmp(Detector.Data(),"CALO") ){ |
if ( !strcmp(Detector.Data(),"CALO") ){ |
| 469 |
newver->TRIG_ver = oldver->TRIG_ver; |
newver->TRIG_ver = oldver->TRIG_ver; |
| 519 |
newtree->SetName("Run"); |
newtree->SetName("Run"); |
| 520 |
// file->Write("Run"); |
// file->Write("Run"); |
| 521 |
// newtree->Delete(); |
// newtree->Delete(); |
| 522 |
|
delete newver; |
| 523 |
|
delete newrun; |
| 524 |
|
delete oldver; |
| 525 |
|
delete oldrun; |
| 526 |
// |
// |
| 527 |
if ( !found ){ |
if ( !found ){ |
| 528 |
if ( debug ) printf("\n RUNINFO - ERROR: no run with ID_RUN = %llu \n",idRun); |
if ( debug ) printf("\n RUNINFO - ERROR: no run with ID_RUN = %llu \n",idRun); |
| 606 |
if ( debug ) printf("norun %i \n",(int)norun); |
if ( debug ) printf("norun %i \n",(int)norun); |
| 607 |
Int_t error = 0; |
Int_t error = 0; |
| 608 |
error = GetRunInfo(idRun); |
error = GetRunInfo(idRun); |
| 609 |
|
delete newver; |
| 610 |
|
delete newrun; |
| 611 |
if ( error ) return(error); |
if ( error ) return(error); |
| 612 |
return(0); |
return(0); |
| 613 |
} |
} |
| 630 |
|
|
| 631 |
UInt_t ItoRunInfo::GetRunForEntry(UInt_t entry){ |
UInt_t ItoRunInfo::GetRunForEntry(UInt_t entry){ |
| 632 |
// |
// |
| 633 |
ItoRunInfo *run = new ItoRunInfo(); |
UInt_t startfrom = 0; |
| 634 |
|
// |
| 635 |
|
if ( entry >= (UInt_t)first_file_entry && entry <= (UInt_t)last_file_entry ) return(ID); |
| 636 |
|
// |
| 637 |
|
if ( entry > (UInt_t)last_file_entry ){ |
| 638 |
|
for ( UInt_t nrun = 0; nrun < norun; nrun++){ |
| 639 |
|
if ( ID == (ULong64_t)runlist->At(nrun) ) { |
| 640 |
|
startfrom = nrun+1; |
| 641 |
|
break; |
| 642 |
|
}; |
| 643 |
|
}; |
| 644 |
|
} else { |
| 645 |
|
startfrom = 0; |
| 646 |
|
}; |
| 647 |
|
// |
| 648 |
|
if ( startfrom >= norun ) startfrom = 0; |
| 649 |
// |
// |
| 650 |
for ( UInt_t nrun = 0; nrun < norun; nrun++){ |
retry: |
| 651 |
run->GetRunInfo((ULong64_t)nrun); |
// |
| 652 |
if ( entry >= (UInt_t)run->first_file_entry && entry <= (UInt_t)run->last_file_entry ){ |
for ( UInt_t nrun = startfrom; nrun < norun; nrun++){ |
| 653 |
run->newtree->Delete(); |
GetRunInfo((ULong64_t)runlist->At(nrun)); |
| 654 |
return(nrun); |
if ( entry >= (UInt_t)first_file_entry && entry <= (UInt_t)last_file_entry ){ |
| 655 |
|
return((UInt_t)runlist->At(nrun)); |
| 656 |
}; |
}; |
| 657 |
}; |
}; |
| 658 |
run->newtree->Delete(); |
if ( startfrom ){ |
| 659 |
|
startfrom = 0; |
| 660 |
|
goto retry; |
| 661 |
|
}; |
| 662 |
|
printf(" ERROR! run not found \n"); |
| 663 |
return(0); |
return(0); |
| 664 |
} |
} |
| 665 |
|
|
| 708 |
}; |
}; |
| 709 |
if ( !found ) first_file_entry += (nwrun->EV_REG_PHYS_TO - nwrun->EV_REG_PHYS_FROM + 1); |
if ( !found ) first_file_entry += (nwrun->EV_REG_PHYS_TO - nwrun->EV_REG_PHYS_FROM + 1); |
| 710 |
}; |
}; |
| 711 |
|
delete nwver; |
| 712 |
|
delete nwrun; |
| 713 |
if ( found ) return(0); |
if ( found ) return(0); |
| 714 |
return(-800); |
return(-800); |
| 715 |
} |
} |
| 716 |
|
|