48 #ifndef PACKAGE_VERSION 49 # define PACKAGE_VERSION "unknown" 81 PropertyHolder<CommonMessaging<implements<IAlgorithm, IDataHandleHolder, IProperty, IStateful>>>>> {
84 typedef Gaudi::PluginService::Factory<IAlgorithm*( const std::string&, ISvcLocator* )>
Factory;
172 unsigned int index()
const override;
205 bool isEnabled()
const override;
211 unsigned int errorCount()
const;
216 return service_i( name, createIf, T::interfaceID(), (
void**)&psvc );
222 return service_i( svcType, svcName, T::interfaceID(), reinterpret_cast<void**>( &psvc ) );
230 return service( name, createIf, quiet ).
as<T>();
275 return eventCnvSvc();
340 this->declareTool( hndl, hndl.
typeAndName() ).ignore();
350 addToolsArray( hndlArr );
366 if ( !m_pMonitorSvc ) {
367 m_pMonitorSvc = service( m_monitorSvcName,
false,
true );
369 return m_pMonitorSvc;
380 if ( mS ) mS->
declareInfo( name, var, desc,
this );
393 if ( mS ) mS->
declareInfo( name, format, var, size, desc,
this );
400 void registerTool(
IAlgTool* tool )
const;
401 void deregisterTool(
IAlgTool* tool )
const;
405 return this->declareTool( handle, handle.
typeAndName(), createIf );
414 " tool " + toolTypeAndName,
418 m_toolHandles.push_back( &handle );
425 m_toolHandleArrays.push_back( &hndlArr );
443 void initToolHandles()
const;
450 unsigned int cardinality()
const override {
return m_cardinality; }
462 void setIndex(
const unsigned int& idx )
override;
481 unsigned int m_index = 0;
489 template <
typename IFace>
528 "[[deprecated]] unused"};
530 "trigger auditor on initialize()"};
532 "trigger auditor on reinitialize()"};
536 "trigger auditor on finalize()"};
538 "trigger auditor on beginRun()"};
546 "name to use for Monitor Service"};
549 "flag to enforce the registration for Algorithm Context Service"};
551 Gaudi::Property<int> m_cardinality{
this,
"Cardinality", 0,
"how many clones to create - 0 means algo is reentrant"};
553 this,
"NeededResources", {},
"named resources needed during event looping"};
556 "if the algorithm is I/O-bound (in the broad sense of Von Neumann bottleneck)"};
560 "filter out circular data dependencies"};
562 mutable bool m_toolHandlesInit =
false;
575 void** ppSvc )
const;
StatusCode declareTool(ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
The AlgorithmManager class is in charge of the creation of concrete instances of Algorithms.
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.
void addToolsArray(ToolHandleArray< T > &hndlArr)
SmartIF< IAlgExecStateSvc > m_aess
Alg execution state mgr.
unsigned int cardinality() const override
Return the cardinality.
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
SmartIF< T > service(const std::string &name, bool createIf=true, bool quiet=false) const
Define general base for Gaudi exception.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
std::unique_ptr< IDataHandleVisitor > m_updateDataHandles
Hook for for derived classes to provide a custom visitor for data handles.
Implementation of property with value of concrete type.
void declareInfo(const std::string &name, const T &var, const std::string &desc) const
Declare monitoring information.
SmartIF< IExceptionSvc > m_EXS
Exception Handler Service.
StatusCode start() override
the default (empty) implementation of IStateful::start() method
SmartIF< IAlgContextSvc > m_contextSvc
Algorithm Context Service.
bool isSequence() const override
Are we a Sequence?
struct deprecated("use MergingTransformer instead")]] ListTransformer
SmartIF< IChronoStatSvc > m_CSS
Chrono & Stat Service.
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.
constexpr static const auto SUCCESS
SmartIF< IDataProviderSvc > & detDataService() const
SmartIF< IDataProviderSvc > m_DDS
Detector data service.
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool).
SmartIF< IToolSvc > m_ptoolSvc
ToolSvc Service.
bool registerContext() const
register for Algorithm Context Service?
This class represents an entry point to all the event specific data.
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
The helper class to represent the efficient "key" for access.
constexpr auto size(const C &c) noexcept(noexcept(c.size())) -> decltype(c.size())
SmartIF< IConversionSvc > & eventDataCnvService() const
PropertyMgr & operator=(const PropertyMgr &)=delete
Gaudi::StateMachine::State targetFSMState() const override
returns the state the algorithm will be in after the ongoing transition
SmartIF< IChronoStatSvc > & chronoStatService() const
void setType(const std::string &type) override
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
std::string m_version
Algorithm's version.
StatusCode declareTool(ToolHandle< T > &handle, bool createIf=true)
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
bool getDefaultAuditorValue(ISvcLocator *loc)
SmartIF< IConversionSvc > m_ECS
Event conversion service.
This class is used for returning status codes from appropriate routines.
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, TYPE &value, const std::string &doc="none")
Declare a property (templated)
Gaudi::StateMachine::State FSMState() const override
returns the current state of the algorithm
void setIOBound(bool value)
SmartIF< IHistogramSvc > m_HDS
Histogram data service.
SmartIF< IMessageSvc > m_MS
Message service.
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
SmartIF< ISvcLocator > m_pSvcLocator
Pointer to service locator service.
StatusCode terminate() override
Dummy implementation of IStateful::terminate() method.
Gaudi::PluginService::Factory< IAlgorithm *(const std::string &, ISvcLocator *)> Factory
SmartIF< IHistogramSvc > & histogramDataService() const
std::vector< IAlgTool * > m_tools
SmartIF< IConversionSvc > m_DCS
Detector conversion service.
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
SmartIF< IDataProviderSvc > & eventDataService() const
SmartIF< IDataProviderSvc > m_EDS
Event data service.
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
bool isInitialized() const override
Has the Algorithm already been initialized?
const std::string & type() const override
The type of the algorithm object.
bool m_beginRunCalled
temporary flags to check if derived class's begin/endRun methods called
SmartIF< INTupleSvc > m_NTS
N tuple service.
bool isReEntrant() const override
SmartIF< IRndmGenSvc > m_RGS
Random Number Generator Service.
unsigned int maxErrors() const
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
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)
const std::vector< std::string > & neededResources() const override
SmartIF< INTupleSvc > & ntupleService() const
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
std::string m_type
Algorithm's type.
Base class from which all concrete algorithm classes should be derived.
SmartIF< ITimelineSvc > m_timelineSvc
Timeline Service.
Gaudi::StringKey m_name
Algorithm's name for identification.
SmartIF< IConversionSvc > & detDataCnvService() const
const ValueType & value() const
Backward compatibility (.
SmartIF< IHiveWhiteBoard > m_WB
Event data service (whiteboard)
SmartIF< ISvcLocator > & svcLoc() const
shortcut for method serviceLocator
bool m_isFinalized
Algorithm has been finalized flag.
bool isFinalized() const override
Has the Algorithm already been finalized?
StatusCode configure() override
Dummy implementation of IStateful::configure() method.
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
std::vector< BaseToolHandle * > m_toolHandles
StatusCode stop() override
the default (empty) implementation of IStateful::stop() method
Helper functions to set/get the application return code.