| 1 |
/* |
| 2 |
* ReprocessCaloAction.cpp |
| 3 |
* |
| 4 |
* Created on: 10/mar/2010 |
| 5 |
* Author: N. Mori |
| 6 |
*/ |
| 7 |
#ifndef NO_CALOPRESAMPLER |
| 8 |
|
| 9 |
#include "ReprocessCaloAction.h" |
| 10 |
|
| 11 |
void ReprocessCaloAction::Setup(PamLevel2 *events) { |
| 12 |
|
| 13 |
_caloPS = new CaloPreSampler(events); |
| 14 |
_caloPS->SplitInto(0, 22); |
| 15 |
_caloPS->SetCaloLevel2Pointer(events->GetCaloLevel2()); |
| 16 |
} |
| 17 |
|
| 18 |
void ReprocessCaloAction::OnGood(PamLevel2 *event) { |
| 19 |
|
| 20 |
if (_externalFlag) |
| 21 |
if (!(*_externalFlag)) |
| 22 |
return; |
| 23 |
|
| 24 |
_caloPS->GetCaloLevel2(); // This reprocesses the calo before returning the pointer to CaloLevel2 |
| 25 |
} |
| 26 |
|
| 27 |
#endif // #ifndef NO_CALOPRESAMPLER |