Marlin  1.17.1
 All Classes Namespaces Functions Variables Enumerations Friends Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
marlin::ProcessorMgr Class Reference

Processor manager singleton class. More...

#include <ProcessorMgr.h>

Inheritance diagram for marlin::ProcessorMgr:

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.
 
ProcessorgetActiveProcessor (const std::string &name)
 Return the active processor with the given name. More...
 
ProcessorgetProcessor (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 ProcessorMgrinstance ()
 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
 

Detailed Description

Processor manager singleton class.

Holds references to all registered Processors.

Responsible for creating the instance of ProcessorEventSeeder and setting the Global::EVENTSEEDER variable.

Author
F. Gaede, DESY
Version
Id:
ProcessorMgr.h,v 1.16 2007-08-13 10:38:39 gaede Exp

Member Function Documentation

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().


The documentation for this class was generated from the following files: