|
ATLAS Offline Software
|
Go to the documentation of this file.
36 forAllAlgorithms (MsgStream&
msg, ModuleData&
data,
const char *funcName, F&& func)
38 for (AlgorithmData&
alg :
data.m_algs)
42 typedef typename std::decay<decltype(func(
alg))>
::type scType__;
45 msg << MSG::ERROR <<
"executing " << funcName <<
" on algorithm " <<
alg->getName() <<
endmsg;
46 return StatusCode::FAILURE;
51 msg << MSG::ERROR <<
"executing " << funcName <<
" on algorithm " <<
alg->getName() <<
endmsg;
52 return StatusCode::FAILURE;
55 return StatusCode::SUCCESS;
67 return StatusCode::FAILURE;
77 return alg->initialize (workerData);});
86 return StatusCode::SUCCESS;
88 return alg->finalize ();}).isFailure())
89 return StatusCode::FAILURE;
90 return StatusCode::SUCCESS;
99 return alg->endInputFile ();});
110 return StatusCode::FAILURE;
113 if (
data.m_inputTree ==
nullptr ||
114 data.m_inputTree->GetEntries() == 0)
115 return StatusCode::SUCCESS;
118 return alg->beginInputFile ();}).isFailure())
119 return StatusCode::FAILURE;
120 return StatusCode::SUCCESS;
129 return alg->fileExecute ();});
139 data.m_skipEvent =
false;
140 auto iter =
data.m_algs.begin();
143 for (
auto end =
data.m_algs.end();
144 iter !=
end; ++ iter)
146 iter->m_executeCount += 1;
147 if (iter->m_algorithm->execute() == StatusCode::FAILURE)
149 ANA_MSG_ERROR (
"while calling execute() on algorithm " << iter->m_algorithm->getName());
150 return StatusCode::FAILURE;
153 if (
data.m_skipEvent)
155 iter->m_skipCount += 1;
156 return StatusCode::SUCCESS;
162 ANA_MSG_ERROR (
"while calling execute() on algorithm " << iter->m_algorithm->getName());
163 return StatusCode::FAILURE;
170 for (
auto jter =
data.m_algs.begin(),
end = iter;
171 jter !=
end && !
data.m_skipEvent; ++ jter)
173 if (jter->m_algorithm->postExecute() == StatusCode::FAILURE)
175 ANA_MSG_ERROR (
"while calling postExecute() on algorithm " << iter->m_algorithm->getName());
176 return StatusCode::FAILURE;
182 ANA_MSG_ERROR (
"while calling postExecute() on algorithm " << iter->m_algorithm->getName());
183 return StatusCode::FAILURE;
186 return StatusCode::SUCCESS;
char data[hepevt_bytes_allocation_ATLAS]
asg::SgTEvent * m_evtStore
virtual StatusCode onNewInputFile(ModuleData &data) override
actions after opening a new input file
this is an internal traits class for status codes used by the ANA_CHECK* macros
the data the EventLoop core classes are sharing with the Module implementation
IFilterWorker * m_filterWorker
all the data a worker tracks for an individual algorithm
virtual StatusCode onInitialize(ModuleData &data) override
action just before algorithms are initialized
::StatusCode StatusCode
StatusCode definition for legacy code.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
bool m_initialized
whether Algorithm::initialize has been called
ITreeWorker * m_treeWorker
all the external components an algorithm needs before initialization (in EventLoop)
#define RCU_CHANGE_INVARIANT(x)
IHistogramWorker * m_histogramWorker
virtual StatusCode onFileExecute(ModuleData &data) override
actions just before fileExecute is called on algorithms
virtual StatusCode onFinalize(ModuleData &data) override
actions just before algorithms are finalized
void report_exception(std::exception_ptr eptr)
print out the currently evaluated exception
virtual StatusCode onExecute(ModuleData &data) override
actions just before execute is called on algorithms
virtual StatusCode onCloseInputFile(ModuleData &data) override
actions before closing an input file