Algorithm Class Reference

Base class from which all concrete algorithm classes should be derived. More...

#include <GaudiKernel/Algorithm.h>

Inheritance diagram for Algorithm:
Collaboration diagram for Algorithm:

Public Types

typedef Gaudi::PluginService::Factory< IAlgorithm *, const std::string &, ISvcLocator * > Factory
 
typedef Gaudi::PluginService::Factory< IAlgorithm *, const std::string &, ISvcLocator * > Factory
 
- Public Types inherited from implements< Interfaces >
using base_class = implements< Interfaces...>
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces...>
 Typedef to the base of this class. More...
 
using iids = typename extend_interfaces_base::ext_iids
 
using base_class = implements< Interfaces...>
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces...>
 Typedef to the base of this class. More...
 
using iids = typename extend_interfaces_base::ext_iids
 
- Public Types inherited from extend_interfaces< Interfaces...>
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type
 take union of the ext_iids of all Interfaces... More...
 
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type
 take union of the ext_iids of all Interfaces... More...
 

Public Member Functions

 Algorithm (const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
 Constructor. More...
 
 ~Algorithm () override=default
 Destructor. More...
 
StatusCode sysStart () override
 Reinitialization method invoked by the framework. More...
 
StatusCode sysInitialize () override
 Initialization method invoked by the framework. More...
 
StatusCode sysReinitialize () override
 Reinitialization method invoked by the framework. More...
 
StatusCode sysRestart () override
 Restart method invoked by the framework. More...
 
StatusCode sysExecute () override
 The actions to be performed by the algorithm on an event. More...
 
StatusCode sysStop () override
 System stop. More...
 
StatusCode sysFinalize () override
 System finalization. More...
 
StatusCode sysBeginRun () override
 beginRun method invoked by the framework. More...
 
StatusCode sysEndRun () override
 endRun method invoked by the framework. More...
 
const std::string & name () const override
 The identifying name of the algorithm object. More...
 
const std::string & type () const override
 The type of the algorithm object. More...
 
void setType (const std::string &type) override
 
const std::string & version () const override
 
unsigned int index () override
 
StatusCode configure () override
 Dummy implementation of IStateful::configure() method. More...
 
StatusCode terminate () override
 Dummy implementation of IStateful::terminate() method. More...
 
StatusCode initialize () override
 the default (empty) implementation of IStateful::initialize() method More...
 
StatusCode start () override
 the default (empty) implementation of IStateful::start() method More...
 
StatusCode stop () override
 the default (empty) implementation of IStateful::stop() method More...
 
StatusCode finalize () override
 the default (empty) implementation of IStateful::finalize() method More...
 
StatusCode reinitialize () override
 the default (empty) implementation of IStateful::reinitialize() method More...
 
StatusCode restart () override
 the default (empty) implementation of IStateful::restart() method More...
 
Gaudi::StateMachine::State FSMState () const override
 returns the current state of the algorithm More...
 
Gaudi::StateMachine::State targetFSMState () const override
 returns the state the algorithm will be in after the ongoing transition More...
 
bool isExecuted () const override
 Has this algorithm been executed since the last reset? More...
 
void setExecuted (bool state) override
 Set the executed flag to the specified state. More...
 
void resetExecuted () override
 Reset the executed state of the Algorithm for the duration of the current event. More...
 
StatusCode beginRun () override
 Algorithm begin run. More...
 
StatusCode endRun () override
 Algorithm end run. This method is called at the end of the event loop. More...
 
bool isEnabled () const override
 Is this algorithm enabled or disabled? More...
 
bool filterPassed () const override
 Did this algorithm pass or fail its filter criterion for the last event? More...
 
void setFilterPassed (bool state) override
 Set the filter passed flag to the specified state. More...
 
int errorCount () const
 Get the number of failures of the algorithm. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
SmartIF< IServiceservice (const std::string &name, const bool createIf=true, const bool quiet=false) const
 Return a pointer to the service identified by name (or "type/name") More...
 
template<class T >
SmartIF< T > service (const std::string &name, bool createIf=true, bool quiet=false) const
 
void setOutputLevel (int level)
 Set the output level for current algorithm. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
SmartIF< IChronoStatSvc > & chronoSvc () const
 The standard Chrono & Stat service, Return a pointer to the service if present. More...
 
SmartIF< IChronoStatSvc > & chronoStatService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IDataProviderSvc > & detSvc () const
 The standard detector data service. More...
 
SmartIF< IDataProviderSvc > & detDataService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IConversionSvc > & detCnvSvc () const
 The standard detector data persistency conversion service. More...
 
SmartIF< IConversionSvc > & detDataCnvService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IDataProviderSvc > & eventSvc () const
 The standard event data service. More...
 
SmartIF< IDataProviderSvc > & evtSvc () const
 shortcut for method eventSvc More...
 
SmartIF< IDataProviderSvc > & eventDataService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IConversionSvc > & eventCnvSvc () const
 The standard event data persistency conversion service. More...
 
SmartIF< IConversionSvc > & eventDataCnvService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IHistogramSvc > & histoSvc () const
 The standard histogram service. More...
 
SmartIF< IHistogramSvc > & histogramDataService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
SmartIF< IMessageSvc > & messageService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< INTupleSvc > & ntupleSvc () const
 The standard N tuple service. More...
 
SmartIF< INTupleSvc > & ntupleService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IRndmGenSvc > & randSvc () const
 AIDA-based NTuple service Returns a pointer to the AIDATuple service if present. More...
 
SmartIF< IToolSvc > & toolSvc () const
 The standard ToolSvc service, Return a pointer to the service if present. More...
 
SmartIF< IExceptionSvc > & exceptionSvc () const
 Get the exception Service. More...
 
SmartIF< IAlgContextSvc > & contextSvc () const
 get Algorithm Context Service More...
 
SmartIF< ITimelineSvc > & timelineSvc () const
 
SmartIF< ISvcLocator > & serviceLocator () const
 The standard service locator. More...
 
SmartIF< ISvcLocator > & svcLoc () const
 shortcut for method serviceLocator More...
 
SmartIF< IHiveWhiteBoard > & whiteboard () const
 
bool registerContext () const
 register for Algorithm Context Service? More...
 
StatusCode createSubAlgorithm (const std::string &type, const std::string &name, Algorithm *&pSubAlg)
 Create a sub algorithm. More...
 
const std::vector< Algorithm * > * subAlgorithms () const
 List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms. More...
 
std::vector< Algorithm * > * subAlgorithms ()
 List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms. More...
 
StatusCode setProperty (const Property &p) override
 Implementation of IProperty::setProperty. More...
 
StatusCode setProperty (const std::string &s) override
 Implementation of IProperty::setProperty. More...
 
StatusCode setProperty (const std::string &n, const std::string &v) override
 Implementation of IProperty::setProperty. More...
 
StatusCode getProperty (Property *p) const override
 Implementation of IProperty::getProperty. More...
 
const PropertygetProperty (const std::string &name) const override
 Implementation of IProperty::getProperty. More...
 
StatusCode getProperty (const std::string &n, std::string &v) const override
 Implementation of IProperty::getProperty. More...
 
const std::vector< Property * > & getProperties () const override
 Implementation of IProperty::getProperties. More...
 
bool hasProperty (const std::string &name) const override
 Implementation of IProperty::hasProperty. More...
 
StatusCode setProperties ()
 Set the algorithm's properties. More...
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
SmartIF< IMonitorSvc > & monitorSvc () const
 Access the monitor service. More...
 
template<class T >
void declareInfo (const std::string &name, const T &var, const std::string &desc) const
 Declare monitoring information. More...
 
void declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const
 Declare monitoring information (special case) More...
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
EventContextgetContext ()
 get the context More...
 
void setContext (EventContext *context)
 set the context More...
 
template<typename T >
 __attribute__ ((deprecated)) StatusCode declareDataObj(const std
 Declare data object. More...
 
template<class T >
StatusCode declareInput (const std::string &propertyName, DataObjectHandle< T > &handle, const std::string &address=DataObjectDescriptor::NULL_, bool optional=false, MinimalDataObjectHandle::AccessType accessType=MinimalDataObjectHandle::READ)
 Declare input data object. More...
 
template<class T >
StatusCode declareInput (const std::string &propertyName, DataObjectHandle< T > &handle, const std::vector< std::string > &addresses, bool optional=false, MinimalDataObjectHandle::AccessType accessType=MinimalDataObjectHandle::READ)
 Declare input data object. More...
 
template<class T >
StatusCode declareOutput (const std::string &propertyName, DataObjectHandle< T > &handle, const std::string &address=DataObjectDescriptor::NULL_, bool optional=false, MinimalDataObjectHandle::AccessType accessType=MinimalDataObjectHandle::WRITE)
 Declare output data object. More...
 
__attribute__((deprecated)) const std const DataObjectDescriptorCollectioninputDataObjects () const override
 Return the handles declared in the algorithm. More...
 
const DataObjectDescriptorCollectionoutputDataObjects () const override
 
void registerTool (IAlgTool *tool) const
 
void deregisterTool (IAlgTool *tool) const
 
template<class T >
StatusCode declarePrivateTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
 Declare used Private tool. More...
 
template<class T >
StatusCode declarePublicTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
 Declare used Public tool. More...
 
const std::vector< IAlgTool * > & tools () const
 
bool isClonable () const override
 Specifies the clonability of the algorithm. More...
 
unsigned int cardinality () const override
 Return the cardinality. More...
 
const std::vector< std::string > & neededResources () const override
 
 Algorithm (const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
 Constructor. More...
 
 ~Algorithm () override=default
 Destructor. More...
 
StatusCode sysStart () override
 Reinitialization method invoked by the framework. More...
 
StatusCode sysInitialize () override
 Initialization method invoked by the framework. More...
 
StatusCode sysReinitialize () override
 Reinitialization method invoked by the framework. More...
 
StatusCode sysRestart () override
 Restart method invoked by the framework. More...
 
StatusCode sysExecute () override
 The actions to be performed by the algorithm on an event. More...
 
StatusCode sysStop () override
 System stop. More...
 
StatusCode sysFinalize () override
 System finalization. More...
 
StatusCode sysBeginRun () override
 beginRun method invoked by the framework. More...
 
StatusCode sysEndRun () override
 endRun method invoked by the framework. More...
 
const std::string & name () const override
 The identifying name of the algorithm object. More...
 
const std::string & type () const override
 The type of the algorithm object. More...
 
void setType (const std::string &type) override
 
const std::string & version () const override
 
unsigned int index () override
 
StatusCode configure () override
 Dummy implementation of IStateful::configure() method. More...
 
StatusCode terminate () override
 Dummy implementation of IStateful::terminate() method. More...
 
StatusCode initialize () override
 the default (empty) implementation of IStateful::initialize() method More...
 
StatusCode start () override
 the default (empty) implementation of IStateful::start() method More...
 
StatusCode stop () override
 the default (empty) implementation of IStateful::stop() method More...
 
StatusCode finalize () override
 the default (empty) implementation of IStateful::finalize() method More...
 
StatusCode reinitialize () override
 the default (empty) implementation of IStateful::reinitialize() method More...
 
StatusCode restart () override
 the default (empty) implementation of IStateful::restart() method More...
 
Gaudi::StateMachine::State FSMState () const override
 returns the current state of the algorithm More...
 
Gaudi::StateMachine::State targetFSMState () const override
 returns the state the algorithm will be in after the ongoing transition More...
 
bool isExecuted () const override
 Has this algorithm been executed since the last reset? More...
 
void setExecuted (bool state) override
 Set the executed flag to the specified state. More...
 
void resetExecuted () override
 Reset the executed state of the Algorithm for the duration of the current event. More...
 
StatusCode beginRun () override
 Algorithm begin run. More...
 
StatusCode endRun () override
 Algorithm end run. This method is called at the end of the event loop. More...
 
bool isEnabled () const override
 Is this algorithm enabled or disabled? More...
 
bool filterPassed () const override
 Did this algorithm pass or fail its filter criterion for the last event? More...
 
void setFilterPassed (bool state) override
 Set the filter passed flag to the specified state. More...
 
int errorCount () const
 Get the number of failures of the algorithm. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
SmartIF< IServiceservice (const std::string &name, const bool createIf=true, const bool quiet=false) const
 Return a pointer to the service identified by name (or "type/name") More...
 
template<class T >
SmartIF< T > service (const std::string &name, bool createIf=true, bool quiet=false) const
 
void setOutputLevel (int level)
 Set the output level for current algorithm. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
SmartIF< IChronoStatSvc > & chronoSvc () const
 The standard Chrono & Stat service, Return a pointer to the service if present. More...
 
SmartIF< IChronoStatSvc > & chronoStatService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IDataProviderSvc > & detSvc () const
 The standard detector data service. More...
 
SmartIF< IDataProviderSvc > & detDataService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IConversionSvc > & detCnvSvc () const
 The standard detector data persistency conversion service. More...
 
SmartIF< IConversionSvc > & detDataCnvService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IDataProviderSvc > & eventSvc () const
 The standard event data service. More...
 
SmartIF< IDataProviderSvc > & evtSvc () const
 shortcut for method eventSvc More...
 
SmartIF< IDataProviderSvc > & eventDataService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IConversionSvc > & eventCnvSvc () const
 The standard event data persistency conversion service. More...
 
SmartIF< IConversionSvc > & eventDataCnvService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IHistogramSvc > & histoSvc () const
 The standard histogram service. More...
 
SmartIF< IHistogramSvc > & histogramDataService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
SmartIF< IMessageSvc > & messageService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< INTupleSvc > & ntupleSvc () const
 The standard N tuple service. More...
 
SmartIF< INTupleSvc > & ntupleService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IRndmGenSvc > & randSvc () const
 AIDA-based NTuple service Returns a pointer to the AIDATuple service if present. More...
 
SmartIF< IToolSvc > & toolSvc () const
 The standard ToolSvc service, Return a pointer to the service if present. More...
 
SmartIF< IExceptionSvc > & exceptionSvc () const
 Get the exception Service. More...
 
SmartIF< IAlgContextSvc > & contextSvc () const
 get Algorithm Context Service More...
 
SmartIF< ITimelineSvc > & timelineSvc () const
 
SmartIF< ISvcLocator > & serviceLocator () const
 The standard service locator. More...
 
SmartIF< ISvcLocator > & svcLoc () const
 shortcut for method serviceLocator More...
 
SmartIF< IHiveWhiteBoard > & whiteboard () const
 
bool registerContext () const
 register for Algorithm Context Service? More...
 
StatusCode createSubAlgorithm (const std::string &type, const std::string &name, Algorithm *&pSubAlg)
 Create a sub algorithm. More...
 
const std::vector< Algorithm * > * subAlgorithms () const
 List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms. More...
 
std::vector< Algorithm * > * subAlgorithms ()
 List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms. More...
 
StatusCode setProperty (const Property &p) override
 Implementation of IProperty::setProperty. More...
 
StatusCode setProperty (const std::string &s) override
 Implementation of IProperty::setProperty. More...
 
StatusCode setProperty (const std::string &n, const std::string &v) override
 Implementation of IProperty::setProperty. More...
 
StatusCode getProperty (Property *p) const override
 Implementation of IProperty::getProperty. More...
 
const PropertygetProperty (const std::string &name) const override
 Implementation of IProperty::getProperty. More...
 
StatusCode getProperty (const std::string &n, std::string &v) const override
 Implementation of IProperty::getProperty. More...
 
const std::vector< Property * > & getProperties () const override
 Implementation of IProperty::getProperties. More...
 
bool hasProperty (const std::string &name) const override
 Implementation of IProperty::hasProperty. More...
 
StatusCode setProperties ()
 Set the algorithm's properties. More...
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
SmartIF< IMonitorSvc > & monitorSvc () const
 Access the monitor service. More...
 
template<class T >
void declareInfo (const std::string &name, const T &var, const std::string &desc) const
 Declare monitoring information. More...
 
void declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const
 Declare monitoring information (special case) More...
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
EventContextgetContext ()
 get the context More...
 
void setContext (EventContext *context)
 set the context More...
 
template<typename T >
 __attribute__ ((deprecated)) StatusCode declareDataObj(const std
 Declare data object. More...
 
template<class T >
StatusCode declareInput (const std::string &propertyName, DataObjectHandle< T > &handle, const std::string &address=DataObjectDescriptor::NULL_, bool optional=false, MinimalDataObjectHandle::AccessType accessType=MinimalDataObjectHandle::READ)
 Declare input data object. More...
 
template<class T >
StatusCode declareInput (const std::string &propertyName, DataObjectHandle< T > &handle, const std::vector< std::string > &addresses, bool optional=false, MinimalDataObjectHandle::AccessType accessType=MinimalDataObjectHandle::READ)
 Declare input data object. More...
 
template<class T >
StatusCode declareOutput (const std::string &propertyName, DataObjectHandle< T > &handle, const std::string &address=DataObjectDescriptor::NULL_, bool optional=false, MinimalDataObjectHandle::AccessType accessType=MinimalDataObjectHandle::WRITE)
 Declare output data object. More...
 
__attribute__((deprecated)) const std const DataObjectDescriptorCollectioninputDataObjects () const override
 Return the handles declared in the algorithm. More...
 
const DataObjectDescriptorCollectionoutputDataObjects () const override
 
void registerTool (IAlgTool *tool) const
 
void deregisterTool (IAlgTool *tool) const
 
template<class T >
StatusCode declarePrivateTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
 Declare used Private tool. More...
 
template<class T >
StatusCode declarePublicTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
 Declare used Public tool. More...
 
const std::vector< IAlgTool * > & tools () const
 
bool isClonable () const override
 Specifies the clonability of the algorithm. More...
 
unsigned int cardinality () const override
 Return the cardinality. More...
 
const std::vector< std::string > & neededResources () const override
 
- Public Member Functions inherited from implements< Interfaces >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::string > getInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
 implements ()=default
 Default constructor. More...
 
 implements (const implements &)
 Copy constructor (zero the reference count) More...
 
implementsoperator= (const implements &)
 Assignment operator (do not touch the reference count). More...
 
 ~implements () override=default
 Virtual destructor. More...
 
unsigned long addRef () override
 Reference Interface instance. More...
 
unsigned long release () override
 Release Interface instance. More...
 
unsigned long refCount () const override
 Current reference count. More...
 
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::string > getInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
 implements ()=default
 Default constructor. More...
 
 implements (const implements &)
 Copy constructor (zero the reference count) More...
 
implementsoperator= (const implements &)
 Assignment operator (do not touch the reference count). More...
 
 ~implements () override=default
 Virtual destructor. More...
 
unsigned long addRef () override
 Reference Interface instance. More...
 
unsigned long release () override
 Release Interface instance. More...
 
unsigned long refCount () const override
 Current reference count. More...
 
- Public Member Functions inherited from extend_interfaces< Interfaces...>
 ~extend_interfaces () override=default
 Virtual destructor. More...
 
 ~extend_interfaces () override=default
 Virtual destructor. More...
 

Protected Member Functions

DataObjectDescriptorCollectioninputDataObjects ()
 
DataObjectDescriptorCollectionoutputDataObjects ()
 
std::vector< IAlgTool * > & tools ()
 
void addSubAlgorithmDataObjectHandles ()
 
bool isInitialized () const override
 Has the Algorithm already been initialized? More...
 
bool isFinalized () const override
 Has the Algorithm already been finalized? More...
 
int outputLevel () const
 retrieve the Algorithm output level More...
 
IntegerPropertyoutputLevelProperty ()
 Accessor for the Message level property. More...
 
void initOutputLevel (Property &prop)
 Callback for output level property. More...
 
DataObjectDescriptorCollectioninputDataObjects ()
 
DataObjectDescriptorCollectionoutputDataObjects ()
 
std::vector< IAlgTool * > & tools ()
 
void addSubAlgorithmDataObjectHandles ()
 
bool isInitialized () const override
 Has the Algorithm already been initialized? More...
 
bool isFinalized () const override
 Has the Algorithm already been finalized? More...
 
int outputLevel () const
 retrieve the Algorithm output level More...
 
IntegerPropertyoutputLevelProperty ()
 Accessor for the Message level property. More...
 
void initOutputLevel (Property &prop)
 Callback for output level property. More...
 

Protected Attributes

EventContextm_event_context
 Event specific data for multiple event processing. More...
 
- Protected Attributes inherited from implements< Interfaces >
std::atomic_ulong m_refCount = {0}
 Reference counter. More...
 

Private Member Functions

void initToolHandles () const
 
StatusCode service_i (const std::string &svcName, bool createIf, const InterfaceID &iid, void **ppSvc) const
 implementation of service method More...
 
StatusCode service_i (const std::string &svcType, const std::string &svcName, const InterfaceID &iid, void **ppSvc) const
 
 Algorithm (const Algorithm &a)
 Private Copy constructor: NO COPY ALLOWED. More...
 
Algorithmoperator= (const Algorithm &rhs)
 Private assignment operator: NO ASSIGNMENT ALLOWED. More...
 
void initToolHandles () const
 
StatusCode service_i (const std::string &svcName, bool createIf, const InterfaceID &iid, void **ppSvc) const
 implementation of service method More...
 
StatusCode service_i (const std::string &svcType, const std::string &svcName, const InterfaceID &iid, void **ppSvc) const
 
 Algorithm (const Algorithm &a)
 Private Copy constructor: NO COPY ALLOWED. More...
 
Algorithmoperator= (const Algorithm &rhs)
 Private assignment operator: NO ASSIGNMENT ALLOWED. More...
 

Private Attributes

std::string m_name
 Algorithm's name for identification. More...
 
std::string m_type
 Algorithm's type. More...
 
std::string m_version
 Algorithm's version. More...
 
unsigned int m_index
 Algorithm's index. More...
 
std::vector< Algorithm * > m_subAlgms
 Sub algorithms. More...
 
DataObjectDescriptorCollection m_inputDataObjects
 
DataObjectDescriptorCollection m_outputDataObjects
 
std::vector< IAlgTool * > m_tools
 
std::vector< BaseToolHandle * > m_toolHandles
 
SmartIF< IMessageSvcm_MS
 Message service. More...
 
SmartIF< IDataProviderSvcm_EDS
 Event data service. More...
 
SmartIF< IHiveWhiteBoardm_WB
 Event data service (whiteboard) More...
 
SmartIF< IConversionSvcm_ECS
 Event conversion service. More...
 
SmartIF< IDataProviderSvcm_DDS
 Detector data service. More...
 
SmartIF< IConversionSvcm_DCS
 Detector conversion service. More...
 
SmartIF< IHistogramSvcm_HDS
 Histogram data service. More...
 
SmartIF< INTupleSvcm_NTS
 N tuple service. More...
 
SmartIF< IChronoStatSvcm_CSS
 Chrono & Stat Service. More...
 
SmartIF< IRndmGenSvcm_RGS
 Random Number Generator Service. More...
 
SmartIF< IExceptionSvcm_EXS
 Exception Handler Service. More...
 
SmartIF< IAuditorSvcm_pAuditorSvc
 Auditor Service. More...
 
SmartIF< IToolSvcm_ptoolSvc
 ToolSvc Service. More...
 
SmartIF< IMonitorSvcm_pMonitorSvc
 Online Monitoring Service. More...
 
SmartIF< IAlgContextSvcm_contextSvc
 Algorithm Context Service. More...
 
SmartIF< ITimelineSvcm_timelineSvc
 Timeline Service. More...
 
bool m_registerContext = false
 flag to register for Algorithm Context Service More...
 
std::string m_monitorSvcName
 Name to use for Monitor Service. More...
 
SmartIF< ISvcLocatorm_pSvcLocator
 Pointer to service locator service. More...
 
SmartIF< PropertyMgrm_propertyMgr
 For management of properties. More...
 
IntegerProperty m_outputLevel
 Algorithm output level. More...
 
int m_errorMax
 Algorithm Max number of errors. More...
 
int m_errorCount
 Algorithm error counter. More...
 
BooleanProperty m_auditInit
 global flag for auditors More...
 
bool m_auditorInitialize
 flag for auditors in "initialize()" More...
 
bool m_auditorReinitialize
 flag for auditors in "Reinitialize()" More...
 
bool m_auditorRestart
 flag for auditors in "Restart()" More...
 
bool m_auditorExecute
 flag for auditors in "execute()" More...
 
bool m_auditorFinalize
 flag for auditors in "finalize()" More...
 
bool m_auditorBeginRun
 flag for auditors in "beginRun()" More...
 
bool m_auditorEndRun
 flag for auditors in "endRun()" More...
 
bool m_auditorStart
 flag for auditors in "initialize()" More...
 
bool m_auditorStop
 flag for auditors in "Reinitialize()" More...
 
bool m_filterPassed = true
 Filter passed flag. More...
 
bool m_isEnabled = true
 Algorithm is enabled flag. More...
 
bool m_isExecuted = false
 Algorithm is executed flag. More...
 
bool m_toolHandlesInit = false
 
Gaudi::StateMachine::State m_state = Gaudi::StateMachine::CONFIGURED
 flag indicating whether ToolHandle tools have been added to m_tools More...
 
Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::CONFIGURED
 Algorithm has been initialized flag. More...
 
bool m_isFinalized
 Algorithm has been finalized flag. More...
 
bool m_doTimeline
 
bool m_isClonable
 The algorithm clonability of the algorithm. More...
 
unsigned int m_cardinality
 The maximum number of clones that can exist. More...
 
std::vector< std::string > m_neededResources
 The named resources needed during event looping. More...
 

Detailed Description

Base class from which all concrete algorithm classes should be derived.

In order for a concrete algorithm class to do anything useful the methods initialize(), execute() and finalize() should be overridden.

The base class provides utility methods for accessing standard services (event data service etc.); for declaring properties which may be configured by the job options service; and for creating sub algorithms. The only base class functionality which may be used in the constructor of a concrete algorithm is the declaration of member variables as properties. All other functionality, i.e. the use of services and the creation of sub-algorithms, may be used only in initialize() and afterwards (see the Gaudi user guide).

Author
Paul Maley
Pere Mato
David Quarrie
Date
1998

Definition at line 77 of file Algorithm.h.

Member Typedef Documentation

Definition at line 82 of file Algorithm.h.

Definition at line 82 of file Algorithm.h.

Constructor & Destructor Documentation

Algorithm::Algorithm ( const std::string &  name,
ISvcLocator svcloc,
const std::string &  version = PACKAGE_VERSION 
)

Constructor.

Parameters
nameThe algorithm object's name
svclocA pointer to a service location service

Definition at line 39 of file Algorithm.cpp.

41  { sc = PyInt_AS_LONG( r ) ; Py_DECREF( r ) ; return sc ; } // RETURN
42 
43  // look for the method getCode with the signature:
44  // ' int getCode() '
45  PyObject* c = PyObject_CallMethod(r, chr("getCode"), nullptr);
46 
47  if ( !c ) { PyErr_Print() ; }
48  else if ( PyLong_Check( c )) { sc = PyLong_AsLong( c ); }
49  else
50  {
51  std::string msg( " call_python_method unexpected type from '" );
52  msg += method ;
53  msg += "().getCode()' " ;
54  PyErr_SetString( PyExc_TypeError , msg.c_str() ) ;
55  PyErr_Print() ;
56  }
57  // release used objects
58  Py_XDECREF( c ) ;
59  Py_XDECREF( r ) ;
60  //
61  return sc;
62 }
63 // ============================================================================
64 
65 // ============================================================================
70 // ============================================================================
72 ( PyObject* self ,
73  const std::string& name )
74  : Algorithm ( name , Gaudi::svcLocator() )
75  , m_self ( self )
76 {
77  // The owner of the Algorithm is Python (as creator) therefore
78  // it should not be deleted by Gaudi (added an extra addRef()).
79  addRef() ;
80  addRef() ;
81 }
82 // ============================================================================
83 
84 // ============================================================================
86 { return GaudiPython::call_python_method ( m_self , "initialize" ) ; }
87 // ============================================================================
89 { return GaudiPython::call_python_method ( m_self , "start" ) ; }
90 // ============================================================================
92 { return GaudiPython::call_python_method ( m_self , "execute" ) ; }
93 // ============================================================================
95 { return GaudiPython::call_python_method ( m_self , "stop" ) ; }
96 // ============================================================================
98 { return GaudiPython::call_python_method ( m_self , "finalize" ) ; }
tuple c
Definition: gaudirun.py:391
PyAlgorithm(PyObject *self, const std::string &name)
constructor
Definition: Algorithm.cpp:72
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
GAUDI_API ISvcLocator * svcLocator()
StatusCode initialize()
Definition: Algorithm.cpp:85
unsigned long addRef() override
Reference Interface instance.
Definition: implements.h:44
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:29
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:77
Helper functions to set/get the application return code.
Definition: __init__.py:1
Algorithm::~Algorithm ( )
overridedefault

Destructor.

Algorithm::Algorithm ( const Algorithm a)
private

Private Copy constructor: NO COPY ALLOWED.

Algorithm::Algorithm ( const std::string &  name,
ISvcLocator svcloc,
const std::string &  version = PACKAGE_VERSION 
)

Constructor.

Parameters
nameThe algorithm object's name
svclocA pointer to a service location service
Algorithm::~Algorithm ( )
overridedefault

Destructor.

Algorithm::Algorithm ( const Algorithm a)
private

Private Copy constructor: NO COPY ALLOWED.

Member Function Documentation

template<typename T >
Algorithm::__attribute__ ( (deprecated)  ) const
inline

Declare data object.

Definition at line 560 of file Algorithm.h.

563  {
564 
565  // GCCXML cannot understand c++11 yet, NULL used.
566  std::string::size_type slashPos = address.find_last_of('/');
567  std::string tag = address.substr(slashPos != std::string::npos ? slashPos : 0);
568 
569  if(accesstype == MinimalDataObjectHandle::READ || accesstype == MinimalDataObjectHandle::UPDATE)
570  return declareInput<T>(tag, *doh, address, is_optional, accesstype);
571  else
572  return declareOutput<T>(tag, *doh, address, is_optional, accesstype);
573 
574  }
Read only access to the data object.
Update of data object is allowed.
template<typename T >
Algorithm::__attribute__ ( (deprecated)  ) const
inline

Declare data object.

Definition at line 560 of file Algorithm.h.

563  {
564 
565  // GCCXML cannot understand c++11 yet, NULL used.
566  std::string::size_type slashPos = address.find_last_of('/');
567  std::string tag = address.substr(slashPos != std::string::npos ? slashPos : 0);
568 
569  if(accesstype == MinimalDataObjectHandle::READ || accesstype == MinimalDataObjectHandle::UPDATE)
570  return declareInput<T>(tag, *doh, address, is_optional, accesstype);
571  else
572  return declareOutput<T>(tag, *doh, address, is_optional, accesstype);
573 
574  }
Read only access to the data object.
Update of data object is allowed.
void Algorithm::addSubAlgorithmDataObjectHandles ( )
protected

Definition at line 1170 of file Algorithm.cpp.

void Algorithm::addSubAlgorithmDataObjectHandles ( )
protected
SmartIF<IAuditorSvc>& Algorithm::auditorSvc ( ) const

The standard auditor service.May not be invoked before sysInitialize() has been invoked.

SmartIF<IAuditorSvc>& Algorithm::auditorSvc ( ) const

The standard auditor service.May not be invoked before sysInitialize() has been invoked.

StatusCode Algorithm::beginRun ( )
override

Algorithm begin run.

This method is called at the beginning of the event loop.

StatusCode Algorithm::beginRun ( )
override

Algorithm begin run.

This method is called at the beginning of the event loop.

Definition at line 576 of file Algorithm.cpp.

unsigned int Algorithm::cardinality ( ) const
inlineoverride

Return the cardinality.

Definition at line 822 of file Algorithm.h.

822 { return m_cardinality; }
unsigned int m_cardinality
The maximum number of clones that can exist.
Definition: Algorithm.h:911
unsigned int Algorithm::cardinality ( ) const
inlineoverride

Return the cardinality.

Definition at line 822 of file Algorithm.h.

822 { return m_cardinality; }
unsigned int m_cardinality
The maximum number of clones that can exist.
Definition: Algorithm.h:911
SmartIF<IChronoStatSvc>& Algorithm::chronoStatService ( ) const

Obsoleted name, kept due to the backwards compatibility.

SmartIF< IChronoStatSvc > & Algorithm::chronoStatService ( ) const

Obsoleted name, kept due to the backwards compatibility.

Definition at line 1013 of file Algorithm.cpp.

SmartIF<IChronoStatSvc>& Algorithm::chronoSvc ( ) const

The standard Chrono & Stat service, Return a pointer to the service if present.

SmartIF<IChronoStatSvc>& Algorithm::chronoSvc ( ) const

The standard Chrono & Stat service, Return a pointer to the service if present.

StatusCode Algorithm::configure ( )
inlineoverride

Dummy implementation of IStateful::configure() method.

Definition at line 175 of file Algorithm.h.

StatusCode Algorithm::configure ( )
inlineoverride

Dummy implementation of IStateful::configure() method.

Definition at line 175 of file Algorithm.h.

SmartIF<IAlgContextSvc>& Algorithm::contextSvc ( ) const

get Algorithm Context Service

SmartIF<IAlgContextSvc>& Algorithm::contextSvc ( ) const

get Algorithm Context Service

StatusCode Algorithm::createSubAlgorithm ( const std::string &  type,
const std::string &  name,
Algorithm *&  pSubAlg 
)

Create a sub algorithm.

A call to this method creates a child algorithm object. Note that the returned pointer is to Algorithm (as opposed to IAlgorithm), and thus the methods of IProperty are also available for the direct setting of the sub-algorithm's properties. Using this mechanism instead of creating daughter algorithms directly via the new operator is prefered since then the framework may take care of all of the necessary book-keeping.

Parameters
typeThe concrete algorithm class of the sub algorithm
nameThe name to be given to the sub algorithm
pSubAlgSet to point to the newly created algorithm object

Definition at line 1070 of file Algorithm.cpp.

StatusCode Algorithm::createSubAlgorithm ( const std::string &  type,
const std::string &  name,
Algorithm *&  pSubAlg 
)

Create a sub algorithm.

A call to this method creates a child algorithm object. Note that the returned pointer is to Algorithm (as opposed to IAlgorithm), and thus the methods of IProperty are also available for the direct setting of the sub-algorithm's properties. Using this mechanism instead of creating daughter algorithms directly via the new operator is prefered since then the framework may take care of all of the necessary book-keeping.

Parameters
typeThe concrete algorithm class of the sub algorithm
nameThe name to be given to the sub algorithm
pSubAlgSet to point to the newly created algorithm object
template<class T >
void Algorithm::declareInfo ( const std::string &  name,
const T &  var,
const std::string &  desc 
) const
inline

Declare monitoring information.

Parameters
nameMonitoring information name known to the external system
varMonitoring Listener address (the item to monitor...)
descTextual description of the information being monitored

Definition at line 475 of file Algorithm.h.

478  {
479  IMonitorSvc* mS = monitorSvc().get();
480  if ( mS ) mS->declareInfo(name, var, desc, this);
481  }
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:21
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
Definition: Algorithm.h:460
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
template<class T >
void Algorithm::declareInfo ( const std::string &  name,
const T &  var,
const std::string &  desc 
) const
inline

Declare monitoring information.

Parameters
nameMonitoring information name known to the external system
varMonitoring Listener address (the item to monitor...)
descTextual description of the information being monitored

Definition at line 475 of file Algorithm.h.

478  {
479  IMonitorSvc* mS = monitorSvc().get();
480  if ( mS ) mS->declareInfo(name, var, desc, this);
481  }
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:21
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
Definition: Algorithm.h:460
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
void Algorithm::declareInfo ( const std::string &  name,
const std::string &  format,
const void *  var,
int  size,
const std::string &  desc 
) const
inline

Declare monitoring information (special case)

Parameters
nameMonitoring information name known to the external system
formatFormat information
varMonitoring Listener address
sizeMonitoring Listener address size
descTextual description of the information being monitored

Definition at line 490 of file Algorithm.h.

495  {
496  IMonitorSvc* mS = monitorSvc().get();
497  if ( mS ) mS->declareInfo(name, format, var, size, desc, this);
498  }
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:21
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
Definition: Algorithm.h:460
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
void Algorithm::declareInfo ( const std::string &  name,
const std::string &  format,
const void *  var,
int  size,
const std::string &  desc 
) const
inline

Declare monitoring information (special case)

Parameters
nameMonitoring information name known to the external system
formatFormat information
varMonitoring Listener address
sizeMonitoring Listener address size
descTextual description of the information being monitored

Definition at line 490 of file Algorithm.h.

495  {
496  IMonitorSvc* mS = monitorSvc().get();
497  if ( mS ) mS->declareInfo(name, format, var, size, desc, this);
498  }
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:21
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
Definition: Algorithm.h:460
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
template<class T >
StatusCode Algorithm::declareInput ( const std::string &  propertyName,
DataObjectHandle< T > &  handle,
const std::string &  address = DataObjectDescriptor::NULL_,
bool  optional = false,
MinimalDataObjectHandle::AccessType  accessType = MinimalDataObjectHandle::READ 
)
inline

Declare input data object.

Parameters
propertyNameto identify input object in python config
handledata handle
addressrelative or absolute address in TES
optionaloptional input
accessTyperead, write or update

Definition at line 586 of file Algorithm.h.

589  {
590 
591  bool res = m_inputDataObjects.insert(propertyName, &handle);
592 
593  handle.descriptor()->setTag(propertyName);
594  handle.descriptor()->setAddress(address);
595  handle.descriptor()->setAccessType(accessType);
596  handle.descriptor()->setOptional(optional);
597 
598  handle.setOwner(this);
599 
600  MsgStream log(msgSvc(), name());
601 
602  if (LIKELY(res)) {
603  log << MSG::DEBUG << "Handle for " << propertyName << " ("
604  << address << ")" << " successfully created and stored."
605  << endmsg;
606  } else {
607  log << MSG::ERROR << "Handle for " << propertyName << " ("
608  << address << ")" << " could not be created." << endmsg;
609  }
610 
611  return res;
612 
613  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
DataObjectDescriptor * descriptor()
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
void setTag(const std::string &tag)
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
void setAddress(const std::string &address)
void setOptional(bool optional)
bool insert(const std::string &tag, MinimalDataObjectHandle *descriptor)
void setAccessType(MinimalDataObjectHandle::AccessType accessType)
void setOwner(IAlgorithm *fatherAlg)
#define LIKELY(x)
Definition: Kernel.h:125
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
DataObjectDescriptorCollection m_inputDataObjects
Definition: Algorithm.h:855
template<class T >
StatusCode Algorithm::declareInput ( const std::string &  propertyName,
DataObjectHandle< T > &  handle,
const std::string &  address = DataObjectDescriptor::NULL_,
bool  optional = false,
MinimalDataObjectHandle::AccessType  accessType = MinimalDataObjectHandle::READ 
)
inline

Declare input data object.

Parameters
propertyNameto identify input object in python config
handledata handle
addressrelative or absolute address in TES
optionaloptional input
accessTyperead, write or update

Definition at line 586 of file Algorithm.h.

589  {
590 
591  bool res = m_inputDataObjects.insert(propertyName, &handle);
592 
593  handle.descriptor()->setTag(propertyName);
594  handle.descriptor()->setAddress(address);
595  handle.descriptor()->setAccessType(accessType);
596  handle.descriptor()->setOptional(optional);
597 
598  handle.setOwner(this);
599 
600  MsgStream log(msgSvc(), name());
601 
602  if (LIKELY(res)) {
603  log << MSG::DEBUG << "Handle for " << propertyName << " ("
604  << address << ")" << " successfully created and stored."
605  << endmsg;
606  } else {
607  log << MSG::ERROR << "Handle for " << propertyName << " ("
608  << address << ")" << " could not be created." << endmsg;
609  }
610 
611  return res;
612 
613  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
DataObjectDescriptor * descriptor()
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
void setTag(const std::string &tag)
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
void setAddress(const std::string &address)
void setOptional(bool optional)
bool insert(const std::string &tag, MinimalDataObjectHandle *descriptor)
void setAccessType(MinimalDataObjectHandle::AccessType accessType)
void setOwner(IAlgorithm *fatherAlg)
#define LIKELY(x)
Definition: Kernel.h:125
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
DataObjectDescriptorCollection m_inputDataObjects
Definition: Algorithm.h:855
template<class T >
StatusCode Algorithm::declareInput ( const std::string &  propertyName,
DataObjectHandle< T > &  handle,
const std::vector< std::string > &  addresses,
bool  optional = false,
MinimalDataObjectHandle::AccessType  accessType = MinimalDataObjectHandle::READ 
)
inline

Declare input data object.

Parameters
propertyNameto identify input object in python config
handledata handle
addressesrelative or absolute addresses in TES, first is main address
optionaloptional input
accessTyperead, write or update

Definition at line 625 of file Algorithm.h.

628  {
629 
630  bool res = m_inputDataObjects.insert(propertyName, &handle);
631 
632  handle.descriptor()->setTag(propertyName);
633  handle.descriptor()->setAddresses(addresses);
634  handle.descriptor()->setAccessType(accessType);
635  handle.descriptor()->setOptional(optional);
636 
637  handle.setOwner(this);
638 
639  MsgStream log(msgSvc(), name());
640 
641  if (LIKELY(res)) {
642  log << MSG::DEBUG << "Handle for " << propertyName << " ("
643  << (addresses.empty() ? DataObjectDescriptor::NULL_ : addresses[0]) << ")" << " successfully created and stored."
644  << endmsg;
645  } else {
646  log << MSG::ERROR << "Handle for " << propertyName << " ("
647  << (addresses.empty() ? DataObjectDescriptor::NULL_ : addresses[0]) << ")" << " could not be created." << endmsg;
648  }
649 
650  return res;
651 
652  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
DataObjectDescriptor * descriptor()
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
void setTag(const std::string &tag)
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
void setAddresses(const std::vector< std::string > &address)
void setOptional(bool optional)
bool insert(const std::string &tag, MinimalDataObjectHandle *descriptor)
void setAccessType(MinimalDataObjectHandle::AccessType accessType)
static const std::string NULL_
void setOwner(IAlgorithm *fatherAlg)
#define LIKELY(x)
Definition: Kernel.h:125
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
DataObjectDescriptorCollection m_inputDataObjects
Definition: Algorithm.h:855
template<class T >
StatusCode Algorithm::declareInput ( const std::string &  propertyName,
DataObjectHandle< T > &  handle,
const std::vector< std::string > &  addresses,
bool  optional = false,
MinimalDataObjectHandle::AccessType  accessType = MinimalDataObjectHandle::READ 
)
inline

Declare input data object.

Parameters
propertyNameto identify input object in python config
handledata handle
addressesrelative or absolute addresses in TES, first is main address
optionaloptional input
accessTyperead, write or update

Definition at line 625 of file Algorithm.h.

628  {
629 
630  bool res = m_inputDataObjects.insert(propertyName, &handle);
631 
632  handle.descriptor()->setTag(propertyName);
633  handle.descriptor()->setAddresses(addresses);
634  handle.descriptor()->setAccessType(accessType);
635  handle.descriptor()->setOptional(optional);
636 
637  handle.setOwner(this);
638 
639  MsgStream log(msgSvc(), name());
640 
641  if (LIKELY(res)) {
642  log << MSG::DEBUG << "Handle for " << propertyName << " ("
643  << (addresses.empty() ? DataObjectDescriptor::NULL_ : addresses[0]) << ")" << " successfully created and stored."
644  << endmsg;
645  } else {
646  log << MSG::ERROR << "Handle for " << propertyName << " ("
647  << (addresses.empty() ? DataObjectDescriptor::NULL_ : addresses[0]) << ")" << " could not be created." << endmsg;
648  }
649 
650  return res;
651 
652  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
DataObjectDescriptor * descriptor()
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
void setTag(const std::string &tag)
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
void setAddresses(const std::vector< std::string > &address)
void setOptional(bool optional)
bool insert(const std::string &tag, MinimalDataObjectHandle *descriptor)
void setAccessType(MinimalDataObjectHandle::AccessType accessType)
static const std::string NULL_
void setOwner(IAlgorithm *fatherAlg)
#define LIKELY(x)
Definition: Kernel.h:125
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
DataObjectDescriptorCollection m_inputDataObjects
Definition: Algorithm.h:855
template<class T >
StatusCode Algorithm::declareOutput ( const std::string &  propertyName,
DataObjectHandle< T > &  handle,
const std::string &  address = DataObjectDescriptor::NULL_,
bool  optional = false,
MinimalDataObjectHandle::AccessType  accessType = MinimalDataObjectHandle::WRITE 
)
inline

Declare output data object.

Parameters
propertyNameto identify input object in python config
handledata handle
addressrelative or absolute address in TES
optionaloptional input
accessTypewrite or update

Definition at line 663 of file Algorithm.h.

666  {
667 
668  bool res = m_outputDataObjects.insert(propertyName, &handle);
669 
670  handle.descriptor()->setTag(propertyName);
671  handle.descriptor()->setAddress(address);
672  handle.descriptor()->setAccessType(accessType);
673  handle.descriptor()->setOptional(optional);
674 
675  handle.setOwner(this);
676 
677 
678  MsgStream log(msgSvc(), name());
679 
680  if (LIKELY(res)) {
681  log << MSG::DEBUG << "Handle for " << propertyName << " ("
682  << address << ")" << " successfully created and stored."
683  << endmsg;
684  } else {
685  log << MSG::ERROR << "Handle for " << propertyName << " ("
686  << address << ")" << " could not be created." << endmsg;
687  }
688 
689  return res;
690 
691  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
DataObjectDescriptor * descriptor()
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
void setTag(const std::string &tag)
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
void setAddress(const std::string &address)
DataObjectDescriptorCollection m_outputDataObjects
Definition: Algorithm.h:856
void setOptional(bool optional)
bool insert(const std::string &tag, MinimalDataObjectHandle *descriptor)
void setAccessType(MinimalDataObjectHandle::AccessType accessType)
void setOwner(IAlgorithm *fatherAlg)
#define LIKELY(x)
Definition: Kernel.h:125
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
template<class T >
StatusCode Algorithm::declareOutput ( const std::string &  propertyName,
DataObjectHandle< T > &  handle,
const std::string &  address = DataObjectDescriptor::NULL_,
bool  optional = false,
MinimalDataObjectHandle::AccessType  accessType = MinimalDataObjectHandle::WRITE 
)
inline

Declare output data object.

Parameters
propertyNameto identify input object in python config
handledata handle
addressrelative or absolute address in TES
optionaloptional input
accessTypewrite or update

Definition at line 663 of file Algorithm.h.

666  {
667 
668  bool res = m_outputDataObjects.insert(propertyName, &handle);
669 
670  handle.descriptor()->setTag(propertyName);
671  handle.descriptor()->setAddress(address);
672  handle.descriptor()->setAccessType(accessType);
673  handle.descriptor()->setOptional(optional);
674 
675  handle.setOwner(this);
676 
677 
678  MsgStream log(msgSvc(), name());
679 
680  if (LIKELY(res)) {
681  log << MSG::DEBUG << "Handle for " << propertyName << " ("
682  << address << ")" << " successfully created and stored."
683  << endmsg;
684  } else {
685  log << MSG::ERROR << "Handle for " << propertyName << " ("
686  << address << ")" << " could not be created." << endmsg;
687  }
688 
689  return res;
690 
691  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
DataObjectDescriptor * descriptor()
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
void setTag(const std::string &tag)
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
void setAddress(const std::string &address)
DataObjectDescriptorCollection m_outputDataObjects
Definition: Algorithm.h:856
void setOptional(bool optional)
bool insert(const std::string &tag, MinimalDataObjectHandle *descriptor)
void setAccessType(MinimalDataObjectHandle::AccessType accessType)
void setOwner(IAlgorithm *fatherAlg)
#define LIKELY(x)
Definition: Kernel.h:125
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
template<class T >
StatusCode Algorithm::declarePrivateTool ( ToolHandle< T > &  handle,
std::string  toolTypeAndName = "",
bool  createIf = true 
)
inline

Declare used Private tool.

Parameters
handleToolHandle<T>
toolTypeAndName
parent,defaultpublic tool
createif necessary, default true

Definition at line 736 of file Algorithm.h.

738  {
739 
740  if (toolTypeAndName == "")
741  toolTypeAndName = System::typeinfoName(typeid(T));
742 
743  StatusCode sc = handle.initialize(toolTypeAndName, this, createIf);
744 
745  m_toolHandles.push_back(&handle);
746 
747  MsgStream log(msgSvc(), name());
748 
749  if (sc.isSuccess()) {
750  log << MSG::DEBUG << "Handle for private tool" << toolTypeAndName
751  << " successfully created and stored." << endmsg;
752  } else {
753 
754  log << MSG::ERROR << "Handle for private tool" << toolTypeAndName
755  << " could not be created." << endmsg;
756  }
757 
758  return sc;
759 
760  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
std::vector< BaseToolHandle * > m_toolHandles
Definition: Algorithm.h:860
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
StatusCode initialize(const std::string &toolTypeAndName, const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:156
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
template<class T >
StatusCode Algorithm::declarePrivateTool ( ToolHandle< T > &  handle,
std::string  toolTypeAndName = "",
bool  createIf = true 
)
inline

Declare used Private tool.

Parameters
handleToolHandle<T>
toolTypeAndName
parent,defaultpublic tool
createif necessary, default true

Definition at line 736 of file Algorithm.h.

738  {
739 
740  if (toolTypeAndName == "")
741  toolTypeAndName = System::typeinfoName(typeid(T));
742 
743  StatusCode sc = handle.initialize(toolTypeAndName, this, createIf);
744 
745  m_toolHandles.push_back(&handle);
746 
747  MsgStream log(msgSvc(), name());
748 
749  if (sc.isSuccess()) {
750  log << MSG::DEBUG << "Handle for private tool" << toolTypeAndName
751  << " successfully created and stored." << endmsg;
752  } else {
753 
754  log << MSG::ERROR << "Handle for private tool" << toolTypeAndName
755  << " could not be created." << endmsg;
756  }
757 
758  return sc;
759 
760  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
std::vector< BaseToolHandle * > m_toolHandles
Definition: Algorithm.h:860
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
StatusCode initialize(const std::string &toolTypeAndName, const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:156
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
template<class T >
Property* Algorithm::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
) const
inline

Declare the named property.

MyAlg ( const std::string& name ,
ISvcLocator* pSvc )
: Algorithm ( name , pSvc )
, m_property1 ( ... )
, m_property2 ( ... )
{
// declare the property
declareProperty( "Property1" , m_property1 , "Doc for property #1" ) ;
// declare the property and attach the handler to it
declareProperty( "Property2" , m_property2 , "Doc for property #2" )
-> declareUpdateHandler( &MyAlg::handler_2 ) ;
}
See also
PropertyMgr
PropertyMgr::declareProperty
Parameters
namethe property name
propertythe property itself,
docthe documentation string
Returns
the actual property objects

Definition at line 435 of file Algorithm.h.

438  {
439  return m_propertyMgr->declareProperty(name, property, doc);
440  }
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
Property * declareProperty(const std::string &name, TYPE &value, const std::string &doc="none")
Declare a property (templated)
Definition: PropertyMgr.h:188
SmartIF< PropertyMgr > m_propertyMgr
For management of properties.
Definition: Algorithm.h:886
template<class T >
Property* Algorithm::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
) const
inline

Declare the named property.

MyAlg ( const std::string& name ,
ISvcLocator* pSvc )
: Algorithm ( name , pSvc )
, m_property1 ( ... )
, m_property2 ( ... )
{
// declare the property
declareProperty( "Property1" , m_property1 , "Doc for property #1" ) ;
// declare the property and attach the handler to it
declareProperty( "Property2" , m_property2 , "Doc for property #2" )
-> declareUpdateHandler( &MyAlg::handler_2 ) ;
}
See also
PropertyMgr
PropertyMgr::declareProperty
Parameters
namethe property name
propertythe property itself,
docthe documentation string
Returns
the actual property objects

Definition at line 435 of file Algorithm.h.

438  {
439  return m_propertyMgr->declareProperty(name, property, doc);
440  }
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
Property * declareProperty(const std::string &name, TYPE &value, const std::string &doc="none")
Declare a property (templated)
Definition: PropertyMgr.h:188
SmartIF< PropertyMgr > m_propertyMgr
For management of properties.
Definition: Algorithm.h:886
template<class T >
StatusCode Algorithm::declarePublicTool ( ToolHandle< T > &  handle,
std::string  toolTypeAndName = "",
bool  createIf = true 
)
inline

Declare used Public tool.

Parameters
handleToolHandle<T>
toolTypeAndName
parent,defaultpublic tool
createif necessary, default true

Definition at line 770 of file Algorithm.h.

771  {
772 
773  if (toolTypeAndName == "")
774  toolTypeAndName = System::typeinfoName(typeid(T));
775 
776  StatusCode sc = handle.initialize(toolTypeAndName, 0, createIf);
777 
778  m_toolHandles.push_back(&handle);
779 
780  MsgStream log(msgSvc(), name());
781 
782  if (sc.isSuccess()) {
783  log << MSG::DEBUG << "Handle for public tool" << toolTypeAndName
784  << " successfully created and stored." << endmsg;
785  } else {
786 
787  log << MSG::ERROR << "Handle for public tool" << toolTypeAndName
788  << " could not be created." << endmsg;
789  }
790 
791  return sc;
792 
793  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
std::vector< BaseToolHandle * > m_toolHandles
Definition: Algorithm.h:860
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
StatusCode initialize(const std::string &toolTypeAndName, const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:156
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
template<class T >
StatusCode Algorithm::declarePublicTool ( ToolHandle< T > &  handle,
std::string  toolTypeAndName = "",
bool  createIf = true 
)
inline

Declare used Public tool.

Parameters
handleToolHandle<T>
toolTypeAndName
parent,defaultpublic tool
createif necessary, default true

Definition at line 770 of file Algorithm.h.

771  {
772 
773  if (toolTypeAndName == "")
774  toolTypeAndName = System::typeinfoName(typeid(T));
775 
776  StatusCode sc = handle.initialize(toolTypeAndName, 0, createIf);
777 
778  m_toolHandles.push_back(&handle);
779 
780  MsgStream log(msgSvc(), name());
781 
782  if (sc.isSuccess()) {
783  log << MSG::DEBUG << "Handle for public tool" << toolTypeAndName
784  << " successfully created and stored." << endmsg;
785  } else {
786 
787  log << MSG::ERROR << "Handle for public tool" << toolTypeAndName
788  << " could not be created." << endmsg;
789  }
790 
791  return sc;
792 
793  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
std::vector< BaseToolHandle * > m_toolHandles
Definition: Algorithm.h:860
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
StatusCode initialize(const std::string &toolTypeAndName, const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:156
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
Property* Algorithm::declareRemoteProperty ( const std::string &  name,
IProperty rsvc,
const std::string &  rname = "" 
) const
inline

Declare remote named properties.

Definition at line 444 of file Algorithm.h.

447  {
448  return m_propertyMgr -> declareRemoteProperty ( name , rsvc , rname );
449  }
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
SmartIF< PropertyMgr > m_propertyMgr
For management of properties.
Definition: Algorithm.h:886
Property * declareRemoteProperty(const std::string &name, IProperty *rsvc, const std::string &rname="") const
Declare remote named properties.
Definition: Algorithm.h:444
Property* Algorithm::declareRemoteProperty ( const std::string &  name,
IProperty rsvc,
const std::string &  rname = "" 
) const
inline

Declare remote named properties.

Definition at line 444 of file Algorithm.h.

447  {
448  return m_propertyMgr -> declareRemoteProperty ( name , rsvc , rname );
449  }
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
SmartIF< PropertyMgr > m_propertyMgr
For management of properties.
Definition: Algorithm.h:886
Property * declareRemoteProperty(const std::string &name, IProperty *rsvc, const std::string &rname="") const
Declare remote named properties.
Definition: Algorithm.h:444
void Algorithm::deregisterTool ( IAlgTool tool) const
inline

Definition at line 713 of file Algorithm.h.

713  {
714  std::vector<IAlgTool *>::iterator it = std::find(m_tools.begin(),
715  m_tools.end(), tool);
716 
717  MsgStream log(msgSvc(), name());
718  if (it != m_tools.end()) {
719 
720  log << MSG::DEBUG << "De-Registering tool " << tool->name() << endmsg;
721 
722  m_tools.erase(it);
723  } else {
724  log << MSG::DEBUG << "Could not de-register tool " << tool->name() << endmsg;
725  }
726  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
std::vector< IAlgTool * > m_tools
Definition: Algorithm.h:859
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
void Algorithm::deregisterTool ( IAlgTool tool) const
inline

Definition at line 713 of file Algorithm.h.

713  {
714  std::vector<IAlgTool *>::iterator it = std::find(m_tools.begin(),
715  m_tools.end(), tool);
716 
717  MsgStream log(msgSvc(), name());
718  if (it != m_tools.end()) {
719 
720  log << MSG::DEBUG << "De-Registering tool " << tool->name() << endmsg;
721 
722  m_tools.erase(it);
723  } else {
724  log << MSG::DEBUG << "Could not de-register tool " << tool->name() << endmsg;
725  }
726  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
std::vector< IAlgTool * > m_tools
Definition: Algorithm.h:859
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
SmartIF<IConversionSvc>& Algorithm::detCnvSvc ( ) const

The standard detector data persistency conversion service.

May not be invoked before sysInitialize() has been invoked.

SmartIF<IConversionSvc>& Algorithm::detCnvSvc ( ) const

The standard detector data persistency conversion service.

May not be invoked before sysInitialize() has been invoked.

SmartIF<IConversionSvc>& Algorithm::detDataCnvService ( ) const

Obsoleted name, kept due to the backwards compatibility.

SmartIF< IConversionSvc > & Algorithm::detDataCnvService ( ) const

Obsoleted name, kept due to the backwards compatibility.

Definition at line 1021 of file Algorithm.cpp.

SmartIF<IDataProviderSvc>& Algorithm::detDataService ( ) const

Obsoleted name, kept due to the backwards compatibility.

SmartIF< IDataProviderSvc > & Algorithm::detDataService ( ) const

Obsoleted name, kept due to the backwards compatibility.

Definition at line 1017 of file Algorithm.cpp.

SmartIF<IDataProviderSvc>& Algorithm::detSvc ( ) const

The standard detector data service.

May not be invoked before sysInitialize() has been invoked.

SmartIF<IDataProviderSvc>& Algorithm::detSvc ( ) const

The standard detector data service.

May not be invoked before sysInitialize() has been invoked.

StatusCode Algorithm::endRun ( )
override

Algorithm end run. This method is called at the end of the event loop.

StatusCode Algorithm::endRun ( )
override

Algorithm end run. This method is called at the end of the event loop.

Definition at line 647 of file Algorithm.cpp.

int Algorithm::errorCount ( ) const
inline

Get the number of failures of the algorithm.

Definition at line 226 of file Algorithm.h.

226 { return m_errorCount; }
int m_errorCount
Algorithm error counter.
Definition: Algorithm.h:889
int Algorithm::errorCount ( ) const
inline

Get the number of failures of the algorithm.

Definition at line 226 of file Algorithm.h.

226 { return m_errorCount; }
int m_errorCount
Algorithm error counter.
Definition: Algorithm.h:889
SmartIF<IConversionSvc>& Algorithm::eventCnvSvc ( ) const

The standard event data persistency conversion service.

May not be invoked before sysInitialize() has been invoked.

SmartIF<IConversionSvc>& Algorithm::eventCnvSvc ( ) const

The standard event data persistency conversion service.

May not be invoked before sysInitialize() has been invoked.

SmartIF<IConversionSvc>& Algorithm::eventDataCnvService ( ) const

Obsoleted name, kept due to the backwards compatibility.

SmartIF< IConversionSvc > & Algorithm::eventDataCnvService ( ) const

Obsoleted name, kept due to the backwards compatibility.

Definition at line 1029 of file Algorithm.cpp.

SmartIF<IDataProviderSvc>& Algorithm::eventDataService ( ) const

Obsoleted name, kept due to the backwards compatibility.

SmartIF< IDataProviderSvc > & Algorithm::eventDataService ( ) const

Obsoleted name, kept due to the backwards compatibility.

Definition at line 1025 of file Algorithm.cpp.

SmartIF<IDataProviderSvc>& Algorithm::eventSvc ( ) const

The standard event data service.

May not be invoked before sysInitialize() has been invoked.

SmartIF<IDataProviderSvc>& Algorithm::eventSvc ( ) const

The standard event data service.

May not be invoked before sysInitialize() has been invoked.

SmartIF<IDataProviderSvc>& Algorithm::evtSvc ( ) const
inline

shortcut for method eventSvc

Definition at line 286 of file Algorithm.h.

286 { return eventSvc() ; }
SmartIF< IDataProviderSvc > & eventSvc() const
The standard event data service.
SmartIF<IDataProviderSvc>& Algorithm::evtSvc ( ) const
inline

shortcut for method eventSvc

Definition at line 286 of file Algorithm.h.

286 { return eventSvc() ; }
SmartIF< IDataProviderSvc > & eventSvc() const
The standard event data service.
SmartIF<IExceptionSvc>& Algorithm::exceptionSvc ( ) const

Get the exception Service.

SmartIF<IExceptionSvc>& Algorithm::exceptionSvc ( ) const

Get the exception Service.

bool Algorithm::filterPassed ( ) const
override

Did this algorithm pass or fail its filter criterion for the last event?

bool Algorithm::filterPassed ( ) const
override

Did this algorithm pass or fail its filter criterion for the last event?

Definition at line 948 of file Algorithm.cpp.

StatusCode Algorithm::finalize ( )
inlineoverride

the default (empty) implementation of IStateful::finalize() method

Definition at line 186 of file Algorithm.h.

StatusCode Algorithm::finalize ( )
inlineoverride

the default (empty) implementation of IStateful::finalize() method

Definition at line 186 of file Algorithm.h.

Gaudi::StateMachine::State Algorithm::FSMState ( ) const
inlineoverride

returns the current state of the algorithm

Definition at line 192 of file Algorithm.h.

192 { return m_state; }
Gaudi::StateMachine::State m_state
flag indicating whether ToolHandle tools have been added to m_tools
Definition: Algorithm.h:904
Gaudi::StateMachine::State Algorithm::FSMState ( ) const
inlineoverride

returns the current state of the algorithm

Definition at line 192 of file Algorithm.h.

192 { return m_state; }
Gaudi::StateMachine::State m_state
flag indicating whether ToolHandle tools have been added to m_tools
Definition: Algorithm.h:904
EventContext* Algorithm::getContext ( )
inline

get the context

Definition at line 553 of file Algorithm.h.

553 {return m_event_context;}
EventContext * m_event_context
Event specific data for multiple event processing.
Definition: Algorithm.h:844
EventContext* Algorithm::getContext ( )
inline

get the context

Definition at line 553 of file Algorithm.h.

553 {return m_event_context;}
EventContext * m_event_context
Event specific data for multiple event processing.
Definition: Algorithm.h:844
const std::vector< Property * > & Algorithm::getProperties ( ) const
override

Implementation of IProperty::getProperties.

Definition at line 1113 of file Algorithm.cpp.

const std::vector<Property*>& Algorithm::getProperties ( ) const
override

Implementation of IProperty::getProperties.

StatusCode Algorithm::getProperty ( Property p) const
override

Implementation of IProperty::getProperty.

Definition at line 1104 of file Algorithm.cpp.

StatusCode Algorithm::getProperty ( Property p) const
override

Implementation of IProperty::getProperty.

const Property & Algorithm::getProperty ( const std::string &  name) const
override

Implementation of IProperty::getProperty.

Definition at line 1107 of file Algorithm.cpp.

const Property& Algorithm::getProperty ( const std::string &  name) const
override

Implementation of IProperty::getProperty.

StatusCode Algorithm::getProperty ( const std::string &  n,
std::string &  v 
) const
override

Implementation of IProperty::getProperty.

Definition at line 1110 of file Algorithm.cpp.

StatusCode Algorithm::getProperty ( const std::string &  n,
std::string &  v 
) const
override

Implementation of IProperty::getProperty.

bool Algorithm::hasProperty ( const std::string &  name) const
override

Implementation of IProperty::hasProperty.

Definition at line 1116 of file Algorithm.cpp.

bool Algorithm::hasProperty ( const std::string &  name) const
override

Implementation of IProperty::hasProperty.

SmartIF<IHistogramSvc>& Algorithm::histogramDataService ( ) const

Obsoleted name, kept due to the backwards compatibility.

SmartIF< IHistogramSvc > & Algorithm::histogramDataService ( ) const

Obsoleted name, kept due to the backwards compatibility.

Definition at line 1033 of file Algorithm.cpp.

SmartIF<IHistogramSvc>& Algorithm::histoSvc ( ) const

The standard histogram service.

May not be invoked before sysInitialize() has been invoked.

SmartIF<IHistogramSvc>& Algorithm::histoSvc ( ) const

The standard histogram service.

May not be invoked before sysInitialize() has been invoked.

unsigned int Algorithm::index ( )
override

Definition at line 927 of file Algorithm.cpp.

unsigned int Algorithm::index ( )
override
StatusCode Algorithm::initialize ( )
inlineoverride

the default (empty) implementation of IStateful::initialize() method

Definition at line 180 of file Algorithm.h.

StatusCode Algorithm::initialize ( )
inlineoverride

the default (empty) implementation of IStateful::initialize() method

Definition at line 180 of file Algorithm.h.

void Algorithm::initOutputLevel ( Property prop)
protected

Callback for output level property.

Protected Member Functions.

Definition at line 1217 of file Algorithm.cpp.

void Algorithm::initOutputLevel ( Property prop)
protected

Callback for output level property.

void Algorithm::initToolHandles ( ) const
private

Definition at line 1134 of file Algorithm.cpp.

void Algorithm::initToolHandles ( ) const
private
__attribute__ ((deprecated)) const std const DataObjectDescriptorCollection& Algorithm::inputDataObjects ( ) const
inlineoverride

Return the handles declared in the algorithm.

Definition at line 697 of file Algorithm.h.

697  {
698  return m_inputDataObjects;
699  }
DataObjectDescriptorCollection m_inputDataObjects
Definition: Algorithm.h:855
__attribute__ ((deprecated)) const std const DataObjectDescriptorCollection& Algorithm::inputDataObjects ( ) const
inlineoverride

Return the handles declared in the algorithm.

Definition at line 697 of file Algorithm.h.

697  {
698  return m_inputDataObjects;
699  }
DataObjectDescriptorCollection m_inputDataObjects
Definition: Algorithm.h:855
DataObjectDescriptorCollection& Algorithm::inputDataObjects ( )
inlineprotected

Definition at line 799 of file Algorithm.h.

799  {
800  return m_inputDataObjects;
801  }
DataObjectDescriptorCollection m_inputDataObjects
Definition: Algorithm.h:855
DataObjectDescriptorCollection& Algorithm::inputDataObjects ( )
inlineprotected

Definition at line 799 of file Algorithm.h.

799  {
800  return m_inputDataObjects;
801  }
DataObjectDescriptorCollection m_inputDataObjects
Definition: Algorithm.h:855
bool Algorithm::isClonable ( ) const
inlineoverride

Specifies the clonability of the algorithm.

Definition at line 819 of file Algorithm.h.

819 { return m_isClonable; }
bool m_isClonable
The algorithm clonability of the algorithm.
Definition: Algorithm.h:910
bool Algorithm::isClonable ( ) const
inlineoverride

Specifies the clonability of the algorithm.

Definition at line 819 of file Algorithm.h.

819 { return m_isClonable; }
bool m_isClonable
The algorithm clonability of the algorithm.
Definition: Algorithm.h:910
bool Algorithm::isEnabled ( ) const
override

Is this algorithm enabled or disabled?

bool Algorithm::isEnabled ( ) const
override

Is this algorithm enabled or disabled?

Definition at line 944 of file Algorithm.cpp.

bool Algorithm::isExecuted ( ) const
override

Has this algorithm been executed since the last reset?

bool Algorithm::isExecuted ( ) const
override

Has this algorithm been executed since the last reset?

Definition at line 931 of file Algorithm.cpp.

bool Algorithm::isFinalized ( ) const
inlineoverrideprotected

Has the Algorithm already been finalized?

Definition at line 832 of file Algorithm.h.

Gaudi::StateMachine::State m_state
flag indicating whether ToolHandle tools have been added to m_tools
Definition: Algorithm.h:904
bool Algorithm::isFinalized ( ) const
inlineoverrideprotected

Has the Algorithm already been finalized?

Definition at line 832 of file Algorithm.h.

Gaudi::StateMachine::State m_state
flag indicating whether ToolHandle tools have been added to m_tools
Definition: Algorithm.h:904
bool Algorithm::isInitialized ( ) const
inlineoverrideprotected

Has the Algorithm already been initialized?

Definition at line 829 of file Algorithm.h.

Gaudi::StateMachine::State m_state
flag indicating whether ToolHandle tools have been added to m_tools
Definition: Algorithm.h:904
bool Algorithm::isInitialized ( ) const
inlineoverrideprotected

Has the Algorithm already been initialized?

Definition at line 829 of file Algorithm.h.

Gaudi::StateMachine::State m_state
flag indicating whether ToolHandle tools have been added to m_tools
Definition: Algorithm.h:904
SmartIF<IMessageSvc>& Algorithm::messageService ( ) const

Obsoleted name, kept due to the backwards compatibility.

SmartIF< IMessageSvc > & Algorithm::messageService ( ) const

Obsoleted name, kept due to the backwards compatibility.

Definition at line 1037 of file Algorithm.cpp.

SmartIF<IMonitorSvc>& Algorithm::monitorSvc ( ) const
inline

Access the monitor service.

Attention
Note that this method will return a NULL pointer if no monitor service is configured to be present. You must take this possibility into account when using the pointer
Returns
Pointer to the Monitor service
Return values
NULLNo monitor service is present
non-NULLA monitor service is present and available to be used

Definition at line 460 of file Algorithm.h.

461  {
462  // If not already located try to locate it without forcing a creation
463  if ( !m_pMonitorSvc ){
464  m_pMonitorSvc = service(m_monitorSvcName, false, true); // do not create and be quiet
465  }
466  return m_pMonitorSvc;
467  }
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: Algorithm.h:878
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Algorithm.h:231
std::string m_monitorSvcName
Name to use for Monitor Service.
Definition: Algorithm.h:884
SmartIF<IMonitorSvc>& Algorithm::monitorSvc ( ) const
inline

Access the monitor service.

Attention
Note that this method will return a NULL pointer if no monitor service is configured to be present. You must take this possibility into account when using the pointer
Returns
Pointer to the Monitor service
Return values
NULLNo monitor service is present
non-NULLA monitor service is present and available to be used

Definition at line 460 of file Algorithm.h.

461  {
462  // If not already located try to locate it without forcing a creation
463  if ( !m_pMonitorSvc ){
464  m_pMonitorSvc = service(m_monitorSvcName, false, true); // do not create and be quiet
465  }
466  return m_pMonitorSvc;
467  }
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: Algorithm.h:878
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Algorithm.h:231
std::string m_monitorSvcName
Name to use for Monitor Service.
Definition: Algorithm.h:884
SmartIF<IMessageSvc>& Algorithm::msgSvc ( ) const

The standard message service.

Returns a pointer to the standard message service. May not be invoked before sysInitialize() has been invoked.

The standard message service.

Returns a pointer to the standard message service. May not be invoked before sysInitialize() has been invoked.

Definition at line 1001 of file Algorithm.cpp.

const std::string & Algorithm::name ( ) const
override

The identifying name of the algorithm object.

This is the name of a particular instantiation of an algorithm object as opposed to the name of the algorithm itself, e.g. "LinearTrackFit" may be the name of a concrete algorithm class, whereas "ApproxTrackFit" and "BestTrackFit" may be two instantiations of the class configured to find tracks with different fit criteria.

Definition at line 919 of file Algorithm.cpp.

const std::string& Algorithm::name ( ) const
override

The identifying name of the algorithm object.

This is the name of a particular instantiation of an algorithm object as opposed to the name of the algorithm itself, e.g. "LinearTrackFit" may be the name of a concrete algorithm class, whereas "ApproxTrackFit" and "BestTrackFit" may be two instantiations of the class configured to find tracks with different fit criteria.

const std::vector<std::string>& Algorithm::neededResources ( ) const
inlineoverride

Definition at line 824 of file Algorithm.h.

824 { return m_neededResources; }
std::vector< std::string > m_neededResources
The named resources needed during event looping.
Definition: Algorithm.h:912
const std::vector<std::string>& Algorithm::neededResources ( ) const
inlineoverride

Definition at line 824 of file Algorithm.h.

824 { return m_neededResources; }
std::vector< std::string > m_neededResources
The named resources needed during event looping.
Definition: Algorithm.h:912
SmartIF<INTupleSvc>& Algorithm::ntupleService ( ) const

Obsoleted name, kept due to the backwards compatibility.

SmartIF< INTupleSvc > & Algorithm::ntupleService ( ) const

Obsoleted name, kept due to the backwards compatibility.

Definition at line 1041 of file Algorithm.cpp.

SmartIF<INTupleSvc>& Algorithm::ntupleSvc ( ) const

The standard N tuple service.

Returns a pointer to the N tuple service if present.

SmartIF<INTupleSvc>& Algorithm::ntupleSvc ( ) const

The standard N tuple service.

Returns a pointer to the N tuple service if present.

Algorithm& Algorithm::operator= ( const Algorithm rhs)
private

Private assignment operator: NO ASSIGNMENT ALLOWED.

Algorithm& Algorithm::operator= ( const Algorithm rhs)
private

Private assignment operator: NO ASSIGNMENT ALLOWED.

const DataObjectDescriptorCollection& Algorithm::outputDataObjects ( ) const
inlineoverride

Definition at line 700 of file Algorithm.h.

700  {
701  return m_outputDataObjects;
702  }
DataObjectDescriptorCollection m_outputDataObjects
Definition: Algorithm.h:856
const DataObjectDescriptorCollection& Algorithm::outputDataObjects ( ) const
inlineoverride

Definition at line 700 of file Algorithm.h.

700  {
701  return m_outputDataObjects;
702  }
DataObjectDescriptorCollection m_outputDataObjects
Definition: Algorithm.h:856
DataObjectDescriptorCollection& Algorithm::outputDataObjects ( )
inlineprotected

Definition at line 802 of file Algorithm.h.

802  {
803  return m_outputDataObjects;
804  }
DataObjectDescriptorCollection m_outputDataObjects
Definition: Algorithm.h:856
DataObjectDescriptorCollection& Algorithm::outputDataObjects ( )
inlineprotected

Definition at line 802 of file Algorithm.h.

802  {
803  return m_outputDataObjects;
804  }
DataObjectDescriptorCollection m_outputDataObjects
Definition: Algorithm.h:856
int Algorithm::outputLevel ( ) const
inlineprotected

retrieve the Algorithm output level

Definition at line 835 of file Algorithm.h.

835 { return (int)m_outputLevel ; }
IntegerProperty m_outputLevel
Algorithm output level.
Definition: Algorithm.h:887
int Algorithm::outputLevel ( ) const
inlineprotected

retrieve the Algorithm output level

Definition at line 835 of file Algorithm.h.

835 { return (int)m_outputLevel ; }
IntegerProperty m_outputLevel
Algorithm output level.
Definition: Algorithm.h:887
IntegerProperty& Algorithm::outputLevelProperty ( )
inlineprotected

Accessor for the Message level property.

Definition at line 838 of file Algorithm.h.

838 { return m_outputLevel; }
IntegerProperty m_outputLevel
Algorithm output level.
Definition: Algorithm.h:887
IntegerProperty& Algorithm::outputLevelProperty ( )
inlineprotected

Accessor for the Message level property.

Definition at line 838 of file Algorithm.h.

838 { return m_outputLevel; }
IntegerProperty m_outputLevel
Algorithm output level.
Definition: Algorithm.h:887
SmartIF<IRndmGenSvc>& Algorithm::randSvc ( ) const

AIDA-based NTuple service Returns a pointer to the AIDATuple service if present.

The standard RandomGen service, Return a pointer to the service if present

SmartIF<IRndmGenSvc>& Algorithm::randSvc ( ) const

AIDA-based NTuple service Returns a pointer to the AIDATuple service if present.

The standard RandomGen service, Return a pointer to the service if present

bool Algorithm::registerContext ( ) const
inline

register for Algorithm Context Service?

Definition at line 355 of file Algorithm.h.

355 { return m_registerContext ; }
bool m_registerContext
flag to register for Algorithm Context Service
Definition: Algorithm.h:883
bool Algorithm::registerContext ( ) const
inline

register for Algorithm Context Service?

Definition at line 355 of file Algorithm.h.

355 { return m_registerContext ; }
bool m_registerContext
flag to register for Algorithm Context Service
Definition: Algorithm.h:883
void Algorithm::registerTool ( IAlgTool tool) const
inline

Definition at line 704 of file Algorithm.h.

704  {
705 
706  MsgStream log(msgSvc(), name());
707 
708  log << MSG::DEBUG << "Registering tool " << tool->name() << endmsg;
709 
710  m_tools.push_back(tool);
711  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
std::vector< IAlgTool * > m_tools
Definition: Algorithm.h:859
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
void Algorithm::registerTool ( IAlgTool tool) const
inline

Definition at line 704 of file Algorithm.h.

704  {
705 
706  MsgStream log(msgSvc(), name());
707 
708  log << MSG::DEBUG << "Registering tool " << tool->name() << endmsg;
709 
710  m_tools.push_back(tool);
711  }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
std::vector< IAlgTool * > m_tools
Definition: Algorithm.h:859
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
StatusCode Algorithm::reinitialize ( )
override

the default (empty) implementation of IStateful::reinitialize() method

StatusCode Algorithm::reinitialize ( )
override

the default (empty) implementation of IStateful::reinitialize() method

Definition at line 880 of file Algorithm.cpp.

void Algorithm::resetExecuted ( )
override

Reset the executed state of the Algorithm for the duration of the current event.

void Algorithm::resetExecuted ( )
override

Reset the executed state of the Algorithm for the duration of the current event.

Definition at line 939 of file Algorithm.cpp.

StatusCode Algorithm::restart ( )
override

the default (empty) implementation of IStateful::restart() method

StatusCode Algorithm::restart ( )
override

the default (empty) implementation of IStateful::restart() method

Definition at line 902 of file Algorithm.cpp.

template<class T >
StatusCode Algorithm::service ( const std::string &  name,
T *&  psvc,
bool  createIf = true 
) const
inline

Access a service by name, creating it if it doesn't already exist.

Definition at line 231 of file Algorithm.h.

231  {
232  return service_i(name, createIf, T::interfaceID(), (void**)&psvc);
233  }
StatusCode service_i(const std::string &svcName, bool createIf, const InterfaceID &iid, void **ppSvc) const
implementation of service method
Definition: Algorithm.cpp:1223
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
template<class T >
StatusCode Algorithm::service ( const std::string &  name,
T *&  psvc,
bool  createIf = true 
) const
inline

Access a service by name, creating it if it doesn't already exist.

Definition at line 231 of file Algorithm.h.

231  {
232  return service_i(name, createIf, T::interfaceID(), (void**)&psvc);
233  }
StatusCode service_i(const std::string &svcName, bool createIf, const InterfaceID &iid, void **ppSvc) const
implementation of service method
Definition: Algorithm.cpp:1223
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
template<class T >
StatusCode Algorithm::service ( const std::string &  svcType,
const std::string &  svcName,
T *&  psvc 
) const
inline

Access a service by name and type, creating it if it doesn't already exist.

Definition at line 237 of file Algorithm.h.

238  {
239  return service_i(svcType, svcName, T::interfaceID(), (void**)&psvc);
240  }
StatusCode service_i(const std::string &svcName, bool createIf, const InterfaceID &iid, void **ppSvc) const
implementation of service method
Definition: Algorithm.cpp:1223
template<class T >
StatusCode Algorithm::service ( const std::string &  svcType,
const std::string &  svcName,
T *&  psvc 
) const
inline

Access a service by name and type, creating it if it doesn't already exist.

Definition at line 237 of file Algorithm.h.

238  {
239  return service_i(svcType, svcName, T::interfaceID(), (void**)&psvc);
240  }
StatusCode service_i(const std::string &svcName, bool createIf, const InterfaceID &iid, void **ppSvc) const
implementation of service method
Definition: Algorithm.cpp:1223
SmartIF<IService> Algorithm::service ( const std::string &  name,
const bool  createIf = true,
const bool  quiet = false 
) const

Return a pointer to the service identified by name (or "type/name")

SmartIF< IService > Algorithm::service ( const std::string &  name,
const bool  createIf = true,
const bool  quiet = false 
) const

Return a pointer to the service identified by name (or "type/name")

Definition at line 1240 of file Algorithm.cpp.

template<class T >
SmartIF<T> Algorithm::service ( const std::string &  name,
bool  createIf = true,
bool  quiet = false 
) const
inline

Definition at line 246 of file Algorithm.h.

246  {
247  return service(name,createIf,quiet).as<T>();
248  }
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Algorithm.h:231
template<class T >
SmartIF<T> Algorithm::service ( const std::string &  name,
bool  createIf = true,
bool  quiet = false 
) const
inline

Definition at line 246 of file Algorithm.h.

246  {
247  return service(name,createIf,quiet).as<T>();
248  }
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Algorithm.h:231
StatusCode Algorithm::service_i ( const std::string &  svcName,
bool  createIf,
const InterfaceID iid,
void **  ppSvc 
) const
private

implementation of service method

Definition at line 1223 of file Algorithm.cpp.

StatusCode Algorithm::service_i ( const std::string &  svcName,
bool  createIf,
const InterfaceID iid,
void **  ppSvc 
) const
private

implementation of service method

StatusCode Algorithm::service_i ( const std::string &  svcType,
const std::string &  svcName,
const InterfaceID iid,
void **  ppSvc 
) const
private

Definition at line 1232 of file Algorithm.cpp.

StatusCode Algorithm::service_i ( const std::string &  svcType,
const std::string &  svcName,
const InterfaceID iid,
void **  ppSvc 
) const
private
SmartIF<ISvcLocator>& Algorithm::serviceLocator ( ) const

The standard service locator.

Returns a pointer to the service locator service. This service may be used by an algorithm to request any services it requires in addition to those provided by default.

SmartIF< ISvcLocator > & Algorithm::serviceLocator ( ) const

The standard service locator.

Returns a pointer to the service locator service. This service may be used by an algorithm to request any services it requires in addition to those provided by default.

Definition at line 1045 of file Algorithm.cpp.

void Algorithm::setContext ( EventContext context)
inline

set the context

Definition at line 556 of file Algorithm.h.

556 {m_event_context = context;}
EventContext * m_event_context
Event specific data for multiple event processing.
Definition: Algorithm.h:844
void Algorithm::setContext ( EventContext context)
inline

set the context

Definition at line 556 of file Algorithm.h.

556 {m_event_context = context;}
EventContext * m_event_context
Event specific data for multiple event processing.
Definition: Algorithm.h:844
void Algorithm::setExecuted ( bool  state)
override

Set the executed flag to the specified state.

Definition at line 935 of file Algorithm.cpp.

void Algorithm::setExecuted ( bool  state)
override

Set the executed flag to the specified state.

void Algorithm::setFilterPassed ( bool  state)
override

Set the filter passed flag to the specified state.

void Algorithm::setFilterPassed ( bool  state)
override

Set the filter passed flag to the specified state.

Definition at line 952 of file Algorithm.cpp.

void Algorithm::setOutputLevel ( int  level)

Set the output level for current algorithm.

void Algorithm::setOutputLevel ( int  level)

Set the output level for current algorithm.

Definition at line 964 of file Algorithm.cpp.

StatusCode Algorithm::setProperties ( )

Set the algorithm's properties.

This method requests the job options service to set the values of any declared properties. The method is invoked from within sysInitialize() by the framework and does not need to be explicitly called by a concrete algorithm.

StatusCode Algorithm::setProperties ( )

Set the algorithm's properties.

This method requests the job options service to set the values of any declared properties. The method is invoked from within sysInitialize() by the framework and does not need to be explicitly called by a concrete algorithm.

Definition at line 1050 of file Algorithm.cpp.

StatusCode Algorithm::setProperty ( const Property p)
override

Implementation of IProperty::setProperty.

Definition at line 1095 of file Algorithm.cpp.

StatusCode Algorithm::setProperty ( const Property p)
override

Implementation of IProperty::setProperty.

StatusCode Algorithm::setProperty ( const std::string &  s)
override

Implementation of IProperty::setProperty.

Definition at line 1098 of file Algorithm.cpp.

StatusCode Algorithm::setProperty ( const std::string &  s)
override

Implementation of IProperty::setProperty.

StatusCode Algorithm::setProperty ( const std::string &  n,
const std::string &  v 
)
override

Implementation of IProperty::setProperty.

Definition at line 1101 of file Algorithm.cpp.

StatusCode Algorithm::setProperty ( const std::string &  n,
const std::string &  v 
)
override

Implementation of IProperty::setProperty.

template<class TYPE >
StatusCode Algorithm::setProperty ( const std::string &  name,
const TYPE &  value 
)
inline

set the property form the value

std::vector<double> data = ... ;
setProperty( "Data" , data ) ;
std::map<std::string,double> cuts = ... ;
setProperty( "Cuts" , cuts ) ;
std::map<std::string,std::string> dict = ... ;
setProperty( "Dictionary" , dict ) ;

Note: the interface IProperty allows setting of the properties either directly from other properties or from strings only

This is very convenient in resetting of the default properties in the derived classes. E.g. without this method one needs to convert everything into strings to use IProperty::setProperty

setProperty ( "OutputLevel" , "1" ) ;
setProperty ( "Enable" , "True" ) ;
setProperty ( "ErrorMax" , "10" ) ;

For simple cases it is more or less ok, but for complicated properties it is just ugly..

Parameters
namename of the property
valuevalue of the property
See also
Gaudi::Utils::setProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 546 of file Algorithm.h.

548  { return Gaudi::Utils::setProperty ( m_propertyMgr.get() , name , value ) ; }
StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
Definition: Property.h:1187
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
SmartIF< PropertyMgr > m_propertyMgr
For management of properties.
Definition: Algorithm.h:886
template<class TYPE >
StatusCode Algorithm::setProperty ( const std::string &  name,
const TYPE &  value 
)
inline

set the property form the value

std::vector<double> data = ... ;
setProperty( "Data" , data ) ;
std::map<std::string,double> cuts = ... ;
setProperty( "Cuts" , cuts ) ;
std::map<std::string,std::string> dict = ... ;
setProperty( "Dictionary" , dict ) ;

Note: the interface IProperty allows setting of the properties either directly from other properties or from strings only

This is very convenient in resetting of the default properties in the derived classes. E.g. without this method one needs to convert everything into strings to use IProperty::setProperty

setProperty ( "OutputLevel" , "1" ) ;
setProperty ( "Enable" , "True" ) ;
setProperty ( "ErrorMax" , "10" ) ;

For simple cases it is more or less ok, but for complicated properties it is just ugly..

Parameters
namename of the property
valuevalue of the property
See also
Gaudi::Utils::setProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 546 of file Algorithm.h.

548  { return Gaudi::Utils::setProperty ( m_propertyMgr.get() , name , value ) ; }
StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
Definition: Property.h:1187
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
SmartIF< PropertyMgr > m_propertyMgr
For management of properties.
Definition: Algorithm.h:886
void Algorithm::setType ( const std::string &  type)
inlineoverride

Definition at line 168 of file Algorithm.h.

168 { m_type = type;} //BH, TODO: move to proper place
const std::string & type() const override
The type of the algorithm object.
Definition: Algorithm.h:167
std::string m_type
Algorithm's type.
Definition: Algorithm.h:849
void Algorithm::setType ( const std::string &  type)
inlineoverride

Definition at line 168 of file Algorithm.h.

168 { m_type = type;} //BH, TODO: move to proper place
const std::string & type() const override
The type of the algorithm object.
Definition: Algorithm.h:167
std::string m_type
Algorithm's type.
Definition: Algorithm.h:849
StatusCode Algorithm::start ( )
inlineoverride

the default (empty) implementation of IStateful::start() method

Definition at line 182 of file Algorithm.h.

StatusCode Algorithm::start ( )
inlineoverride

the default (empty) implementation of IStateful::start() method

Definition at line 182 of file Algorithm.h.

StatusCode Algorithm::stop ( )
inlineoverride

the default (empty) implementation of IStateful::stop() method

Definition at line 184 of file Algorithm.h.

StatusCode Algorithm::stop ( )
inlineoverride

the default (empty) implementation of IStateful::stop() method

Definition at line 184 of file Algorithm.h.

const std::vector<Algorithm*>* Algorithm::subAlgorithms ( ) const

List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.

const std::vector< Algorithm * > * Algorithm::subAlgorithms ( ) const

List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.

Definition at line 956 of file Algorithm.cpp.

std::vector<Algorithm*>* Algorithm::subAlgorithms ( )

List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.

std::vector< Algorithm * > * Algorithm::subAlgorithms ( )

List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.

Definition at line 960 of file Algorithm.cpp.

SmartIF<ISvcLocator>& Algorithm::svcLoc ( ) const
inline

shortcut for method serviceLocator

Definition at line 350 of file Algorithm.h.

350 { return serviceLocator() ; }
SmartIF< ISvcLocator > & serviceLocator() const
The standard service locator.
Definition: Algorithm.cpp:1045
SmartIF<ISvcLocator>& Algorithm::svcLoc ( ) const
inline

shortcut for method serviceLocator

Definition at line 350 of file Algorithm.h.

350 { return serviceLocator() ; }
SmartIF< ISvcLocator > & serviceLocator() const
The standard service locator.
Definition: Algorithm.cpp:1045
StatusCode Algorithm::sysBeginRun ( )
override

beginRun method invoked by the framework.

This method is responsible for any beginRun actions required by the framework itself. It will in turn invoke the beginRun() method of the derived algorithm, and of any sub-algorithms which it creates.

Definition at line 510 of file Algorithm.cpp.

StatusCode Algorithm::sysBeginRun ( )
override

beginRun method invoked by the framework.

This method is responsible for any beginRun actions required by the framework itself. It will in turn invoke the beginRun() method of the derived algorithm, and of any sub-algorithms which it creates.

StatusCode Algorithm::sysEndRun ( )
override

endRun method invoked by the framework.

This method is responsible for any endRun actions required by the framework itself. It will in turn invoke the endRun() method of the derived algorithm, and of any sub-algorithms which it creates.

StatusCode Algorithm::sysEndRun ( )
override

endRun method invoked by the framework.

This method is responsible for any endRun actions required by the framework itself. It will in turn invoke the endRun() method of the derived algorithm, and of any sub-algorithms which it creates.

Definition at line 581 of file Algorithm.cpp.

StatusCode Algorithm::sysExecute ( )
override

The actions to be performed by the algorithm on an event.

This method is invoked once per event for top level algorithms by the application manager. This method invokes execute() method. For sub-algorithms either the sysExecute() method or execute() method must be EXPLICITLY invoked by the parent algorithm.

Definition at line 652 of file Algorithm.cpp.

StatusCode Algorithm::sysExecute ( )
override

The actions to be performed by the algorithm on an event.

This method is invoked once per event for top level algorithms by the application manager. This method invokes execute() method. For sub-algorithms either the sysExecute() method or execute() method must be EXPLICITLY invoked by the parent algorithm.

StatusCode Algorithm::sysFinalize ( )
override

System finalization.

This method invokes the finalize() method of a concrete algorithm and the finalize() methods of all of that algorithm's sub algorithms.

StatusCode Algorithm::sysFinalize ( )
override

System finalization.

This method invokes the finalize() method of a concrete algorithm and the finalize() methods of all of that algorithm's sub algorithms.

Definition at line 817 of file Algorithm.cpp.

StatusCode Algorithm::sysInitialize ( )
override

Initialization method invoked by the framework.

This method is responsible for any bookkeeping of initialization required by the framework itself. It will in turn invoke the initialize() method of the derived algorithm, and of any sub-algorithms which it creates.

Definition at line 101 of file Algorithm.cpp.

102  {
103  return GaudiPython::call_python_method ( m_self , "endRun" ) ; }
104 
105 
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:29
StatusCode Algorithm::sysInitialize ( )
override

Initialization method invoked by the framework.

This method is responsible for any bookkeeping of initialization required by the framework itself. It will in turn invoke the initialize() method of the derived algorithm, and of any sub-algorithms which it creates.

StatusCode Algorithm::sysReinitialize ( )
override

Reinitialization method invoked by the framework.

This method is responsible for any reinitialization required by the framework itself. It will in turn invoke the reinitialize() method of the derived algorithm, and of any sub-algorithms which it creates.

Definition at line 354 of file Algorithm.cpp.

StatusCode Algorithm::sysReinitialize ( )
override

Reinitialization method invoked by the framework.

This method is responsible for any reinitialization required by the framework itself. It will in turn invoke the reinitialize() method of the derived algorithm, and of any sub-algorithms which it creates.

StatusCode Algorithm::sysRestart ( )
override

Restart method invoked by the framework.

It will in turn invoke the restart() method of the derived algorithm, and of any sub-algorithms which it creates.

StatusCode Algorithm::sysRestart ( )
override

Restart method invoked by the framework.

It will in turn invoke the restart() method of the derived algorithm, and of any sub-algorithms which it creates.

Definition at line 432 of file Algorithm.cpp.

StatusCode Algorithm::sysStart ( )
override

Reinitialization method invoked by the framework.

This method is responsible for any reinitialization required by the framework itself. It will in turn invoke the reinitialize() method of the derived algorithm, and of any sub-algorithms which it creates.

StatusCode Algorithm::sysStart ( )
override

Reinitialization method invoked by the framework.

This method is responsible for any reinitialization required by the framework itself. It will in turn invoke the reinitialize() method of the derived algorithm, and of any sub-algorithms which it creates.

Definition at line 282 of file Algorithm.cpp.

StatusCode Algorithm::sysStop ( )
override

System stop.

This method invokes the stop() method of a concrete algorithm and the stop() methods of all of that algorithm's sub algorithms.

Definition at line 761 of file Algorithm.cpp.

StatusCode Algorithm::sysStop ( )
override

System stop.

This method invokes the stop() method of a concrete algorithm and the stop() methods of all of that algorithm's sub algorithms.

Gaudi::StateMachine::State Algorithm::targetFSMState ( ) const
inlineoverride

returns the state the algorithm will be in after the ongoing transition

Definition at line 194 of file Algorithm.h.

194 { return m_targetState; }
Gaudi::StateMachine::State m_targetState
Algorithm has been initialized flag.
Definition: Algorithm.h:905
Gaudi::StateMachine::State Algorithm::targetFSMState ( ) const
inlineoverride

returns the state the algorithm will be in after the ongoing transition

Definition at line 194 of file Algorithm.h.

194 { return m_targetState; }
Gaudi::StateMachine::State m_targetState
Algorithm has been initialized flag.
Definition: Algorithm.h:905
StatusCode Algorithm::terminate ( )
inlineoverride

Dummy implementation of IStateful::terminate() method.

Definition at line 177 of file Algorithm.h.

StatusCode Algorithm::terminate ( )
inlineoverride

Dummy implementation of IStateful::terminate() method.

Definition at line 177 of file Algorithm.h.

SmartIF<ITimelineSvc>& Algorithm::timelineSvc ( ) const
SmartIF<ITimelineSvc>& Algorithm::timelineSvc ( ) const
const std::vector< IAlgTool * > & Algorithm::tools ( ) const

Definition at line 1156 of file Algorithm.cpp.

const std::vector<IAlgTool *>& Algorithm::tools ( ) const
std::vector< IAlgTool * > & Algorithm::tools ( )
protected

Definition at line 1163 of file Algorithm.cpp.

std::vector<IAlgTool *>& Algorithm::tools ( )
protected
SmartIF<IToolSvc>& Algorithm::toolSvc ( ) const

The standard ToolSvc service, Return a pointer to the service if present.

SmartIF<IToolSvc>& Algorithm::toolSvc ( ) const

The standard ToolSvc service, Return a pointer to the service if present.

const std::string& Algorithm::type ( ) const
inlineoverride

The type of the algorithm object.

Definition at line 167 of file Algorithm.h.

167 { return m_type;}
std::string m_type
Algorithm's type.
Definition: Algorithm.h:849
const std::string& Algorithm::type ( ) const
inlineoverride

The type of the algorithm object.

Definition at line 167 of file Algorithm.h.

167 { return m_type;}
std::string m_type
Algorithm's type.
Definition: Algorithm.h:849
const std::string& Algorithm::version ( ) const
override
const std::string & Algorithm::version ( ) const
override

Definition at line 923 of file Algorithm.cpp.

SmartIF<IHiveWhiteBoard>& Algorithm::whiteboard ( ) const
SmartIF<IHiveWhiteBoard>& Algorithm::whiteboard ( ) const

Member Data Documentation

BooleanProperty Algorithm::m_auditInit
private

global flag for auditors

Definition at line 890 of file Algorithm.h.

bool Algorithm::m_auditorBeginRun
private

flag for auditors in "beginRun()"

Definition at line 896 of file Algorithm.h.

bool Algorithm::m_auditorEndRun
private

flag for auditors in "endRun()"

Definition at line 897 of file Algorithm.h.

bool Algorithm::m_auditorExecute
private

flag for auditors in "execute()"

Definition at line 894 of file Algorithm.h.

bool Algorithm::m_auditorFinalize
private

flag for auditors in "finalize()"

Definition at line 895 of file Algorithm.h.

bool Algorithm::m_auditorInitialize
private

flag for auditors in "initialize()"

Definition at line 891 of file Algorithm.h.

bool Algorithm::m_auditorReinitialize
private

flag for auditors in "Reinitialize()"

Definition at line 892 of file Algorithm.h.

bool Algorithm::m_auditorRestart
private

flag for auditors in "Restart()"

Definition at line 893 of file Algorithm.h.

bool Algorithm::m_auditorStart
private

flag for auditors in "initialize()"

Definition at line 898 of file Algorithm.h.

bool Algorithm::m_auditorStop
private

flag for auditors in "Reinitialize()"

Definition at line 899 of file Algorithm.h.

unsigned int Algorithm::m_cardinality
private

The maximum number of clones that can exist.

Definition at line 911 of file Algorithm.h.

SmartIF< IAlgContextSvc > Algorithm::m_contextSvc
mutableprivate

Algorithm Context Service.

Definition at line 879 of file Algorithm.h.

SmartIF< IChronoStatSvc > Algorithm::m_CSS
mutableprivate

Chrono & Stat Service.

Definition at line 873 of file Algorithm.h.

SmartIF< IConversionSvc > Algorithm::m_DCS
mutableprivate

Detector conversion service.

Definition at line 869 of file Algorithm.h.

SmartIF< IDataProviderSvc > Algorithm::m_DDS
mutableprivate

Detector data service.

Definition at line 868 of file Algorithm.h.

bool Algorithm::m_doTimeline
private

Definition at line 908 of file Algorithm.h.

SmartIF< IConversionSvc > Algorithm::m_ECS
mutableprivate

Event conversion service.

Definition at line 867 of file Algorithm.h.

SmartIF< IDataProviderSvc > Algorithm::m_EDS
mutableprivate

Event data service.

Definition at line 865 of file Algorithm.h.

int Algorithm::m_errorCount
private

Algorithm error counter.

Definition at line 889 of file Algorithm.h.

int Algorithm::m_errorMax
private

Algorithm Max number of errors.

Definition at line 888 of file Algorithm.h.

EventContext * Algorithm::m_event_context
protected

Event specific data for multiple event processing.

Definition at line 844 of file Algorithm.h.

SmartIF< IExceptionSvc > Algorithm::m_EXS
mutableprivate

Exception Handler Service.

Definition at line 875 of file Algorithm.h.

bool Algorithm::m_filterPassed = true
private

Filter passed flag.

Definition at line 900 of file Algorithm.h.

SmartIF< IHistogramSvc > Algorithm::m_HDS
mutableprivate

Histogram data service.

Definition at line 870 of file Algorithm.h.

unsigned int Algorithm::m_index
private

Algorithm's index.

Definition at line 851 of file Algorithm.h.

DataObjectDescriptorCollection Algorithm::m_inputDataObjects
private

Definition at line 855 of file Algorithm.h.

bool Algorithm::m_isClonable
private

The algorithm clonability of the algorithm.

Definition at line 910 of file Algorithm.h.

bool Algorithm::m_isEnabled = true
private

Algorithm is enabled flag.

Definition at line 901 of file Algorithm.h.

bool Algorithm::m_isExecuted = false
private

Algorithm is executed flag.

Definition at line 902 of file Algorithm.h.

bool Algorithm::m_isFinalized
private

Algorithm has been finalized flag.

Definition at line 906 of file Algorithm.h.

std::string Algorithm::m_monitorSvcName
private

Name to use for Monitor Service.

Definition at line 884 of file Algorithm.h.

SmartIF< IMessageSvc > Algorithm::m_MS
mutableprivate

Message service.

Definition at line 864 of file Algorithm.h.

std::string Algorithm::m_name
private

Algorithm's name for identification.

Definition at line 848 of file Algorithm.h.

std::vector< std::string > Algorithm::m_neededResources
private

The named resources needed during event looping.

Definition at line 912 of file Algorithm.h.

SmartIF< INTupleSvc > Algorithm::m_NTS
mutableprivate

N tuple service.

Definition at line 871 of file Algorithm.h.

DataObjectDescriptorCollection Algorithm::m_outputDataObjects
private

Definition at line 856 of file Algorithm.h.

IntegerProperty Algorithm::m_outputLevel
private

Algorithm output level.

Definition at line 887 of file Algorithm.h.

SmartIF< IAuditorSvc > Algorithm::m_pAuditorSvc
mutableprivate

Auditor Service.

Definition at line 876 of file Algorithm.h.

SmartIF< IMonitorSvc > Algorithm::m_pMonitorSvc
mutableprivate

Online Monitoring Service.

Definition at line 878 of file Algorithm.h.

SmartIF< PropertyMgr > Algorithm::m_propertyMgr
private

For management of properties.

Definition at line 886 of file Algorithm.h.

SmartIF< ISvcLocator > Algorithm::m_pSvcLocator
private

Pointer to service locator service.

Definition at line 885 of file Algorithm.h.

SmartIF< IToolSvc > Algorithm::m_ptoolSvc
mutableprivate

ToolSvc Service.

Definition at line 877 of file Algorithm.h.

bool Algorithm::m_registerContext = false
private

flag to register for Algorithm Context Service

Definition at line 883 of file Algorithm.h.

SmartIF< IRndmGenSvc > Algorithm::m_RGS
mutableprivate

Random Number Generator Service.

Definition at line 874 of file Algorithm.h.

flag indicating whether ToolHandle tools have been added to m_tools

Algorithm has been initialized flag

Definition at line 904 of file Algorithm.h.

std::vector< Algorithm * > Algorithm::m_subAlgms
private

Sub algorithms.

Definition at line 852 of file Algorithm.h.

Gaudi::StateMachine::State Algorithm::m_targetState = Gaudi::StateMachine::CONFIGURED
private

Algorithm has been initialized flag.

Definition at line 905 of file Algorithm.h.

SmartIF< ITimelineSvc > Algorithm::m_timelineSvc
mutableprivate

Timeline Service.

Definition at line 881 of file Algorithm.h.

std::vector< BaseToolHandle * > Algorithm::m_toolHandles
mutableprivate

Definition at line 860 of file Algorithm.h.

bool Algorithm::m_toolHandlesInit = false
mutableprivate

Definition at line 903 of file Algorithm.h.

std::vector< IAlgTool * > Algorithm::m_tools
mutableprivate

Definition at line 859 of file Algorithm.h.

std::string Algorithm::m_type
private

Algorithm's type.

Definition at line 849 of file Algorithm.h.

std::string Algorithm::m_version
private

Algorithm's version.

Definition at line 850 of file Algorithm.h.

SmartIF< IHiveWhiteBoard > Algorithm::m_WB
mutableprivate

Event data service (whiteboard)

Definition at line 866 of file Algorithm.h.


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