| 184 |
TTree *tempOrbitalInfo = 0; |
TTree *tempOrbitalInfo = 0; |
| 185 |
stringstream tempname; |
stringstream tempname; |
| 186 |
stringstream OrbitalInfofolder; |
stringstream OrbitalInfofolder; |
| 187 |
|
Bool_t myfold = false; |
| 188 |
tempname.str(""); |
tempname.str(""); |
| 189 |
tempname << outDir; |
tempname << outDir; |
| 190 |
tempname << "/" << processFolder.Data(); |
tempname << "/" << processFolder.Data(); |
| 191 |
OrbitalInfofolder.str(""); |
OrbitalInfofolder.str(""); |
| 192 |
OrbitalInfofolder << tempname.str().c_str(); |
OrbitalInfofolder << tempname.str().c_str(); |
|
gSystem->MakeDirectory(OrbitalInfofolder.str().c_str()); |
|
| 193 |
tempname << "/OrbitalInfotree_run"; |
tempname << "/OrbitalInfotree_run"; |
| 194 |
tempname << run << ".root"; |
tempname << run << ".root"; |
| 195 |
// |
// |
| 337 |
// |
// |
| 338 |
// copying old tree to a new file |
// copying old tree to a new file |
| 339 |
// |
// |
| 340 |
|
gSystem->MakeDirectory(OrbitalInfofolder.str().c_str()); |
| 341 |
|
myfold = true; |
| 342 |
tempfile = new TFile(tempname.str().c_str(),"RECREATE"); |
tempfile = new TFile(tempname.str().c_str(),"RECREATE"); |
| 343 |
tempOrbitalInfo = OrbitalInfotrclone->CloneTree(-1,"fast"); |
tempOrbitalInfo = OrbitalInfotrclone->CloneTree(-1,"fast"); |
| 344 |
tempOrbitalInfo->SetName("OrbitalInfo-old"); |
tempOrbitalInfo->SetName("OrbitalInfo-old"); |
| 401 |
// |
// |
| 402 |
// Loop over the run to be processed |
// Loop over the run to be processed |
| 403 |
// |
// |
|
|
|
| 404 |
for (UInt_t irun=0; irun < numbofrun; irun++){ |
for (UInt_t irun=0; irun < numbofrun; irun++){ |
| 405 |
// |
// |
| 406 |
// retrieve the first run ID to be processed using the RunInfo list |
// retrieve the first run ID to be processed using the RunInfo list |
| 552 |
// |
// |
| 553 |
if (verbose) printf("\n Ready to start! \n\n Processed events: \n\n"); |
if (verbose) printf("\n Ready to start! \n\n Processed events: \n\n"); |
| 554 |
// |
// |
| 555 |
|
// if ( dbc ){ |
| 556 |
|
// dbc->Close(); |
| 557 |
|
// delete dbc; |
| 558 |
|
//}; |
| 559 |
|
// |
| 560 |
for ( re = runinfo->EV_FROM; re < (runinfo->EV_FROM+runinfo->NEVENTS); re++){ |
for ( re = runinfo->EV_FROM; re < (runinfo->EV_FROM+runinfo->NEVENTS); re++){ |
| 561 |
|
|
| 562 |
// |
// |
| 941 |
// |
// |
| 942 |
if ( l0File ) l0File->Close(); |
if ( l0File ) l0File->Close(); |
| 943 |
if ( tempfile ) tempfile->Close(); |
if ( tempfile ) tempfile->Close(); |
| 944 |
gSystem->Unlink(tempname.str().c_str()); |
if ( myfold ) gSystem->Unlink(tempname.str().c_str()); |
| 945 |
// |
// |
| 946 |
if ( runinfo ) runinfo->Close(); |
if ( runinfo ) runinfo->Close(); |
| 947 |
if ( OrbitalInfotr ) OrbitalInfotr->SetName("OrbitalInfo"); |
if ( OrbitalInfotr ) OrbitalInfotr->SetName("OrbitalInfo"); |
| 950 |
file->Write(); |
file->Write(); |
| 951 |
}; |
}; |
| 952 |
// |
// |
| 953 |
gSystem->Unlink(OrbitalInfofolder.str().c_str()); |
if ( myfold ) gSystem->Unlink(OrbitalInfofolder.str().c_str()); |
| 954 |
// |
// |
| 955 |
// the end |
// the end |
| 956 |
// |
// |