43 typedef typename std::decay<
decltype(func(alg))>::type scType__;
44 if (!::asg::CheckHelper<scType__>::isSuccess (func (alg)))
46 msg << MSG::ERROR <<
"executing " << funcName <<
" on algorithm " <<
alg->getName() <<
endmsg;
47 return StatusCode::FAILURE;
52 msg << MSG::ERROR <<
"executing " << funcName <<
" on algorithm " <<
alg->getName() <<
endmsg;
53 return StatusCode::FAILURE;
56 return StatusCode::SUCCESS;
68 return StatusCode::FAILURE;
78 return alg->initialize (workerData);});
87 return StatusCode::SUCCESS;
89 return alg->finalize ();}).isFailure())
90 return StatusCode::FAILURE;
91 return StatusCode::SUCCESS;
100 return alg->endInputFile ();});
111 return StatusCode::FAILURE;
115 if (!
data.m_hasInputEvents)
return StatusCode::SUCCESS;
118 return alg->beginInputFile ();}).isFailure())
119 return StatusCode::FAILURE;
120 return StatusCode::SUCCESS;
129 return alg->fileExecute ();});
137 data.m_skipEvent =
false;
138 bool sequenceSkip =
false;
139 for (
auto& algData :
data.m_algs)
143 if (algData.m_sequenceStart)
144 sequenceSkip =
false;
145 else if (sequenceSkip)
147 algData.m_wasSkipped =
true;
151 algData.m_executeCount += 1;
152 if (algData.m_algorithm->execute() == StatusCode::FAILURE)
154 ANA_MSG_ERROR (
"while calling execute() on algorithm " << algData.m_algorithm->getName());
155 return StatusCode::FAILURE;
158 if (
data.m_skipEvent)
160 algData.m_skipCount += 1;
161 algData.m_wasSkipped =
true;
163 data.m_skipEvent =
false;
168 ANA_MSG_ERROR (
"while calling execute() on algorithm " << algData.m_algorithm->getName());
169 return StatusCode::FAILURE;
173 for (
auto& algData :
data.m_algs)
180 if (algData.m_wasSkipped)
182 algData.m_wasSkipped =
false;
185 if (algData.m_algorithm->postExecute() == StatusCode::FAILURE)
187 ANA_MSG_ERROR (
"while calling postExecute() on algorithm " << algData.m_algorithm->getName());
188 return StatusCode::FAILURE;
193 ANA_MSG_ERROR (
"while calling postExecute() on algorithm " << algData.m_algorithm->getName());
194 return StatusCode::FAILURE;
198 return StatusCode::SUCCESS;
char data[hepevt_bytes_allocation_ATLAS]
bool m_initialized
whether Algorithm::initialize has been called
void report_exception(std::exception_ptr eptr)
print out the currently evaluated exception
This module defines the arguments passed from the BATCH driver to the BATCH worker.
::StatusCode StatusCode
StatusCode definition for legacy code.
all the external components an algorithm needs before initialization (in EventLoop)
IFilterWorker * m_filterWorker
ITreeWorker * m_treeWorker
asg::SgEvent * m_evtStore
IHistogramWorker * m_histogramWorker
all the data a worker tracks for an individual algorithm
the data the EventLoop core classes are sharing with the Module implementation