48 #ifndef PACKAGE_VERSION 49 # define PACKAGE_VERSION "unknown" 81 PropertyHolder<CommonMessaging<implements<IAlgorithm, IDataHandleHolder, IProperty, IStateful>>>>> {
172 unsigned int index()
const override;
199 [[deprecated(
"try using Algorithm::Start instead" )]]
StatusCode beginRun()
override;
202 [[deprecated(
"try using Algorithm::Stop instead" )]]
StatusCode endRun()
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();
334 using PropertyHolderImpl::declareProperty;
340 this->declareTool( hndl, hndl.
typeAndName() ).ignore();
341 return PropertyHolderImpl::declareProperty(
name, hndl, doc );
350 addToolsArray( hndlArr );
351 return PropertyHolderImpl::declareProperty(
name, hndlArr, doc );
366 if ( !m_pMonitorSvc ) {
367 m_pMonitorSvc = service( m_monitorSvcName,
false,
true );
369 return m_pMonitorSvc;
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.
void addToolsArray(ToolHandleArray< T > &hndlArr)
constexpr auto size(const T &, Args &&...) noexcept
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.
SmartIF< IAlgExecStateSvc > m_aess
Alg execution state mgr.
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.
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.
SmartIF< IConversionSvc > & eventDataCnvService() const
SmartIF< IChronoStatSvc > m_CSS
Chrono & Stat Service.
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)
constexpr static const auto SUCCESS
bool isReEntrant() const override
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
SmartIF< IDataProviderSvc > m_DDS
Detector data service.
SmartIF< IConversionSvc > & detDataCnvService() const
SmartIF< IHistogramSvc > & histogramDataService() const
SmartIF< IDataProviderSvc > & detDataService() const
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm,...
void declareInfo(const std::string &name, const T &var, const std::string &desc) const
Declare monitoring information.
SmartIF< IToolSvc > m_ptoolSvc
ToolSvc Service.
This class represents an entry point to all the event specific data.
The helper class to represent the efficient "key" for access.
SmartIF< IDataProviderSvc > & eventDataService() const
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
void setType(const std::string &type) override
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
std::string m_version
Algorithm's version.
StatusCode declareTool(ToolHandle< T > &handle, bool createIf=true)
SmartIF< T > service(const std::string &name, bool createIf=true, bool quiet=false) const
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...
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.
bool getDefaultAuditorValue(ISvcLocator *loc)
SmartIF< IConversionSvc > m_ECS
Event conversion service.
This class is used for returning status codes from appropriate routines.
const ValueType & value() const
Backward compatibility (.
const std::string & type() const override
The type of the algorithm object.
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
std::vector< IAlgTool * > m_tools
SmartIF< IConversionSvc > m_DCS
Detector conversion service.
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
SmartIF< IDataProviderSvc > m_EDS
Event data service.
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
bool registerContext() const
register for Algorithm Context Service?
The IAlgorithm is the interface implemented by the Algorithm base class.
const std::vector< std::string > & neededResources() const override
bool m_beginRunCalled
temporary flags to check if derived class's begin/endRun methods called
SmartIF< INTupleSvc > m_NTS
N tuple service.
SmartIF< IRndmGenSvc > m_RGS
Random Number Generator Service.
bool isInitialized() const override
Has the Algorithm already been initialized?
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
std::string m_type
Algorithm's type.
unsigned int maxErrors() const
Base class from which all concrete algorithm classes should be derived.
SmartIF< ISvcLocator > & svcLoc() const
shortcut for method serviceLocator
SmartIF< ITimelineSvc > m_timelineSvc
Timeline Service.
bool isSequence() const override
Are we a Sequence?
Gaudi::StateMachine::State FSMState() const override
returns the current state of the algorithm
Gaudi::StringKey m_name
Algorithm's name for identification.
bool isFinalized() const override
Has the Algorithm already been finalized?
SmartIF< IHiveWhiteBoard > m_WB
Event data service (whiteboard)
bool m_isFinalized
Algorithm has been finalized flag.
unsigned int cardinality() const override
Return the cardinality.
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
Gaudi::StateMachine::State targetFSMState() const override
returns the state the algorithm will be in after the ongoing transition
Header file for std:chrono::duration-based Counters.
SmartIF< IChronoStatSvc > & chronoStatService() const
SmartIF< INTupleSvc > & ntupleService() const