| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Algorithm Class Reference

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

`#include <GaudiKernel/Algorithm.h>`

Inheritance diagram for Algorithm:
[legend]
Collaboration diagram for Algorithm:
[legend]

## Public Types
typedef Gaudi::PluginService::Factory< IAlgorithm *, const std::string &, ISvcLocator * > | Factory
Public Types inherited from extends< PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >, IDataHandleHolder >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
Public Types inherited from PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >
using | PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >
| Typedef used to refer to this class from derived classes, as in. More...
Public Types inherited from CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >
using | base_class = CommonMessaging
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...

## Public Member Functions
| Algorithm (const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
| Constructor. 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 (const EventContext &ctx) 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 Gaudi::StringKey & | nameKey () const override
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 () const 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) const 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 | isSequence () const override
| Are we a Sequence? More...
bool | filterPassed () const override
| Did this algorithm pass or fail its filter criterion for the last event? More...
void | setFilterPassed (bool state) const override
| Set the filter passed flag to the specified state. More...
unsigned 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< IService > | 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") More...
template<class T >
SmartIF< T > | service (const std::string &name, bool createIf=true, bool quiet=false) const
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
SmartIF< IDataProviderSvc > & | detSvc () const
| The standard detector data service. More...
SmartIF< IDataProviderSvc > & | detDataService () const
SmartIF< IConversionSvc > & | detCnvSvc () const
| The standard detector data persistency conversion service. More...
SmartIF< IConversionSvc > & | detDataCnvService () const
SmartIF< IDataProviderSvc > & | eventSvc () const
| The standard event data service. More...
SmartIF< IDataProviderSvc > & | evtSvc () const
| shortcut for method eventSvc More...
SmartIF< IDataProviderSvc > & | eventDataService () const
SmartIF< IConversionSvc > & | eventCnvSvc () const
| The standard event data persistency conversion service. More...
SmartIF< IConversionSvc > & | eventDataCnvService () const
SmartIF< IHistogramSvc > & | histoSvc () const
| The standard histogram service. More...
SmartIF< IHistogramSvc > & | histogramDataService () const
SmartIF< INTupleSvc > & | ntupleSvc () const
| The standard N tuple service. More...
SmartIF< INTupleSvc > & | ntupleService () const
SmartIF< IRndmGenSvc > & | randSvc () const
| The standard RandomGen service, Return a pointer to the 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 override
| The standard service locator. More...
SmartIF< ISvcLocator > & | svcLoc () const
| shortcut for method serviceLocator More...
SmartIF< IHiveWhiteBoard > & | whiteboard () const
SmartIF< IAlgExecStateSvc > & | algExecStateSvc () 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 | setProperties ()
| Set the algorithm's properties. More...
template<class T >
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
template<class T >
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
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...
const EventContext & | getContext () const override
| get the context More...
virtual void | acceptDHVisitor (IDataHandleVisitor *) const override
void | commitHandles () override
void | registerTool (IAlgTool *tool) const
void | deregisterTool (IAlgTool *tool) const
template<class T >
StatusCode | declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
template<class T >
void | addToolsArray (ToolHandleArray< T > &hndlArr)
const std::vector< IAlgTool * > & | tools () const
bool | isIOBound () const
void | setIOBound (bool value)
unsigned int | cardinality () const override
| Return the cardinality. More...
const std::vector< std::string > & | neededResources () const override
std::ostream & | toControlFlowExpression (std::ostream &os) const override
| Produce string represention of the control flow expression. More...
Public Member Functions inherited from DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > > >
std::vector< Gaudi::DataHandle * > | inputHandles () const override
std::vector< Gaudi::DataHandle * > | outputHandles () const override
virtual const DataObjIDColl & | extraInputDeps () const override
virtual const DataObjIDColl & | extraOutputDeps () const override
void | declare (Gaudi::DataHandle &handle) override
void | renounce (Gaudi::DataHandle &handle) override
const DataObjIDColl & | inputDataObjs () const override
const DataObjIDColl & | outputDataObjs () const override
void | addDependency (const DataObjID &id, const Gaudi::DataHandle::Mode &mode) override
Public Member Functions inherited from extends< PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >, IDataHandleHolder >
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...
| ~extends () override=default
| Virtual destructor. More...
Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >
| PropertyHolder ()=default
| ~PropertyHolder () override=default
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Details::PropertyBase &prop)
| Declare a property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
| Helper to wrap a regular data member and use it as a regular property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none") const
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
| Declare a PropertyBase instance setting name and documentation. More...
Gaudi::Details::PropertyBase * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
| Declare a remote property. More...
StatusCode | setProperty (const Gaudi::Details::PropertyBase &p) override
| set the property form another property More...
StatusCode | setProperty (const std::string &s) override
| set the property from the formatted string More...
StatusCode | setProperty (const std::string &n, const std::string &v) override
| set the property from name and the value More...
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
StatusCode | getProperty (Gaudi::Details::PropertyBase *p) const override
| get the property More...
const Gaudi::Details::PropertyBase & | getProperty (const std::string &name) const override
| get the property by name More...
StatusCode | getProperty (const std::string &n, std::string &v) const override
| convert the property to the string More...
const std::vector< Gaudi::Details::PropertyBase * > & | getProperties () const override
| get all properties More...
bool | hasProperty (const std::string &name) const override
| Return true if we have a property with the given name. More...
| PropertyHolder (const PropertyHolder &)=delete
PropertyHolder & | operator= (const PropertyHolder &)=delete
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleBase &ref, const std::string &doc="none")
| Specializations for various GaudiHandles. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleArrayBase &ref, const std::string &doc="none")
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, DataObjectHandleBase &ref, const std::string &doc="none")
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
const SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...
MSG::Level | msgLevel () const
| get the cached level (originally extracted from the embedded MsgStream) More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces... >
| ~extend_interfaces () override=default
| Virtual destructor. More...

## Public Attributes
friend | AlgorithmManager

## Protected Member Functions
std::vector< IAlgTool * > & | tools ()
bool | isInitialized () const override
| Has the Algorithm already been initialized? More...
bool | isFinalized () const override
| Has the Algorithm already been finalized? More...
void | setIndex (const unsigned int &idx) override
| set instantiation index of Alg More...
Protected Member Functions inherited from DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > > >
void | initDataHandleHolder ()
| initializes all handles - called by the sysInitialize method of any descendant of this More...
Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >
Gaudi::Details::PropertyBase * | property (const std::string &name) const
Protected Member Functions inherited from CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >
MSG::Level | setUpMessaging ()
| Set up local caches. More...
MSG::Level | resetMessaging ()
| Reinitialize internal states. More...
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...

## Protected Attributes
std::unique_ptr< IDataHandleVisitor > | m_updateDataHandles
| Hook for for derived classes to provide a custom visitor for data handles. More...
Protected Attributes inherited from DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > > >
DataObjIDColl | m_inputDataObjs
DataObjIDColl | m_outputDataObjs

## Private Member Functions
void | initToolHandles () const
unsigned int | maxErrors () const
template<typename IFace >
SmartIF< IFace > & | get_svc_ (SmartIF< IFace > &p, const char *service_name) 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...
Algorithm & | operator= (const Algorithm &rhs)
| Private assignment operator: NO ASSIGNMENT ALLOWED. More...

## Private Attributes
Gaudi::StringKey | 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...
EventContext | m_event_context
std::vector< Algorithm * > | m_subAlgms
| Sub algorithms. More...
std::vector< IAlgTool * > | m_tools
std::vector< BaseToolHandle * > | m_toolHandles
std::vector< GaudiHandleArrayBase * > | m_toolHandleArrays
SmartIF< IMessageSvc > | m_MS
| Message service. More...
SmartIF< IDataProviderSvc > | m_EDS
| Event data service. More...
SmartIF< IHiveWhiteBoard > | m_WB
| Event data service (whiteboard) More...
SmartIF< IConversionSvc > | m_ECS
| Event conversion service. More...
SmartIF< IDataProviderSvc > | m_DDS
| Detector data service. More...
SmartIF< IConversionSvc > | m_DCS
| Detector conversion service. More...
SmartIF< IHistogramSvc > | m_HDS
| Histogram data service. More...
SmartIF< INTupleSvc > | m_NTS
| N tuple service. More...
SmartIF< IChronoStatSvc > | m_CSS
| Chrono & Stat Service. More...
SmartIF< IRndmGenSvc > | m_RGS
| Random Number Generator Service. More...
SmartIF< IExceptionSvc > | m_EXS
| Exception Handler Service. More...
SmartIF< IAuditorSvc > | m_pAuditorSvc
| Auditor Service. More...
SmartIF< IToolSvc > | m_ptoolSvc
| ToolSvc Service. More...
SmartIF< IMonitorSvc > | m_pMonitorSvc
| Online Monitoring Service. More...
SmartIF< IAlgContextSvc > | m_contextSvc
| Algorithm Context Service. More...
SmartIF< ITimelineSvc > | m_timelineSvc
| Timeline Service. More...
SmartIF< IAlgExecStateSvc > | m_aess
| Alg execution state mgr. More...
SmartIF< ISvcLocator > | m_pSvcLocator
| Pointer to service locator service. More...
Gaudi::Property< int > | m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
Gaudi::Property< bool > | m_isEnabled {this, "Enable", true, "should the algorithm be executed or not"}
Gaudi::Property< unsigned int > | m_errorMax {this, "ErrorMax", 1, "[[deprecated]] max number of errors"}
Gaudi::Property< bool > | m_auditInit {this, "AuditAlgorithms", false, "[[deprecated]] unused"}
Gaudi::Property< bool > | m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
Gaudi::Property< bool > | m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
Gaudi::Property< bool > | m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
Gaudi::Property< bool > | m_auditorExecute {this, "AuditExecute", false, "trigger auditor on execute()"}
Gaudi::Property< bool > | m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
Gaudi::Property< bool > | m_auditorBeginRun {this, "AuditBeginRun", false, "trigger auditor on beginRun()"}
Gaudi::Property< bool > | m_auditorEndRun {this, "AuditEndRun", false, "trigger auditor on endRun()"}
Gaudi::Property< bool > | m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
Gaudi::Property< bool > | m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
Gaudi::Property< bool > | m_doTimeline {this, "Timeline", true, "send events to TimelineSvc"}
Gaudi::Property< std::string > | m_monitorSvcName
Gaudi::Property< bool > | m_registerContext
Gaudi::Property< int > | m_cardinality {this, "Cardinality", 1, "how many clones to create - 0 means algo is reentrant"}
Gaudi::Property< std::vector< std::string > > | m_neededResources
Gaudi::Property< bool > | m_isIOBound
Gaudi::Property< bool > | m_filterCircDeps
std::mutex | m_lock
| for re-entrant Algs More...
bool | m_filterPassed = true
| Filter passed 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...

## 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 79 of file Algorithm.h.

## Member Typedef Documentation

typedef Gaudi::PluginService::Factory<IAlgorithm*, const std::string&, ISvcLocator*> Algorithm::Factory

Definition at line 85 of file Algorithm.h.

## Constructor & Destructor Documentation

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

Constructor.

Parameters

  name | The algorithm object's name
  svcloc | A pointer to a service location service

Definition at line 47 of file Algorithm.cpp.

55 {
56 PyErr_Print();
57 } else if ( PyLong_Check( c ) ) {
58 sc = PyLong_AsLong( c );
59 } else {
60 std::string msg( " call_python_method unexpected type from '" );
61 msg += method;
62 msg += "().getCode()' ";
63 PyErr_SetString( PyExc_TypeError, msg.c_str() );
64 PyErr_Print();
65 }
66 // release used objects
67 Py_XDECREF( c );
68 Py_XDECREF( r );
69 //
70 return sc;
71 }
72 // ============================================================================
73
74 // ============================================================================
CommonMessagingBase::msg
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:121
gaudirun.c
c
Definition: gaudirun.py:407
std::string
STL class.

Algorithm::Algorithm | ( | const Algorithm & | a | ) |
| private

Private Copy constructor: NO COPY ALLOWED.

## Member Function Documentation

void Algorithm::acceptDHVisitor | ( | IDataHandleVisitor * | vis | ) | const
| override virtual

Definition at line 231 of file Algorithm.cpp.

template<class T >

void Algorithm::addToolsArray | ( | ToolHandleArray< T > & | hndlArr | ) |
| inline

Definition at line 466 of file Algorithm.h.

467 {
468 m_toolHandleArrays.push_back( &hndlArr );
469 }
Algorithm::m_toolHandleArrays
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: Algorithm.h:525
std::vector::push_back
T push_back(T...args)

SmartIF< IAlgExecStateSvc > & Algorithm::algExecStateSvc | ( |  | ) | const

Definition at line 793 of file Algorithm.cpp.

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

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

Definition at line 794 of file Algorithm.cpp.

StatusCode Algorithm::beginRun | ( |  | ) |
| override

Algorithm begin run.

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

Definition at line 452 of file Algorithm.cpp.

unsigned int Algorithm::cardinality | ( |  | ) | const
| inline override

Return the cardinality.

Definition at line 493 of file Algorithm.h.

493 { return m_cardinality; }
Algorithm::m_cardinality
Gaudi::Property< int > m_cardinality
Definition: Algorithm.h:582

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

Definition at line 263 of file Algorithm.h.

263 { return chronoSvc(); }
Algorithm::chronoSvc
SmartIF< IChronoStatSvc > & chronoSvc() const
The standard Chrono & Stat service, Return a pointer to the service if present.
Definition: Algorithm.cpp:795

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

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

Definition at line 795 of file Algorithm.cpp.

void Algorithm::commitHandles | ( |  | ) |
| override

Definition at line 958 of file Algorithm.cpp.

StatusCode Algorithm::configure | ( |  | ) |
| inline override

Dummy implementation of IStateful::configure() method.

Definition at line 176 of file Algorithm.h.

176 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
Definition: StatusCode.h:31

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

get Algorithm Context Service

Definition at line 805 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

  type | The concrete algorithm class of the sub algorithm
  name | The name to be given to the sub algorithm
  pSubAlg | Set to point to the newly created algorithm object

Definition at line 836 of file Algorithm.cpp.

template<class T >

void Algorithm::declareInfo | ( | const std::string & | name,
|  | const T & | var,
|  | const std::string & | desc
| ) |  | const
| inline

Declare monitoring information.

Parameters

  name | Monitoring information name known to the external system
  var | Monitoring Listener address (the item to monitor...)
  desc | Textual description of the information being monitored

Definition at line 415 of file Algorithm.h.

416 {
417 IMonitorSvc* mS = monitorSvc().get();
418 if ( mS ) mS->declareInfo( name, var, desc, this );
419 }
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:82
IMonitorSvc
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:24
Algorithm::monitorSvc
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
Definition: Algorithm.h:400
IMonitorSvc::declareInfo
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

  name | Monitoring information name known to the external system
  format | Format information
  var | Monitoring Listener address
  size | Monitoring Listener address size
  desc | Textual description of the information being monitored

Definition at line 428 of file Algorithm.h.

430 {
431 IMonitorSvc* mS = monitorSvc().get();
432 if ( mS ) mS->declareInfo( name, format, var, size, desc, this );
433 }
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:82
IMonitorSvc
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:24
Algorithm::monitorSvc
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
Definition: Algorithm.h:400
IMonitorSvc::declareInfo
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
template<class T >

Gaudi::Details::PropertyBase* Algorithm::declareProperty | ( | const std::string & | name,
|  | ToolHandle< T > & | hndl,
|  | const std::string & | doc = `"none"`
| ) |  |
| inline

Definition at line 372 of file Algorithm.h.

374 {
375 this->declareTool( hndl, hndl.typeAndName() ).ignore();
376 return PropertyHolderImpl::declareProperty( name, hndl, doc );
377 }
PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Details::PropertyBase &prop)
Declare a property.
Definition: PropertyHolder.h:99
ToolHandle::typeAndName
std::string typeAndName() const override
Definition: ToolHandle.h:223
Algorithm::declareTool
StatusCode declareTool(ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
Definition: Algorithm.h:450
template<class T >

Gaudi::Details::PropertyBase* Algorithm::declareProperty | ( | const std::string & | name,
|  | ToolHandleArray< T > & | hndlArr,
|  | const std::string & | doc = `"none"`
| ) |  |
| inline

Definition at line 383 of file Algorithm.h.

385 {
386 addToolsArray( hndlArr );
387 return PropertyHolderImpl::declareProperty( name, hndlArr, doc );
388 }
Algorithm::addToolsArray
void addToolsArray(ToolHandleArray< T > &hndlArr)
Definition: Algorithm.h:466
PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Details::PropertyBase &prop)
Declare a property.
Definition: PropertyHolder.h:99
template<class T >

StatusCode Algorithm::declareTool | ( | ToolHandle< T > & | handle,
|  | std::string | toolTypeAndName,
|  | bool | createIf = `true`
| ) |  |
| inline

Definition at line 450 of file Algorithm.h.

451 {
452
453 StatusCode sc = handle.initialize( toolTypeAndName, handle.isPublic() ? nullptr : this, createIf );
454 if ( UNLIKELY( !sc ) ) {
455 throw GaudiException{std::string{"Cannot create handle for "} + ( handle.isPublic() ? "public" : "private" ) +
456 " tool " + toolTypeAndName,
457 name(), sc};
458 }
459
460 m_toolHandles.push_back( &handle );
461
462 return sc;
463 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:128
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:22
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:731
ToolHandleInfo::isPublic
bool isPublic() const noexcept
Definition: ToolHandle.h:37
Algorithm::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: Algorithm.h:524
std::string
STL class.
std::vector::push_back
T push_back(T...args)
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
ToolHandle::initialize
StatusCode initialize(const std::string &toolTypeAndName, const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:185

void Algorithm::deregisterTool | ( | IAlgTool * | tool | ) | const

Definition at line 984 of file Algorithm.cpp.

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

The standard detector data persistency conversion service.

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

Definition at line 797 of file Algorithm.cpp.

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

Definition at line 275 of file Algorithm.h.

275 { return detCnvSvc(); }
Algorithm::detCnvSvc
SmartIF< IConversionSvc > & detCnvSvc() const
The standard detector data persistency conversion service.
Definition: Algorithm.cpp:797

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

Definition at line 269 of file Algorithm.h.

269 { return detSvc(); }
Algorithm::detSvc
SmartIF< IDataProviderSvc > & detSvc() const
The standard detector data service.
Definition: Algorithm.cpp:796

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

The standard detector data service.

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

Definition at line 796 of file Algorithm.cpp.

StatusCode Algorithm::endRun | ( |  | ) |
| override

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

Definition at line 500 of file Algorithm.cpp.

unsigned int Algorithm::errorCount | ( |  | ) | const

Get the number of failures of the algorithm.

Definition at line 1000 of file Algorithm.cpp.

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

The standard event data persistency conversion service.

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

Definition at line 799 of file Algorithm.cpp.

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

Definition at line 289 of file Algorithm.h.

290 {
291 return eventCnvSvc();
292 }
Algorithm::eventCnvSvc
SmartIF< IConversionSvc > & eventCnvSvc() const
The standard event data persistency conversion service.
Definition: Algorithm.cpp:799

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

Definition at line 283 of file Algorithm.h.

283 { return eventSvc(); }
Algorithm::eventSvc
SmartIF< IDataProviderSvc > & eventSvc() const
The standard event data service.
Definition: Algorithm.cpp:798

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

The standard event data service.

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

Definition at line 798 of file Algorithm.cpp.

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

shortcut for method eventSvc

Definition at line 282 of file Algorithm.h.

282 { return eventSvc(); }
Algorithm::eventSvc
SmartIF< IDataProviderSvc > & eventSvc() const
The standard event data service.
Definition: Algorithm.cpp:798

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

Get the exception Service.

Definition at line 804 of file Algorithm.cpp.

bool Algorithm::filterPassed | ( |  | ) | const
| override

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

Definition at line 762 of file Algorithm.cpp.

StatusCode Algorithm::finalize | ( |  | ) |
| inline override

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

Definition at line 187 of file Algorithm.h.

187 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
Definition: StatusCode.h:31

Gaudi::StateMachine::State Algorithm::FSMState | ( |  | ) | const
| inline override

returns the current state of the algorithm

Definition at line 193 of file Algorithm.h.

193 { return m_state; }
Algorithm::m_state
Gaudi::StateMachine::State m_state
flag indicating whether ToolHandle tools have been added to m_tools
Definition: Algorithm.h:600
template<typename IFace >

SmartIF< IFace > & Algorithm::get_svc_ | ( | SmartIF< IFace > & | p,
|  | const char * | service_name
| ) |  | const
| private

Definition at line 781 of file Algorithm.cpp.

const EventContext& Algorithm::getContext | ( |  | ) | const
| inline override

get the context

Definition at line 438 of file Algorithm.h.

438 { return m_event_context; }
Algorithm::m_event_context
EventContext m_event_context
Definition: Algorithm.h:519

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

Definition at line 298 of file Algorithm.h.

298 { return histoSvc(); }
Algorithm::histoSvc
SmartIF< IHistogramSvc > & histoSvc() const
The standard histogram service.
Definition: Algorithm.cpp:800

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

The standard histogram service.

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

Definition at line 800 of file Algorithm.cpp.

unsigned int Algorithm::index | ( |  | ) | const
| override

Definition at line 737 of file Algorithm.cpp.

StatusCode Algorithm::initialize | ( |  | ) |
| inline override

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

Definition at line 181 of file Algorithm.h.

181 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
Definition: StatusCode.h:31

void Algorithm::initToolHandles | ( |  | ) | const
| private

Definition at line 857 of file Algorithm.cpp.

bool Algorithm::isEnabled | ( |  | ) | const
| override

Is this algorithm enabled or disabled?

Definition at line 760 of file Algorithm.cpp.

bool Algorithm::isExecuted | ( |  | ) | const
| override

Has this algorithm been executed since the last reset?

Definition at line 741 of file Algorithm.cpp.

bool Algorithm::isFinalized | ( |  | ) | const
| inline override protected

Has the Algorithm already been finalized?

Definition at line 502 of file Algorithm.h.

502 { return Gaudi::StateMachine::CONFIGURED == m_state; }
Gaudi::StateMachine::CONFIGURED
Definition: StateMachine.h:16
Algorithm::m_state
Gaudi::StateMachine::State m_state
flag indicating whether ToolHandle tools have been added to m_tools
Definition: Algorithm.h:600

bool Algorithm::isInitialized | ( |  | ) | const
| inline override protected

Has the Algorithm already been initialized?

Definition at line 499 of file Algorithm.h.

499 { return Gaudi::StateMachine::INITIALIZED == m_state; }
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:17
Algorithm::m_state
Gaudi::StateMachine::State m_state
flag indicating whether ToolHandle tools have been added to m_tools
Definition: Algorithm.h:600

bool Algorithm::isIOBound | ( |  | ) | const
| inline

Definition at line 474 of file Algorithm.h.

474 { return m_isIOBound; }
Algorithm::m_isIOBound
Gaudi::Property< bool > m_isIOBound
Definition: Algorithm.h:586

bool Algorithm::isSequence | ( |  | ) | const
| inline override

Are we a Sequence?

Definition at line 220 of file Algorithm.h.

220 { return false; }

unsigned int Algorithm::maxErrors | ( |  | ) | const
| inline private

Definition at line 512 of file Algorithm.h.

512 { return m_errorMax; }
Algorithm::m_errorMax
Gaudi::Property< unsigned int > m_errorMax
Definition: Algorithm.h:561

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

  NULL | No monitor service is present
  non-NULL | A monitor service is present and available to be used

Definition at line 400 of file Algorithm.h.

401 {
402 // If not already located try to locate it without forcing a creation
403 if ( !m_pMonitorSvc ) {
404 m_pMonitorSvc = service( m_monitorSvcName, false, true ); // do not create and be quiet
405 }
406 return m_pMonitorSvc;
407 }
Algorithm::m_pMonitorSvc
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: Algorithm.h:544
Algorithm::m_monitorSvcName
Gaudi::Property< std::string > m_monitorSvcName
Definition: Algorithm.h:576
Algorithm::service
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn&#39;t already exist.
Definition: Algorithm.h:233

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 731 of file Algorithm.cpp.

const Gaudi::StringKey & Algorithm::nameKey | ( |  | ) | const
| override

Definition at line 733 of file Algorithm.cpp.

const std::vector<std::string>& Algorithm::neededResources | ( |  | ) | const
| inline override

Definition at line 495 of file Algorithm.h.

495 { return m_neededResources; }
Algorithm::m_neededResources
Gaudi::Property< std::vector< std::string > > m_neededResources
Definition: Algorithm.h:583

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

Definition at line 304 of file Algorithm.h.

304 { return ntupleSvc(); }
Algorithm::ntupleSvc
SmartIF< INTupleSvc > & ntupleSvc() const
The standard N tuple service.
Definition: Algorithm.cpp:801

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

The standard N tuple service.

Returns a pointer to the N tuple service if present.

Definition at line 801 of file Algorithm.cpp.

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

Private assignment operator: NO ASSIGNMENT ALLOWED.

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

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

Definition at line 802 of file Algorithm.cpp.

bool Algorithm::registerContext | ( |  | ) | const
| inline

register for Algorithm Context Service?

Definition at line 336 of file Algorithm.h.

336 { return m_registerContext; }
Algorithm::m_registerContext
Gaudi::Property< bool > m_registerContext
Definition: Algorithm.h:579

void Algorithm::registerTool | ( | IAlgTool * | tool | ) | const

Definition at line 976 of file Algorithm.cpp.

StatusCode Algorithm::reinitialize | ( |  | ) |
| override

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

Definition at line 694 of file Algorithm.cpp.

void Algorithm::resetExecuted | ( |  | ) |
| override

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

Definition at line 754 of file Algorithm.cpp.

StatusCode Algorithm::restart | ( |  | ) |
| override

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

Definition at line 715 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 233 of file Algorithm.h.

234 {
235 return service_i( name, createIf, T::interfaceID(), (void**)&psvc );
236 }
Algorithm::service_i
StatusCode service_i(const std::string &svcName, bool createIf, const InterfaceID &iid, void **ppSvc) const
implementation of service method
Definition: Algorithm.cpp:938
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 240 of file Algorithm.h.

241 {
242 return service_i( svcType, svcName, T::interfaceID(), (void**)&psvc );
243 }
Algorithm::service_i
StatusCode service_i(const std::string &svcName, bool createIf, const InterfaceID &iid, void **ppSvc) const
implementation of service method
Definition: Algorithm.cpp:938

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 951 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 249 of file Algorithm.h.

250 {
251 return service( name, createIf, quiet ).as<T>();
252 }
Algorithm::service
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn&#39;t already exist.
Definition: Algorithm.h:233

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

implementation of service method

Protected Member Functions.

Definition at line 938 of file Algorithm.cpp.

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

Definition at line 944 of file Algorithm.cpp.

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

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 809 of file Algorithm.cpp.

void Algorithm::setExecuted | ( | bool | state | ) | const
| override

Set the executed flag to the specified state.

Definition at line 747 of file Algorithm.cpp.

void Algorithm::setFilterPassed | ( | bool | state | ) | const
| override

Set the filter passed flag to the specified state.

Definition at line 768 of file Algorithm.cpp.

void Algorithm::setIndex | ( | const unsigned int & | idx | ) |
| override protected

set instantiation index of Alg

Definition at line 739 of file Algorithm.cpp.

void Algorithm::setIOBound | ( | bool | value | ) |
| inline

Definition at line 476 of file Algorithm.h.

476 { m_isIOBound = value; }
Algorithm::m_isIOBound
Gaudi::Property< bool > m_isIOBound
Definition: Algorithm.h:586

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 812 of file Algorithm.cpp.

void Algorithm::setType | ( | const std::string & | type | ) |
| inline override

Definition at line 169 of file Algorithm.h.

169 { m_type = type; } // BH, TODO: move to proper place
Algorithm::m_type
std::string m_type
Algorithm&#39;s type.
Definition: Algorithm.h:516
Algorithm::type
const std::string & type() const override
The type of the algorithm object.
Definition: Algorithm.h:168

StatusCode Algorithm::start | ( |  | ) |
| inline override

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

Definition at line 183 of file Algorithm.h.

183 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
Definition: StatusCode.h:31

StatusCode Algorithm::stop | ( |  | ) |
| inline override

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

Definition at line 185 of file Algorithm.h.

185 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
Definition: StatusCode.h:31

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

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

Definition at line 776 of file Algorithm.cpp.

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

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

Definition at line 778 of file Algorithm.cpp.

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

shortcut for method serviceLocator

Definition at line 329 of file Algorithm.h.

329 { return serviceLocator(); }
Algorithm::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:809

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 407 of file Algorithm.cpp.

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 455 of file Algorithm.cpp.

StatusCode Algorithm::sysExecute | ( | const EventContext & | ctx | ) |
| 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 502 of file Algorithm.cpp.

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 643 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 78 of file Algorithm.cpp.

81 : Algorithm( name, Gaudi::svcLocator() ), m_self( self )
82 {
83 // The owner of the Algorithm is Python (as creator) therefore
84 // it should not be deleted by Gaudi (added an extra addRef()).
85 addRef();
86 addRef();
87 }
88 // ============================================================================
89
90 // ============================================================================
91 StatusCode GaudiPython::PyAlgorithm::initialize() { return GaudiPython::call_python_method( m_self, "initialize" ); }
92 // ============================================================================
93 StatusCode GaudiPython::PyAlgorithm::start() { return GaudiPython::call_python_method( m_self, "start" ); }
94 // ============================================================================
95 StatusCode GaudiPython::PyAlgorithm::execute() { return GaudiPython::call_python_method( m_self, "execute" ); }
96 // ============================================================================
97 StatusCode GaudiPython::PyAlgorithm::stop() { return GaudiPython::call_python_method( m_self, "stop" ); }
98 // ============================================================================
99 StatusCode GaudiPython::PyAlgorithm::finalize() { return GaudiPython::call_python_method( m_self, "finalize" ); }
100
101 StatusCode GaudiPython::PyAlgorithm::beginRun() { return GaudiPython::call_python_method( m_self, "beginRun" ); }
102 StatusCode GaudiPython::PyAlgorithm::endRun() { return GaudiPython::call_python_method( m_self, "endRun" ); }
103
GaudiPython::PyAlgorithm::finalize
StatusCode finalize() override
Definition: Algorithm.cpp:99
GaudiPython::PyAlgorithm::execute
StatusCode execute() override
Definition: Algorithm.cpp:95
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:731
GaudiPython::PyAlgorithm::endRun
StatusCode endRun() override
Definition: Algorithm.cpp:102
GaudiPython::PyAlgorithm::initialize
StatusCode initialize() override
Definition: Algorithm.cpp:91
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
GaudiPython::PyAlgorithm::stop
StatusCode stop() override
Definition: Algorithm.cpp:97
Algorithm::Algorithm
Algorithm(const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.cpp:47
GaudiPython::PyAlgorithm::beginRun
StatusCode beginRun() override
Definition: Algorithm.cpp:101
GaudiPython::PyAlgorithm::start
StatusCode start() override
Definition: Algorithm.cpp:93
GaudiPython::call_python_method
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:29

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 296 of file Algorithm.cpp.

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 354 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.

Definition at line 244 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 596 of file Algorithm.cpp.

Gaudi::StateMachine::State Algorithm::targetFSMState | ( |  | ) | const
| inline override

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

Definition at line 195 of file Algorithm.h.

195 { return m_targetState; }
Algorithm::m_targetState
Gaudi::StateMachine::State m_targetState
Algorithm has been initialized flag.
Definition: Algorithm.h:601

StatusCode Algorithm::terminate | ( |  | ) |
| inline override

Dummy implementation of IStateful::terminate() method.

Definition at line 178 of file Algorithm.h.

178 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
Definition: StatusCode.h:31

SmartIF< ITimelineSvc > & Algorithm::timelineSvc | ( |  | ) | const

Definition at line 806 of file Algorithm.cpp.

std::ostream & Algorithm::toControlFlowExpression | ( | std::ostream & | os | ) | const
| override

Produce string represention of the control flow expression.

Definition at line 995 of file Algorithm.cpp.

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

Definition at line 922 of file Algorithm.cpp.

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

Definition at line 928 of file Algorithm.cpp.

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

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

Definition at line 803 of file Algorithm.cpp.

const std::string& Algorithm::type | ( |  | ) | const
| inline override

The type of the algorithm object.

Definition at line 168 of file Algorithm.h.

168 { return m_type; }
Algorithm::m_type
std::string m_type
Algorithm&#39;s type.
Definition: Algorithm.h:516

const std::string & Algorithm::version | ( |  | ) | const
| override

Definition at line 735 of file Algorithm.cpp.

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

Definition at line 807 of file Algorithm.cpp.

## Member Data Documentation

friend Algorithm::AlgorithmManager

Definition at line 87 of file Algorithm.h.

SmartIF<IAlgExecStateSvc> Algorithm::m_aess
| mutable private

Alg execution state mgr.

Definition at line 548 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_auditInit {this, "AuditAlgorithms", false, "[[deprecated]] unused"}
| private

Definition at line 563 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_auditorBeginRun {this, "AuditBeginRun", false, "trigger auditor on beginRun()"}
| private

Definition at line 569 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_auditorEndRun {this, "AuditEndRun", false, "trigger auditor on endRun()"}
| private

Definition at line 570 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_auditorExecute {this, "AuditExecute", false, "trigger auditor on execute()"}
| private

Definition at line 567 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
| private

Definition at line 568 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
| private

Definition at line 564 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
| private

Definition at line 565 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
| private

Definition at line 566 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
| private

Definition at line 571 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
| private

Definition at line 572 of file Algorithm.h.

Gaudi::Property<int> Algorithm::m_cardinality {this, "Cardinality", 1, "how many clones to create - 0 means algo is reentrant"}
| private

Definition at line 582 of file Algorithm.h.

SmartIF<IAlgContextSvc> Algorithm::m_contextSvc
| mutable private

Algorithm Context Service.

Definition at line 545 of file Algorithm.h.

SmartIF<IChronoStatSvc> Algorithm::m_CSS
| mutable private

Chrono & Stat Service.

Definition at line 539 of file Algorithm.h.

SmartIF<IConversionSvc> Algorithm::m_DCS
| mutable private

Detector conversion service.

Definition at line 536 of file Algorithm.h.

SmartIF<IDataProviderSvc> Algorithm::m_DDS
| mutable private

Detector data service.

Definition at line 535 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_doTimeline {this, "Timeline", true, "send events to TimelineSvc"}
| private

Definition at line 574 of file Algorithm.h.

SmartIF<IConversionSvc> Algorithm::m_ECS
| mutable private

Event conversion service.

Definition at line 534 of file Algorithm.h.

SmartIF<IDataProviderSvc> Algorithm::m_EDS
| mutable private

Event data service.

Definition at line 532 of file Algorithm.h.

Gaudi::Property<unsigned int> Algorithm::m_errorMax {this, "ErrorMax", 1, "[[deprecated]] max number of errors"}
| private

Definition at line 561 of file Algorithm.h.

EventContext Algorithm::m_event_context
| private

Definition at line 519 of file Algorithm.h.

SmartIF<IExceptionSvc> Algorithm::m_EXS
| mutable private

Exception Handler Service.

Definition at line 541 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_filterCircDeps
| private

Initial value:
{this, "FilterCircularDependencies", true,
"filter out circular data dependencies"}

Definition at line 590 of file Algorithm.h.

bool Algorithm::m_filterPassed = true
| private

Filter passed flag.

Definition at line 595 of file Algorithm.h.

SmartIF<IHistogramSvc> Algorithm::m_HDS
| mutable private

Histogram data service.

Definition at line 537 of file Algorithm.h.

unsigned int Algorithm::m_index
| private

Algorithm's index.

Definition at line 518 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_isEnabled {this, "Enable", true, "should the algorithm be executed or not"}
| private

Definition at line 559 of file Algorithm.h.

bool Algorithm::m_isExecuted = false
| private

Algorithm is executed flag.

Definition at line 596 of file Algorithm.h.

bool Algorithm::m_isFinalized
| private

Algorithm has been finalized flag.

Definition at line 602 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_isIOBound
| private

Initial value:
{this, "IsIOBound", false,
"if the algorithm is I/O-bound (in the broad sense of Von Neumann bottleneck)"}

Definition at line 586 of file Algorithm.h.

std::mutex Algorithm::m_lock
| private

for re-entrant Algs

Definition at line 593 of file Algorithm.h.

Gaudi::Property<std::string> Algorithm::m_monitorSvcName
| private

Initial value:
{this, "MonitorService", "MonitorSvc",
"name to use for Monitor Service"}

Definition at line 576 of file Algorithm.h.

SmartIF<IMessageSvc> Algorithm::m_MS
| mutable private

Message service.

Definition at line 531 of file Algorithm.h.

Gaudi::StringKey Algorithm::m_name
| private

Algorithm's name for identification.

Definition at line 515 of file Algorithm.h.

Gaudi::Property<std::vector<std::string> > Algorithm::m_neededResources
| private

Initial value:
{
this, "NeededResources", {}, "named resources needed during event looping"}

Definition at line 583 of file Algorithm.h.

SmartIF<INTupleSvc> Algorithm::m_NTS
| mutable private

N tuple service.

Definition at line 538 of file Algorithm.h.

Gaudi::Property<int> Algorithm::m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
| private

Definition at line 558 of file Algorithm.h.

SmartIF<IAuditorSvc> Algorithm::m_pAuditorSvc
| mutable private

Auditor Service.

Definition at line 542 of file Algorithm.h.

SmartIF<IMonitorSvc> Algorithm::m_pMonitorSvc
| mutable private

Online Monitoring Service.

Definition at line 544 of file Algorithm.h.

SmartIF<ISvcLocator> Algorithm::m_pSvcLocator
| private

Pointer to service locator service.

Definition at line 550 of file Algorithm.h.

SmartIF<IToolSvc> Algorithm::m_ptoolSvc
| mutable private

ToolSvc Service.

Definition at line 543 of file Algorithm.h.

Gaudi::Property<bool> Algorithm::m_registerContext
| private

Initial value:
{this, "RegisterForContextService", false,
"flag to enforce the registration for Algorithm Context Service"}

Definition at line 579 of file Algorithm.h.

SmartIF<IRndmGenSvc> Algorithm::m_RGS
| mutable private

Random Number Generator Service.

Definition at line 540 of file Algorithm.h.

Gaudi::StateMachine::State Algorithm::m_state = Gaudi::StateMachine::CONFIGURED
| private

flag indicating whether ToolHandle tools have been added to m_tools

Algorithm has been initialized flag

Definition at line 600 of file Algorithm.h.

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

Sub algorithms.

Definition at line 520 of file Algorithm.h.

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

Algorithm has been initialized flag.

Definition at line 601 of file Algorithm.h.

SmartIF<ITimelineSvc> Algorithm::m_timelineSvc
| mutable private

Timeline Service.

Definition at line 547 of file Algorithm.h.

std::vector<GaudiHandleArrayBase*> Algorithm::m_toolHandleArrays
| mutable private

Definition at line 525 of file Algorithm.h.

std::vector<BaseToolHandle*> Algorithm::m_toolHandles
| mutable private

Definition at line 524 of file Algorithm.h.

bool Algorithm::m_toolHandlesInit = false
| mutable private

Definition at line 598 of file Algorithm.h.

std::vector<IAlgTool*> Algorithm::m_tools
| mutable private

Definition at line 523 of file Algorithm.h.

std::string Algorithm::m_type
| private

Algorithm's type.

Definition at line 516 of file Algorithm.h.

std::unique_ptr<IDataHandleVisitor> Algorithm::m_updateDataHandles
| protected

Hook for for derived classes to provide a custom visitor for data handles.

Definition at line 554 of file Algorithm.h.

std::string Algorithm::m_version
| private

Algorithm's version.

Definition at line 517 of file Algorithm.h.

SmartIF<IHiveWhiteBoard> Algorithm::m_WB
| mutable private

Event data service (whiteboard)

Definition at line 533 of file Algorithm.h.

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

- GaudiKernel/GaudiKernel/Algorithm.h
- GaudiPython/src/Lib/Algorithm.cpp