1 #include <boost/python.hpp>
2 #include <boost/preprocessor.hpp>
3 using namespace boost::python;
7 #include <fwk/RunController.h>
8 #include <fwk/CentralConfig.h>
9 #include <fwk/VModule.h>
13 void Config(
const std::string& infile)
32 return this->get_override(
"Init")();
37 return this->get_override(
"Run")(event);
42 return this->get_override(
"Finish")();
63 class_<fwk::RunController, boost::noncopyable>(
"RunController", no_init)
64 .def(
"GetInstance", &fwk::RunController::GetInstance,
65 return_value_policy<reference_existing_object>())
66 .staticmethod(
"GetInstance")
73 return_internal_reference<>());
91 enum_<fwk::VModule::ResultFlag>(
"ResultFlag")
97 class_<VModuleWrap, boost::noncopyable>(
"VModule")
99 .def(
"Run", pure_virtual(
run))
std::string GetRegisteredModuleNames() const
Get list of all module builder names and module versions in the registry.
Report success to RunController.
virtual ResultFlag Finish()=0
Finish: invoked at end of the run (NOT end of the event)
Skip remaining modules in the current loop and continue with next iteration of the loop...
std::string GetConfig()
Get configuration in a string.
fwk::VModule &(fwk::RunController::* get_module)(const std::string &) const
fwk::VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)
Break current loop. It works for nested loops too!
fwk::VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
Auger Software Run Control.
void WriteConfig(std::string filename)
virtual ResultFlag Run(evt::Event &event)=0
Run: invoked once per event.
fwk::VModule::ResultFlag(fwk::VModule::* run)(evt::Event &)
int GetNumberOfRegisteredModules() const
Return number of registered modules.
ResultFlag
Flag returned by module methods to the RunController.
static CentralConfig * GetInstance()
Use this the first time you get an instance of central configuration.
fwk::VModule::ResultFlag Run(evt::Event &event)
Run: invoked once per event.
Report failure to RunController, causing RunController to terminate execution.
void WriteConfig(const std::string &fileName="")
Get the link name for moduleConfigLink with given id (any)
virtual ResultFlag Init()=0
Initialize: invoked at beginning of run (NOT beginning of event)
void Config(const std::string &infile)
VModule & GetModule(const std::string &moduleName) const
Get module by name.