11#include <framework/core/Module.h>
12#include <framework/core/EventProcessor.h>
13#include <framework/datastore/StoreArray.h>
38 void initSubEvent(
const std::string& objectName,
const std::string& loopOver, std::shared_ptr<Path> path);
40 void initSubLoop(std::shared_ptr<Path> path,
const std::string& condition,
unsigned int maxIterations);
44 virtual void endRun()
override;
45 virtual void event()
override;
provides the core event processing loop.
Accessor to arrays stored in the data store.
Framework-internal module that implements the functionality of Path::forEach() as well as Path::doWhi...
StoreArray< TObject > m_loopOver
array looped over in case of forEach
void initSubLoop(std::shared_ptr< Path > path, const std::string &condition, unsigned int maxIterations)
ised by Path::doWhile() to actually set parameters
std::optional< std::string > m_loopOverName
name for m_loopOver in case of forEach.
void initSubEvent(const std::string &objectName, const std::string &loopOver, std::shared_ptr< Path > path)
used by Path::forEach() to actually set parameters.
virtual void initialize() override
Initialize the Module.
virtual void event() override
This method is the core of the module.
int m_mode
Mode for this module.
virtual void endRun() override
This method is called if the current run ends.
virtual void terminate() override
This method is called at the end of the event processing.
std::unique_ptr< ModuleCondition > m_loopCondition
Condition object to evaluate if the loop is finished in case of doWhile()
void setProperties()
Set properties for this module based on the modules found in m_path.
std::optional< std::string > m_objectName
name of our loop variable in case of forEach.
virtual void beginRun() override
Called when entering a new run.
EModes
Define the constants for the different modes.
void setDoWhileConditions()
Set the necessary pointers for do_while(): the pointer to the module whose return value we'll use as ...
int m_processID
when using multi-processing contains the ID of the process where event() is called (in that process o...
std::shared_ptr< Path > m_path
Path to execute.
std::optional< std::string > m_loopConditionString
String for the condition when looping.
Module * m_loopConditionModule
pointer to the module to provide the returnValue in case of doWhile()
unsigned int m_maxIterations
maximum number of iterations before giving up in case of doWhile()
Abstract base class for different kinds of events.