Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

marlin::ProcessorMgr Class Reference

#include <ProcessorMgr.h>

List of all members.

Public Member Functions

bool addActiveProcessor (const std::string &processorType, const std::string &processorName, StringParameters *parameters, const std::string condition="true")
void removeActiveProcessor (const std::string &name)
ProcessorgetActiveProcessor (const std::string &name)
ProcessorgetProcessor (const std::string &type)
void dumpRegisteredProcessors ()
void dumpRegisteredProcessorsXML ()
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)
virtual void setProcessorReturnValue (Processor *proc, bool val)
virtual void setProcessorReturnValue (Processor *proc, bool val, const std::string &name)

Static Public Member Functions

ProcessorMgrinstance ()

Protected Member Functions

void registerProcessor (Processor *processor)
std::set< std::string > getAvailableProcessorTypes ()
 ProcessorMgr ()

Private Attributes

ProcessorMap _map
ProcessorMap _activeMap
ProcessorList _list
SkippedEventMap _skipMap
LogicalExpressions _conditions

Static Private Attributes

ProcessorMgr_me = 0

Friends

class Processor
class CMProcessor
class MarlinSteerCheck


Detailed Description

Processor manager singleton class. Holds references to all registered Processors.

Author:
F. Gaede, DESY
Version:
Id
ProcessorMgr.h,v 1.15 2006/12/18 16:11:49 gaede Exp

Definition at line 34 of file ProcessorMgr.h.


Constructor & Destructor Documentation

marlin::ProcessorMgr::ProcessorMgr  )  [inline, protected]
 

Definition at line 110 of file ProcessorMgr.h.


Member Function Documentation

bool marlin::ProcessorMgr::addActiveProcessor const std::string &  processorType,
const std::string &  processorName,
StringParameters parameters,
const std::string  condition = "true"
 

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.

Definition at line 165 of file ProcessorMgr.cc.

References _activeMap, _conditions, _list, marlin::LogicalExpressions::addCondition(), getProcessor(), marlin::Processor::newProcessor(), marlin::Processor::setName(), and marlin::Processor::setParameters().

Referenced by createProcessors().

void marlin::ProcessorMgr::dumpRegisteredProcessors  ) 
 

Dump information of all registered processors to stdout.

Definition at line 58 of file ProcessorMgr.cc.

References _map, marlin::Processor::end(), and marlin::Processor::printDescription().

Referenced by listAvailableProcessors().

void marlin::ProcessorMgr::dumpRegisteredProcessorsXML  ) 
 

Dump information of all registered processors in XML format to stdout.

Definition at line 93 of file ProcessorMgr.cc.

References _map, marlin::Processor::end(), and marlin::Processor::printDescriptionXML().

Referenced by listAvailableProcessorsXML().

void marlin::ProcessorMgr::end  )  [virtual]
 

Definition at line 280 of file ProcessorMgr.cc.

References _list, and _skipMap.

Referenced by createProcessors(), and main().

Processor * marlin::ProcessorMgr::getActiveProcessor const std::string &  name  ) 
 

Return the active processor with the given name. NULL if no processor exists.

Definition at line 152 of file ProcessorMgr.cc.

References _activeMap.

std::set< std::string > marlin::ProcessorMgr::getAvailableProcessorTypes  )  [protected]
 

Returns a list of all registered processors found

Definition at line 138 of file ProcessorMgr.cc.

References _map, and marlin::Processor::end().

Processor * marlin::ProcessorMgr::getProcessor const std::string &  type  ) 
 

Return the processor that has been registered with the given type. NULL if no processor exists.

Definition at line 148 of file ProcessorMgr.cc.

References _map.

Referenced by addActiveProcessor().

void marlin::ProcessorMgr::init  )  [virtual]
 

Definition at line 208 of file ProcessorMgr.cc.

References _list.

Referenced by main().

ProcessorMgr * marlin::ProcessorMgr::instance  )  [static]
 

Return the instance of this manager.

Definition at line 18 of file ProcessorMgr.cc.

References _me.

Referenced by createProcessors(), listAvailableProcessors(), listAvailableProcessorsXML(), and main().

virtual void marlin::ProcessorMgr::modifyEvent LCEvent  )  [inline, virtual]
 

Definition at line 88 of file ProcessorMgr.h.

virtual void marlin::ProcessorMgr::modifyRunHeader LCRunHeader  )  [inline, virtual]
 

Definition at line 87 of file ProcessorMgr.h.

void marlin::ProcessorMgr::processEvent LCEvent  )  [virtual]
 

Definition at line 225 of file ProcessorMgr.cc.

References _conditions, _list, _skipMap, marlin::LogicalExpressions::clear(), and marlin::LogicalExpressions::conditionIsTrue().

void marlin::ProcessorMgr::processRunHeader LCRunHeader  )  [virtual]
 

Definition at line 213 of file ProcessorMgr.cc.

References _list.

void marlin::ProcessorMgr::readDataSource int  numEvents  )  [virtual]
 

Calls readDataSource() for all Processors of type DataSourceProcessor.

Definition at line 44 of file ProcessorMgr.cc.

References _list, marlin::Processor::end(), and marlin::DataSourceProcessor::readDataSource().

Referenced by main().

void marlin::ProcessorMgr::registerProcessor Processor processor  )  [protected]
 

Register a processor with the given name.

Definition at line 26 of file ProcessorMgr.cc.

References _map, and marlin::Processor::type().

void marlin::ProcessorMgr::removeActiveProcessor const std::string &  name  ) 
 

Remove processor with name from list of active processors.

Definition at line 156 of file ProcessorMgr.cc.

References _activeMap, and _list.

void marlin::ProcessorMgr::setProcessorReturnValue Processor proc,
bool  val,
const std::string &  name
[virtual]
 

Set the named return value for the given processor

Definition at line 273 of file ProcessorMgr.cc.

References _conditions, marlin::Processor::name(), and marlin::LogicalExpressions::setValue().

void marlin::ProcessorMgr::setProcessorReturnValue Processor proc,
bool  val
[virtual]
 

Set the return value for the given processor

Definition at line 268 of file ProcessorMgr.cc.

References _conditions, marlin::Processor::name(), and marlin::LogicalExpressions::setValue().


Friends And Related Function Documentation

friend class CMProcessor [friend]
 

Definition at line 37 of file ProcessorMgr.h.

friend class MarlinSteerCheck [friend]
 

Definition at line 38 of file ProcessorMgr.h.

friend class Processor [friend]
 

Definition at line 36 of file ProcessorMgr.h.


Member Data Documentation

ProcessorMap marlin::ProcessorMgr::_activeMap [private]
 

Definition at line 115 of file ProcessorMgr.h.

Referenced by addActiveProcessor(), getActiveProcessor(), and removeActiveProcessor().

LogicalExpressions marlin::ProcessorMgr::_conditions [private]
 

Definition at line 119 of file ProcessorMgr.h.

Referenced by addActiveProcessor(), processEvent(), and setProcessorReturnValue().

ProcessorList marlin::ProcessorMgr::_list [private]
 

Definition at line 116 of file ProcessorMgr.h.

Referenced by addActiveProcessor(), end(), init(), processEvent(), processRunHeader(), readDataSource(), and removeActiveProcessor().

ProcessorMap marlin::ProcessorMgr::_map [private]
 

Definition at line 114 of file ProcessorMgr.h.

Referenced by dumpRegisteredProcessors(), dumpRegisteredProcessorsXML(), getAvailableProcessorTypes(), getProcessor(), and registerProcessor().

ProcessorMgr * marlin::ProcessorMgr::_me = 0 [static, private]
 

Definition at line 14 of file ProcessorMgr.cc.

Referenced by instance().

SkippedEventMap marlin::ProcessorMgr::_skipMap [private]
 

Definition at line 117 of file ProcessorMgr.h.

Referenced by end(), and processEvent().


The documentation for this class was generated from the following files:
Generated on Sun Jun 3 06:32:31 2007 for A TPC Tracking Environment by  doxygen 1.3.9.1