| 152 |
TTree *tempac = 0; |
TTree *tempac = 0; |
| 153 |
stringstream tempname; |
stringstream tempname; |
| 154 |
stringstream acfolder; |
stringstream acfolder; |
| 155 |
|
Bool_t myfold = false; |
| 156 |
tempname.str(""); |
tempname.str(""); |
| 157 |
tempname << outdir; |
tempname << outdir; |
| 158 |
tempname << "/" << processFolder.Data(); |
tempname << "/" << processFolder.Data(); |
| 159 |
acfolder.str(""); |
acfolder.str(""); |
| 160 |
acfolder << tempname.str().c_str(); |
acfolder << tempname.str().c_str(); |
|
gSystem->MakeDirectory(acfolder.str().c_str()); |
|
| 161 |
tempname << "/ac2tree_run"; |
tempname << "/ac2tree_run"; |
| 162 |
tempname << run << ".root"; |
tempname << run << ".root"; |
| 163 |
// |
// |
| 284 |
// |
// |
| 285 |
// copying old tree to a new file |
// copying old tree to a new file |
| 286 |
// |
// |
| 287 |
|
gSystem->MakeDirectory(acfolder.str().c_str()); |
| 288 |
|
myfold = true; |
| 289 |
tempfile = new TFile(tempname.str().c_str(),"RECREATE"); |
tempfile = new TFile(tempname.str().c_str(),"RECREATE"); |
| 290 |
tempac = acclone->CloneTree(-1,"fast"); |
tempac = acclone->CloneTree(-1,"fast"); |
| 291 |
tempac->SetName("Anticounter-old"); |
tempac->SetName("Anticounter-old"); |
| 643 |
// |
// |
| 644 |
if ( l0File ) l0File->Close(); |
if ( l0File ) l0File->Close(); |
| 645 |
if ( tempfile ) tempfile->Close(); |
if ( tempfile ) tempfile->Close(); |
| 646 |
gSystem->Unlink(tempname.str().c_str()); |
if ( myfold ) gSystem->Unlink(tempname.str().c_str()); |
| 647 |
// |
// |
| 648 |
if ( code < 0 && verbose ) printf("\n ANTICOUNTER - ERROR: an error occurred, try to save anyway...\n"); |
if ( code < 0 && verbose ) printf("\n ANTICOUNTER - ERROR: an error occurred, try to save anyway...\n"); |
| 649 |
if ( verbose ) printf("\n Writing and closing rootple\n"); |
if ( verbose ) printf("\n Writing and closing rootple\n"); |
| 654 |
file->Write(); |
file->Write(); |
| 655 |
}; |
}; |
| 656 |
// |
// |
| 657 |
gSystem->Unlink(acfolder.str().c_str()); |
if ( myfold ) gSystem->Unlink(acfolder.str().c_str()); |
| 658 |
// |
// |
| 659 |
// the end |
// the end |
| 660 |
// |
// |