263 |
if ( !file->IsOpen() ){ |
if ( !file->IsOpen() ){ |
264 |
if ( verbose ) printf(" ToF - ERROR: cannot open file for writing\n"); |
if ( verbose ) printf(" ToF - ERROR: cannot open file for writing\n"); |
265 |
throw -301; |
throw -301; |
266 |
}; |
} |
267 |
|
|
268 |
|
if ( debug ) file->ls(); |
269 |
|
|
270 |
// |
// |
271 |
// Delete tree if requested |
// Delete tree if requested |
491 |
toftclone = (TTree*)tempfile->Get("ToF-old"); |
toftclone = (TTree*)tempfile->Get("ToF-old"); |
492 |
// toftclone->SetMaxVirtualSize(2500000000LL); // EM residual Tracker-new tree in level2 files when NEVENTS is big |
// toftclone->SetMaxVirtualSize(2500000000LL); // EM residual Tracker-new tree in level2 files when NEVENTS is big |
493 |
toftclone->SetAutoSave(900000000000000LL); |
toftclone->SetAutoSave(900000000000000LL); |
494 |
if ( !l1only ) toftclone->SetBranchAddress("ToFLevel2",&tofclone); |
toftclone->SetBranchAddress("ToFLevel2",&tofclone); // EM reprocessing bug fixed |
495 |
// |
// |
496 |
if ( nobefrun > 0 ){ |
if ( nobefrun > 0 ){ |
497 |
if ( verbose ) printf("\n Pre-processing: copying events from the old tree before the processed run\n"); |
if ( verbose ) printf("\n Pre-processing: copying events from the old tree before the processed run\n"); |
504 |
// copy tofclone to tof |
// copy tofclone to tof |
505 |
// |
// |
506 |
tof->Clear(); |
tof->Clear(); |
507 |
if ( !l1only ) memcpy(&tof,&tofclone,sizeof(tofclone)); |
// if ( !l1only ) memcpy(&tof,&tofclone,sizeof(tofclone)); |
508 |
|
memcpy(&tof,&tofclone,sizeof(tofclone)); |
509 |
// |
// |
510 |
// Fill entry in the new tree |
// Fill entry in the new tree |
511 |
// |
// |
512 |
if ( !l1only ) toft->Fill(); |
toft->Fill(); |
513 |
// |
// |
514 |
}; |
}; |
515 |
if ( verbose ) printf(" Finished successful copying!\n"); |
if ( verbose ) printf(" Finished successful copying!\n"); |
790 |
stm = tm; |
stm = tm; |
791 |
// if ( jj > 0 ) memcpy(sdedx_corr_m,dedx_corr_m[jj-1],48*sizeof(Float_t)); // BUG sdedx should be the previous in time not the previous saved [absurd dE/dx for 8th reduction March and > March 2008 data - fixed on 2009/02/04 |
// if ( jj > 0 ) memcpy(sdedx_corr_m,dedx_corr_m[jj-1],48*sizeof(Float_t)); // BUG sdedx should be the previous in time not the previous saved [absurd dE/dx for 8th reduction March and > March 2008 data - fixed on 2009/02/04 |
792 |
fin>>t1>>tm>>t2; |
fin>>t1>>tm>>t2; |
793 |
if ( verbose ) cout << setiosflags(ios::fixed) << setw(10) << setprecision(3) << tm << endl; |
if ( debug ) cout << setiosflags(ios::fixed) << setw(10) << setprecision(3) << tm << endl; |
794 |
if ( (tm >= (runinfo->RUNHEADER_TIME-window) && tm <= (runinfo->RUNTRAILER_TIME+window)) || (tm > (runinfo->RUNTRAILER_TIME+window) && last) ){ |
if ( (tm >= (runinfo->RUNHEADER_TIME-window) && tm <= (runinfo->RUNTRAILER_TIME+window)) || (tm > (runinfo->RUNTRAILER_TIME+window) && last) ){ |
795 |
if ( first ){ |
if ( first ){ |
796 |
mtime[jj]=stm; |
mtime[jj]=stm; |
1520 |
// copy tofclone to tof |
// copy tofclone to tof |
1521 |
// |
// |
1522 |
tof->Clear(); |
tof->Clear(); |
1523 |
if ( !l1only ) memcpy(&tof,&tofclone,sizeof(tofclone)); |
memcpy(&tof,&tofclone,sizeof(tofclone));// EM reprocessing bug fixed |
1524 |
// |
// |
1525 |
// Fill entry in the new tree |
// Fill entry in the new tree |
1526 |
// |
// |
1527 |
if ( !l1only ) toft->Fill(); |
toft->Fill();// EM reprocessing bug fixed |
1528 |
}; |
}; |
1529 |
if ( verbose ) printf(" Finished successful copying!\n"); |
if ( verbose ) printf(" Finished successful copying!\n"); |
1530 |
}; |
}; |
1573 |
if ( runinfo ) delete runinfo; |
if ( runinfo ) delete runinfo; |
1574 |
// |
// |
1575 |
if ( code < 0 ) throw code; |
if ( code < 0 ) throw code; |
1576 |
|
if ( debug ) file->ls(); |
1577 |
return(code); |
return(code); |
1578 |
} |
} |