Processor manager singleton class. More...
#include <ProcessorMgr.h>
Public Member Functions | |
virtual | ~ProcessorMgr () |
destructor deletes ProcessorEventSeeder | |
bool | addActiveProcessor (const std::string &processorType, const std::string &processorName, std::shared_ptr< StringParameters > parameters, const std::string condition="true") |
Add a processor of type processorType with name processorName to the list of active processors. More... | |
void | removeActiveProcessor (const std::string &name) |
Remove processor with name from list of active processors. | |
Processor * | getActiveProcessor (const std::string &name) |
Return the active processor with the given name. More... | |
Processor * | getProcessor (const std::string &type) |
Return the processor that has been registered with the given type. More... | |
void | dumpRegisteredProcessors () |
Dump information of all registered processors to stdout. | |
void | dumpRegisteredProcessorsXML () |
Dump information of all registered processors in XML format to stdout. | |
virtual void | init () |
virtual void | processRunHeader (LCRunHeader *) |
virtual void | processEvent (LCEvent *) |
virtual void | end () |
virtual void | modifyRunHeader (LCRunHeader *) |
virtual void | modifyEvent (LCEvent *) |
virtual void | readDataSource (int numEvents) |
Calls readDataSource() for all Processors of type DataSourceProcessor. | |
virtual void | setProcessorReturnValue (Processor *proc, bool val) |
Set the return value for the given processor. | |
virtual void | setProcessorReturnValue (Processor *proc, bool val, const std::string &name) |
Set the named return value for the given processor. | |
Static Public Member Functions | |
static ProcessorMgr * | instance () |
Return the instance of this manager. | |
Protected Member Functions | |
void | registerProcessor (Processor *processor) |
Register a processor with the given name. | |
std::set< std::string > | getAvailableProcessorTypes () |
Returns a list of all registered processors found. | |
Friends | |
class | Processor |
class | CMProcessor |
class | MarlinSteerCheck |
Processor manager singleton class.
Holds references to all registered Processors.
Responsible for creating the instance of ProcessorEventSeeder and setting the Global::EVENTSEEDER variable.
bool marlin::ProcessorMgr::addActiveProcessor | ( | const std::string & | processorType, |
const std::string & | processorName, | ||
std::shared_ptr< StringParameters > | parameters, | ||
const std::string | condition = "true" |
||
) |
Add a processor of type processorType with name processorName to the list of active processors.
Initializes the parameters (if != 0).Add a processor of type processorType with name processorName to the list of active processors including a condition for the execution of the processEvent() method.
References marlin::LogicalExpressions::addCondition(), getProcessor(), marlin::Processor::newProcessor(), marlin::Processor::setName(), and marlin::Processor::setParameters().
Processor * marlin::ProcessorMgr::getActiveProcessor | ( | const std::string & | name | ) |
Return the active processor with the given name.
NULL if no processor exists.
Processor * marlin::ProcessorMgr::getProcessor | ( | const std::string & | type | ) |
Return the processor that has been registered with the given type.
NULL if no processor exists.
Referenced by addActiveProcessor().