451 |
sgnl = 0; |
sgnl = 0; |
452 |
}; |
}; |
453 |
// |
// |
454 |
// now you can access that variables using the RunInfo class this way runinfo->ID_REG_RUN |
// now you can access that variables using the RunInfo class this way runinfo->ID_ROOT_L0 |
455 |
// |
// |
456 |
if ( runinfo->ID_ROOT_L0 == 0 ){ |
if ( runinfo->ID_ROOT_L0 == 0 ){ |
457 |
if ( debug ) printf("\n S4 - ERROR: no run with ID_RUN = %u \n\n Exiting... \n\n",idRun); |
if ( debug ) printf("\n S4 - ERROR: no run with ID_RUN = %u \n\n Exiting... \n\n",idRun); |
525 |
goto closeandexit; |
goto closeandexit; |
526 |
}; |
}; |
527 |
// |
// |
528 |
if ( runinfo->NEVENTS > nevents-1 ) { |
if ( runinfo->EV_TO > nevents-1 ) { |
529 |
if ( debug ) printf(" S4 - ERROR: too few entries in the S4 tree\n"); |
if ( debug ) printf(" S4 - ERROR: too few entries in the S4 tree\n"); |
530 |
l0File->Close(); |
l0File->Close(); |
531 |
code = -12; |
code = -12; |
573 |
// |
// |
574 |
s4->Clear(); |
s4->Clear(); |
575 |
l0S4->GetEntry(re); |
l0S4->GetEntry(re); |
576 |
if (l0s4e->unpackError == 1) continue; |
if (l0s4e->unpackError == 0){ |
577 |
s4->S4adc = l0s4e->S4_DATA; |
s4->S4adc = l0s4e->S4_DATA; |
578 |
|
// |
579 |
|
if ((l0s4e->S4_DATA) > 31 ){ |
580 |
|
s4->S4calibrated = ParamFit0*((l0s4e->S4_DATA)-32)+ParamFit1; |
581 |
|
}else{ |
582 |
|
s4->S4calibrated = 0; |
583 |
|
} |
584 |
|
}; |
585 |
// |
// |
586 |
if ((l0s4e->S4_DATA) > 31 ){ |
s4->unpackError = l0s4e->unpackError; |
|
s4->S4calibrated = ParamFit0*((l0s4e->S4_DATA)-32)+ParamFit1; |
|
|
}else{ |
|
|
s4->S4calibrated = 0; |
|
|
} |
|
587 |
// |
// |
588 |
S4tr->Fill(); |
S4tr->Fill(); |
589 |
// |
// |