ATLAS Offline Software
|
a Module managing the state of the algorithms on the workers More...
#include <AlgorithmStateModule.h>
Public Member Functions | |
virtual StatusCode | onInitialize (ModuleData &data) override |
action just before algorithms are initialized More... | |
virtual StatusCode | onFinalize (ModuleData &data) override |
actions just before algorithms are finalized More... | |
virtual StatusCode | onCloseInputFile (ModuleData &data) override |
actions before closing an input file More... | |
virtual StatusCode | onNewInputFile (ModuleData &data) override |
actions after opening a new input file More... | |
virtual StatusCode | onFileExecute (ModuleData &data) override |
actions just before fileExecute is called on algorithms More... | |
virtual StatusCode | onExecute (ModuleData &data) override |
actions just before execute is called on algorithms More... | |
virtual StatusCode | firstInitialize (ModuleData &data) |
action at the the very beginning of the worker job More... | |
virtual StatusCode | preFileInitialize (ModuleData &data) |
action before opening the first file in the worker job More... | |
virtual StatusCode | processInputs (ModuleData &data, IInputModuleActions &actions) |
process all input files More... | |
virtual StatusCode | postFirstEvent (ModuleData &data) |
action after processing first event More... | |
virtual StatusCode | postCloseInputFile (ModuleData &data) |
actions after CloseInputFile is called on the algorithms More... | |
virtual StatusCode | postFinalize (ModuleData &data) |
actions after algorithms have been finalized More... | |
virtual StatusCode | onWorkerEnd (ModuleData &data) |
action at the end of the worker job More... | |
virtual StatusCode | postFileClose (ModuleData &data) |
action at end of the worker job More... | |
virtual void | reportInputFailure (ModuleData &data) |
report that we failed to open our input file More... | |
Private Attributes | |
bool | m_initialized {false} |
whether Algorithm::initialize has been called More... | |
a Module managing the state of the algorithms on the workers
\warn This module ought to be the last module loaded. That ensures that the algorithms get to do their thing after the modules. If a module needs to act after the algorithms, a new callback should be added for that.
The algorithms require actually a fairly complicated state machine to maintain. Mostly because the functions of the Algorithm class have to be called in a specific order, and each needs to have a specific set of pre-conditions fulfilled. This logic used to be (before 19 Jan 19) in the Worker class itself, but I decided it is better to factor it out into a separate module.
Definition at line 36 of file AlgorithmStateModule.h.
|
virtualinherited |
action at the the very beginning of the worker job
This gets called as early as possible in the worker initialization. Essentially all that should happen before this is to load all the modules. The main purpose is to start any benchmarks that are meant to capture the initialization process as well.
Reimplemented in EL::Detail::MemoryMonitorModule, EL::Detail::AlgorithmMemoryModule, EL::Detail::AlgorithmTimerModule, and EL::Detail::StopwatchModule.
Definition at line 25 of file Module.cxx.
|
overridevirtual |
actions before closing an input file
Reimplemented from EL::Detail::Module.
Definition at line 95 of file AlgorithmStateModule.cxx.
|
overridevirtual |
actions just before execute
is called on algorithms
For now that is mostly used to point input modules to the right event
rationale: this will make sure that the post-processing runs for all algorithms for which the regular processing was run
Reimplemented from EL::Detail::Module.
Definition at line 134 of file AlgorithmStateModule.cxx.
|
overridevirtual |
actions just before fileExecute
is called on algorithms
Reimplemented from EL::Detail::Module.
Definition at line 125 of file AlgorithmStateModule.cxx.
|
overridevirtual |
actions just before algorithms are finalized
Reimplemented from EL::Detail::Module.
Definition at line 82 of file AlgorithmStateModule.cxx.
|
overridevirtual |
action just before algorithms are initialized
This is typically used for any setup that this module needs to do.
Reimplemented from EL::Detail::Module.
Definition at line 61 of file AlgorithmStateModule.cxx.
|
overridevirtual |
actions after opening a new input file
Reimplemented from EL::Detail::Module.
Definition at line 104 of file AlgorithmStateModule.cxx.
|
virtualinherited |
action at the end of the worker job
This is mostly meant/used to print job summary statements at the very end of worker job, and actually have them show up at or at least near the end of any log file.
Reimplemented in EL::Detail::MemoryMonitorModule, EL::Detail::StopwatchModule, and EL::Detail::LeakCheckModule.
Definition at line 101 of file Module.cxx.
|
virtualinherited |
actions after CloseInputFile
is called on the algorithms
Right now that is only used to disconnect the TEvent
object from the input file.
Reimplemented in EL::Detail::TEventModule.
Definition at line 49 of file Module.cxx.
|
virtualinherited |
action at end of the worker job
Executed just right before worker exit successfully at this stage all outputs have been created
Reimplemented in EL::Detail::GridReportingModule, and EL::Detail::PostClosedOutputsModule.
Definition at line 107 of file Module.cxx.
|
virtualinherited |
actions after algorithms have been finalized
This is usually used to calculate some job summary information that is to be stored it in the histogram output file.
Reimplemented in EL::Detail::TEventModule, EL::Detail::FileExecutedModule, EL::Detail::LeakCheckModule, EL::Detail::StopwatchModule, and EL::Detail::EventCountModule.
Definition at line 95 of file Module.cxx.
|
virtualinherited |
action after processing first event
This is mostly meant to set up benchmarks that record per-event performance. While a lot of initialization happens during initialize()
there is a fair amount of initialization that happens on the first event, so when recording per-event performance the first event is sort of "special" and may need to be omitted.
Reimplemented in EL::Detail::MemoryMonitorModule, and EL::Detail::LeakCheckModule.
Definition at line 55 of file Module.cxx.
|
virtualinherited |
action before opening the first file in the worker job
This is mostly meant to allow loading the dictionaries before any files and associated information is loaded.
Definition at line 31 of file Module.cxx.
|
virtualinherited |
process all input files
This deviates slightly from the usual pattern for module functions in that I pass in the possible actions as an argument. See IInputModuleActions for details.
Reimplemented in EL::Detail::BatchInputModule, and EL::Detail::DirectInputModule.
Definition at line 83 of file Module.cxx.
|
virtualinherited |
report that we failed to open our input file
Reimplemented in EL::Detail::GridReportingModule.
Definition at line 61 of file Module.cxx.
|
private |
whether Algorithm::initialize has been called
Definition at line 61 of file AlgorithmStateModule.h.