All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GaudiSequencer Class Reference

Sequencer for executing several algorithms, stopping when one is faulty. More...

#include <GaudiAlg/GaudiSequencer.h>

Inheritance diagram for GaudiSequencer:
Collaboration diagram for GaudiSequencer:

Classes

class  AlgorithmEntry
 

Public Member Functions

 GaudiSequencer (const std::string &name, ISvcLocator *pSvcLocator)
 Standard constructor. More...
 
virtual ~GaudiSequencer ()
 Destructor. More...
 
virtual StatusCode initialize ()
 Algorithm initialization. More...
 
virtual StatusCode execute ()
 Algorithm execution. More...
 
virtual StatusCode finalize ()
 Algorithm finalization. More...
 
virtual StatusCode beginRun ()
 Algorithm beginRun. More...
 
virtual StatusCode endRun ()
 Algorithm endRun. More...
 
void resetExecuted ()
 Called before an event processing. More...
 
void membershipHandler (Property &theProp)
 for asynchronous changes in the list of algorithms More...
 
- Public Member Functions inherited from GaudiAlgorithm
virtual StatusCode sysExecute ()
 the generic actions for the execution. More...
 
void put (IDataProviderSvc *svc, DataObject *object, const std::string &address, const bool useRootInTES=true) const
 Register a data object or container into Gaudi Event Transient Store. More...
 
void put (DataObject *object, const std::string &address, const bool useRootInTES=true) const
 Register a data object or container into Gaudi Event Transient Store. More...
 
template<class TYPE >
Gaudi::Utils::GetData< TYPE >
::return_type 
get (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
 Templated access to the data in Gaudi Transient Store. More...
 
template<class TYPE >
Gaudi::Utils::GetData< TYPE >
::return_type 
getIfExists (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
 Templated access to the data in Gaudi Transient Store. More...
 
template<class TYPE >
Gaudi::Utils::GetData< TYPE >
::return_type 
get (const std::string &location, const bool useRootInTES=true) const
 Templated access to the data from Gaudi Event Transient Store. More...
 
template<class TYPE >
Gaudi::Utils::GetData< TYPE >
::return_type 
getIfExists (const std::string &location, const bool useRootInTES=true) const
 Templated access to the data in Gaudi Transient Store. More...
 
template<class TYPE >
TYPE * getDet (IDataProviderSvc *svc, const std::string &location) const
 Templated access to the detector data from the Gaudi Detector Transient Store. More...
 
template<class TYPE >
Gaudi::Utils::GetData< TYPE >
::return_type 
getDetIfExists (IDataProviderSvc *svc, const std::string &location) const
 Templated access to the detector data from the Gaudi Detector Transient Store. More...
 
template<class TYPE >
TYPE * getDet (const std::string &location) const
 Templated access to the detector data from the Gaudi Detector Transient Store. More...
 
template<class TYPE >
Gaudi::Utils::GetData< TYPE >
::return_type 
getDetIfExists (const std::string &location) const
 Templated access to the detector data from the Gaudi Detector Transient Store. More...
 
template<class TYPE >
bool exist (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
 Check the existence of a data object or container in the Gaudi Transient Event Store. More...
 
template<class TYPE >
bool exist (const std::string &location, const bool useRootInTES=true) const
 Check the existence of a data object or container in the Gaudi Transient Event Store. More...
 
template<class TYPE >
bool existDet (IDataProviderSvc *svc, const std::string &location) const
 Check the existence of detector objects in the Gaudi Transient Detector Store. More...
 
template<class TYPE >
bool existDet (const std::string &location) const
 Check the existence of detector objects in the Gaudi Transient Detector Store. More...
 
template<class TYPE , class TYPE2 >
Gaudi::Utils::GetData< TYPE >
::return_type 
getOrCreate (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
 Get the existing data object from Gaudi Event Transient store. More...
 
template<class TYPE , class TYPE2 >
Gaudi::Utils::GetData< TYPE >
::return_type 
getOrCreate (const std::string &location, const bool useRootInTES=true) const
 Get the existing data object from Gaudi Event Transient store. More...
 
 GaudiAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 Standard constructor (protected) More...
 
virtual ~GaudiAlgorithm ()
 destructor, virtual and protected More...
 
SmartIF< INTupleSvc > & evtColSvc () const
 Access the standard event collection service. More...
 
- Public Member Functions inherited from GaudiCommon< Algorithm >
Gaudi::Utils::GetData< TYPE >
::return_type 
get (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
 Templated access to the data in Gaudi Transient Store. More...
 
Gaudi::Utils::GetData< TYPE >
::return_type 
getIfExists (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
 Quicker version of the get function which bypasses the check on the retrieved data. More...
 
bool exist (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
 Check the existence of a data object or container in the Gaudi Transient Event Store. More...
 
Gaudi::Utils::GetData< TYPE >
::return_type 
getOrCreate (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
 Get the existing data object from Gaudi Event Transient store. More...
 
DataObjectput (IDataProviderSvc *svc, DataObject *object, const std::string &location, const bool useRootInTES=true) const
 Register a data object or container into Gaudi Event Transient Store. More...
 
TOOL * tool (const std::string &type, const std::string &name, const IInterface *parent=0, bool create=true) const
 Useful method for the easy location of tools. More...
 
TOOL * tool (const std::string &type, const IInterface *parent=0, bool create=true) const
 A useful method for the easy location of tools. More...
 
SmartIF< SERVICE > svc (const std::string &name, const bool create=true) const
 A useful method for the easy location of services. More...
 
IUpdateManagerSvcupdMgrSvc () const
 Short-cut to locate the Update Manager Service. More...
 
StatusCode Error (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
 Print the error message and return with the given StatusCode. More...
 
StatusCode Warning (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
 Print the warning message and return with the given StatusCode. More...
 
StatusCode Info (const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const size_t mx=10) const
 Print the info message and return with the given StatusCode. More...
 
StatusCode Print (const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const
 Print the message and return with the given StatusCode. More...
 
void Assert (const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
 Assertion - throw exception if the given condition is not fulfilled. More...
 
void Assert (const bool ok, const char *message, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
 Assertion - throw exception if the given condition is not fulfilled. More...
 
void Exception (const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
 Create and (re)-throw a given GaudiException. More...
 
void Exception (const std::string &msg, const std::exception &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
 Create and (re)-throw a given exception. More...
 
void Exception (const std::string &msg="no message", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
 Create and throw an exception with the given message. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream ( MSG::ALWAYS ) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream ( MSG::FATAL ) More...
 
MsgStreamerr () const
 shortcut for the method msgStream ( MSG::ERROR ) More...
 
MsgStreamerror () const
 shortcut for the method msgStream ( MSG::ERROR ) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream ( MSG::WARNING ) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream ( MSG::INFO ) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream ( MSG::DEBUG ) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream ( MSG::VERBOSE ) More...
 
MsgStreammsg () const
 shortcut for the method msgStream ( MSG::INFO ) More...
 
const Statisticscounters () const
 accessor to all counters More...
 
StatEntitycounter (const std::string &tag) const
 accessor to certain counter by name More...
 
MSG::Level msgLevel () const
 The current message service output level. More...
 
bool msgLevel (const MSG::Level level) const
 Test the output level. More...
 
void resetMsgStream () const
 Reset (delete) the current message stream object. More...
 
bool typePrint () const
 Insert the actual C++ type of the algorithm/tool in the messages ? More...
 
bool propsPrint () const
 Print properties at initialization ? More...
 
bool statPrint () const
 Print statistical counters at finalization ? More...
 
bool errorsPrint () const
 Print error counters at finalization ? More...
 
long printStat (const MSG::Level level=MSG::ALWAYS) const
 perform the actual printout of statistical counters More...
 
long printErrors (const MSG::Level level=MSG::ALWAYS) const
 perform the actual printout of error counters More...
 
long printProps (const MSG::Level level=MSG::ALWAYS) const
 perform the actual printout of properties More...
 
void registerCondition (const std::string &condition, StatusCode(CallerClass::*mf)()=NULL)
 register the current instance to the UpdateManagerSvc as a consumer for a condition. More...
 
void registerCondition (const std::string &condition, CondType *&condPtrDest, StatusCode(CallerClass::*mf)()=NULL)
 register the current instance to the UpdateManagerSvc as a consumer for a condition. More...
 
void registerCondition (char *condition, StatusCode(CallerClass::*mf)()=NULL)
 just to avoid conflicts with the version using a pointer to a template class. More...
 
void registerCondition (TargetClass *condition, StatusCode(CallerClass::*mf)()=NULL)
 register the current instance to the UpdateManagerSvc as a consumer for a condition. More...
 
StatusCode runUpdate ()
 asks the UpdateManagerSvc to perform an update of the instance (if needed) without waiting the next BeginEvent incident. More...
 
 GaudiCommon (const std::string &name, ISvcLocator *pSvcLocator)
 Algorithm constructor. More...
 
 GaudiCommon (const std::string &type, const std::string &name, const IInterface *parent)
 Tool constructor. More...
 
StatusCode release (const IInterface *interface) const
 Manual forced (and 'safe') release of the active tool or service. More...
 
virtual unsigned long release ()
 Un-hide IInterface::release (ICC warning #1125) More...
 
const AlgToolstools () const
 get the list of aquired tools More...
 
const Servicesservices () const
 get the list of aquired services More...
 
const std::string & context () const
 Returns the "context" string. Used to identify different processing states. More...
 
const std::string & rootInTES () const
 Returns the "rootInTES" string. More...
 
double globalTimeOffset () const
 Returns the "globalTimeOffset" double. More...
 
const std::string fullTESLocation (const std::string &location, const bool useRootInTES) const
 Returns the full correct event location given the rootInTes settings. More...
 
- Public Member Functions inherited from Algorithm
 Algorithm (const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
 Constructor. More...
 
virtual ~Algorithm ()
 Destructor. More...
 
virtual StatusCode sysStart ()
 Reinitialization method invoked by the framework. More...
 
virtual StatusCode sysInitialize ()
 Initialization method invoked by the framework. More...
 
virtual StatusCode sysReinitialize ()
 Reinitialization method invoked by the framework. More...
 
virtual StatusCode sysRestart ()
 Restart method invoked by the framework. More...
 
virtual StatusCode sysStop ()
 System stop. More...
 
virtual StatusCode sysFinalize ()
 System finalization. More...
 
virtual StatusCode sysBeginRun ()
 beginRun method invoked by the framework. More...
 
virtual StatusCode sysEndRun ()
 endRun method invoked by the framework. More...
 
virtual const std::string & name () const
 The identifying name of the algorithm object. More...
 
virtual const std::string & version () const
 The version of the algorithm. More...
 
virtual StatusCode configure ()
 Dummy implementation of IStateful::configure() method. More...
 
virtual StatusCode terminate ()
 Dummy implementation of IStateful::terminate() method. More...
 
virtual StatusCode start ()
 the default (empty) implementation of IStateful::start() method More...
 
virtual StatusCode stop ()
 the default (empty) implementation of IStateful::stop() method More...
 
virtual StatusCode reinitialize ()
 the default (empty) implementation of IStateful::reinitialize() method More...
 
virtual StatusCode restart ()
 the default (empty) implementation of IStateful::restart() method More...
 
virtual bool isExecuted () const
 Has this algorithm been executed since the last reset? More...
 
virtual void setExecuted (bool state)
 Set the executed flag to the specified state. More...
 
virtual Gaudi::StateMachine::State FSMState () const
 returns the current state of the algorithm More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 returns the state the algorithm will be in after the ongoing transition More...
 
virtual bool isEnabled () const
 Is this algorithm enabled or disabled? More...
 
virtual bool filterPassed () const
 Did this algorithm pass or fail its filter criterion for the last event? More...
 
virtual void setFilterPassed (bool state)
 Set the filter passed flag to the specified state. 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...
 
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< ISvcLocator > & serviceLocator () const
 The standard service locator. More...
 
SmartIF< ISvcLocator > & svcLoc () const
 shortcut for method serviceLocator More...
 
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...
 
std::vector< Algorithm * > * subAlgorithms () const
 List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms. More...
 
virtual StatusCode setProperty (const Property &p)
 Implementation of IProperty::setProperty. More...
 
virtual StatusCode setProperty (const std::string &s)
 Implementation of IProperty::setProperty. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Implementation of IProperty::setProperty. More...
 
virtual StatusCode getProperty (Property *p) const
 Implementation of IProperty::getProperty. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Implementation of IProperty::getProperty. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Implementation of IProperty::getProperty. More...
 
virtual const std::vector
< Property * > & 
getProperties () const
 Implementation of IProperty::getProperties. 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...
 
- Public Member Functions inherited from extend_interfaces3< IAlgorithm, IProperty, IStateful >
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IAlgorithm
 DeclareInterfaceID (IAlgorithm, 4, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
- Public Member Functions inherited from IInterface
virtual void * i_cast (const InterfaceID &) const =0
 main cast function More...
 
virtual std::vector< std::string > getInterfaceNames () const =0
 Returns a vector of strings containing the names of all the implemented interfaces. More...
 
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)=0
 Set the void** to the pointer to the requested interface of the instance. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IProperty
 DeclareInterfaceID (IProperty, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 

Protected Member Functions

StatusCode decodeNames ()
 Decode a vector of string. More...
 
- Protected Member Functions inherited from GaudiCommon< Algorithm >
virtual ~GaudiCommon ()
 Destructor. More...
 
StatusCode releaseTool (const IAlgTool *tool) const
 manual forced (and 'safe') release of the tool More...
 
StatusCode releaseSvc (const IInterface *svc) const
 manual forced (and 'safe') release of the service More...
 
- Protected Member Functions inherited from Algorithm
bool isInitialized () const
 Has the Algorithm already been initialized? More...
 
bool isFinalized () const
 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...
 

Private Member Functions

 GaudiSequencer (const GaudiSequencer &a)
 Private copy, copy not allowed. More...
 
GaudiSequenceroperator= (const GaudiSequencer &a)
 Private assignment operator: This is not allowed. More...
 

Private Attributes

StringArrayProperty m_names
 Input string, list of algorithms. More...
 
std::vector< AlgorithmEntrym_entries
 List of algorithms to process. More...
 
bool m_modeOR
 Indicates that the OR is wanted instead of AND. More...
 
bool m_shortCircuit
 Indicates whether to stop processing as soon as possible, or to always execute all subalgorithms. More...
 
bool m_ignoreFilter
 True if one continues always. More...
 
bool m_isInitialized
 Indicate that we are ready. More...
 
bool m_measureTime
 Flag to measure time. More...
 
bool m_returnOK
 Forces the sequencer to return a good status. More...
 
ISequencerTimerToolm_timerTool
 Pointer to the timer tool. More...
 
int m_timer
 Timer number for the sequencer. More...
 

Additional Inherited Members

- Public Types inherited from Algorithm
typedef
Gaudi::PluginService::Factory
< IAlgorithm *, const
std::string &, ISvcLocator * > 
Factory
 
- Public Types inherited from implements3< IAlgorithm, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class. More...
 
typedef extend_interfaces3
< IAlgorithm, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces3< IAlgorithm, IProperty, IStateful >
typedef mpl::fold< typename
IAlgorithm::iid::iids::type,
typename mpl::fold< typename
IProperty::iid::iids::type,
typename
IStateful::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 
typedef Gaudi::InterfaceId
< IInterface, 0, 0 > 
iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
- Protected Types inherited from GaudiCommon< Algorithm >
typedef std::map< std::string,
StatEntity
Statistics
 the actual type of general counters More...
 
typedef std::map< std::string,
unsigned int > 
Counter
 the actual type error/warning counter More...
 
typedef std::vector< IAlgTool * > AlgTools
 storage for active tools More...
 
typedef GaudiUtils::HashMap
< std::string, SmartIF
< IService > > 
Services
 storage for active services More...
 
- Protected Attributes inherited from GaudiCommon< Algorithm >
ICounterSummarySvcm_counterSummarySvc
 a pointer to the CounterSummarySvc More...
 
std::vector< std::string > m_counterList
 list of counters to declare. Set by property CounterList. This can be a regular expression. More...
 
std::vector< std::string > m_statEntityList
 
- Static Protected Attributes inherited from GaudiCommon< Algorithm >
static const bool IgnoreRootInTES
 Simple definition to be used with the new useRootInTES argument get<TYPE> and put methods. More...
 
static const bool UseRootInTES
 Simple definition to be used with the new useRootInTES argument get<TYPE> and put methods. More...
 

Detailed Description

Sequencer for executing several algorithms, stopping when one is faulty.

Default behaviour (ModeOR=False) is to execute all algorithms until one returns filterPassed() = False. If ShortCircuit is set to False, then all algorithms will be executed.

In OR mode, the logic is opposite. All algorithms until one returns filterPassed() = True. To then exit one must onter-intuitively set ShortCircuit to False. If the default value ShortCircuit=True is left then all algorithms will be executed.

Author
Olivier Callot
Date
2004-05-13

Definition at line 27 of file GaudiSequencer.h.

Constructor & Destructor Documentation

GaudiSequencer::GaudiSequencer ( const std::string &  name,
ISvcLocator pSvcLocator 
)

Standard constructor.

Definition at line 18 of file GaudiSequencer.cpp.

20  : GaudiAlgorithm ( name , pSvcLocator )
21  , m_timerTool( 0 )
22 {
23  declareProperty( "Members" , m_names );
24  declareProperty( "ModeOR" , m_modeOR = false );
25  declareProperty( "IgnoreFilterPassed" , m_ignoreFilter = false );
26  declareProperty( "MeasureTime" , m_measureTime = false );
27  declareProperty( "ReturnOK" , m_returnOK = false );
28  declareProperty( "ShortCircuit" , m_shortCircuit = true );
29 
31 }
void membershipHandler(Property &theProp)
for asynchronous changes in the list of algorithms
bool m_shortCircuit
Indicates whether to stop processing as soon as possible, or to always execute all subalgorithms...
bool m_returnOK
Forces the sequencer to return a good status.
bool m_modeOR
Indicates that the OR is wanted instead of AND.
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Algorithm.h:397
virtual void declareUpdateHandler(PropertyCallbackFunctor *pf)
set new callback for update
Definition: Property.cpp:141
ISequencerTimerTool * m_timerTool
Pointer to the timer tool.
bool m_measureTime
Flag to measure time.
virtual const std::string & name() const
The identifying name of the algorithm object.
Definition: Algorithm.cpp:837
bool m_ignoreFilter
True if one continues always.
GaudiAlgorithm()
no public default constructor
StringArrayProperty m_names
Input string, list of algorithms.
GaudiSequencer::~GaudiSequencer ( )
virtual

Destructor.

Definition at line 35 of file GaudiSequencer.cpp.

35 {}
GaudiSequencer::GaudiSequencer ( const GaudiSequencer a)
private

Private copy, copy not allowed.

Member Function Documentation

StatusCode GaudiSequencer::beginRun ( )
virtual

Algorithm beginRun.

Reimplemented from Algorithm.

Definition at line 158 of file GaudiSequencer.cpp.

158  {
159 
160  if ( !isEnabled() ) return StatusCode::SUCCESS;
161 
162  if (msgLevel(MSG::DEBUG)) debug() << "==> beginRun" << endmsg;
163  return StatusCode::SUCCESS;
164 }
virtual bool isEnabled() const
Is this algorithm enabled or disabled?
Definition: Algorithm.cpp:858
MSG::Level msgLevel() const
The current message service output level.
Definition: GaudiCommon.h:532
MsgStream & debug() const
shortcut for the method msgStream ( MSG::DEBUG )
Definition: GaudiCommon.h:499
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode GaudiSequencer::decodeNames ( )
protected

Decode a vector of string.

Definition at line 197 of file GaudiSequencer.cpp.

197  {
198 
200  m_entries.clear();
201 
202  //== Get the "Context" option if in the file...
203  IJobOptionsSvc* jos = svc<IJobOptionsSvc>( "JobOptionsSvc" );
204  bool addedContext = false; //= Have we added the context ?
205  bool addedRootInTES = false; //= Have we added the rootInTES ?
206  bool addedGlobalTimeOffset = false; //= Have we added the globalTimeOffset ?
207 
208 
209  //= Get the Application manager, to see if algorithm exist
210  IAlgManager* appMgr = svc<IAlgManager>("ApplicationMgr");
211  const std::vector<std::string>& nameVector = m_names.value();
212  std::vector<std::string>::const_iterator it;
213  for ( it = nameVector.begin(); nameVector.end() != it; it++ ) {
215  const std::string &theName = typeName.name();
216  const std::string &theType = typeName.type();
217 
218  //== Check wether the specified algorithm already exists. If not, create it
220  SmartIF<IAlgorithm> myIAlg = appMgr->algorithm(typeName, false); // do not create it now
221  if ( !myIAlg.isValid() ) {
222  //== Set the Context if not in the jobOptions list
223  if ( "" != context() ||
224  "" != rootInTES() ||
225  0.0 != globalTimeOffset() ) {
226  bool foundContext = false;
227  bool foundRootInTES = false;
228  bool foundGlobalTimeOffset = false;
229  const std::vector<const Property*>* properties = jos->getProperties( theName );
230  if ( 0 != properties ) {
231  // Iterate over the list to set the options
232  for ( std::vector<const Property*>::const_iterator itProp = properties->begin();
233  itProp != properties->end();
234  itProp++ ) {
235  const StringProperty* sp = dynamic_cast<const StringProperty*>(*itProp);
236  if ( 0 != sp ) {
237  if ( "Context" == (*itProp)->name() ) {
238  foundContext = true;
239  }
240  if ( "RootInTES" == (*itProp)->name() ) {
241  foundRootInTES = true;
242  }
243  if ( "GlobalTimeOffset" == (*itProp)->name() ) {
244  foundGlobalTimeOffset = true;
245  }
246  }
247  }
248  }
249  if ( !foundContext && "" != context() ) {
250  StringProperty contextProperty( "Context", context() );
251  jos->addPropertyToCatalogue( theName, contextProperty ).ignore();
252  addedContext = true;
253  }
254  if ( !foundRootInTES && "" != rootInTES() ) {
255  StringProperty rootInTESProperty( "RootInTES", rootInTES() );
256  jos->addPropertyToCatalogue( theName, rootInTESProperty ).ignore();
257  addedRootInTES = true;
258  }
259  if ( !foundGlobalTimeOffset && 0.0 != globalTimeOffset() ) {
260  DoubleProperty globalTimeOffsetProperty( "GlobalTimeOffset", globalTimeOffset() );
261  jos->addPropertyToCatalogue( theName, globalTimeOffsetProperty ).ignore();
262  addedGlobalTimeOffset = true;
263  }
264  }
265 
266  Algorithm *myAlg = 0;
267  result = createSubAlgorithm( theType, theName, myAlg );
268  // (MCl) this should prevent bug #35199... even if I didn't manage to
269  // reproduce it with a simple test.
270  if (result.isSuccess()) myIAlg = myAlg;
271  } else {
272  Algorithm *myAlg = dynamic_cast<Algorithm*>(myIAlg.get());
273  if (myAlg) {
274  subAlgorithms()->push_back(myAlg);
275  // when the algorithm is not created, the ref count is short by one, so we have to fix it.
276  myAlg->addRef();
277  }
278  }
279 
280  //== Remove the property, in case this is not a GaudiAlgorithm...
281  if ( addedContext ) {
282  jos->removePropertyFromCatalogue( theName, "Context" ).ignore();
283  addedContext = false;
284  }
285  if ( addedRootInTES ) {
286  jos->removePropertyFromCatalogue( theName, "RootInTES" ).ignore();
287  addedRootInTES = false;
288  }
289  if ( addedGlobalTimeOffset ) {
290  jos->removePropertyFromCatalogue( theName, "GlobalTimeOffset" ).ignore();
291  addedGlobalTimeOffset = false;
292  }
293 
294  // propagate the sub-algorithm into own state.
295  if ( result.isSuccess () &&
297  myIAlg.isValid () &&
298  Gaudi::StateMachine::INITIALIZED > myIAlg->FSMState() )
299  {
300  StatusCode sc = myIAlg->sysInitialize() ;
301  if ( sc.isFailure() ) { result = sc ; }
302  }
303 
304  // propagate the sub-algorithm into own state.
305  if ( result.isSuccess () &&
307  myIAlg.isValid () &&
308  Gaudi::StateMachine::RUNNING > myIAlg->FSMState() )
309  {
310  StatusCode sc = myIAlg->sysStart () ;
311  if ( sc.isFailure() ) { result = sc ; }
312  }
313 
314  //== Is it an Algorithm ? Strange test...
315  if ( result.isSuccess() ) {
316  // TODO: (MCl) it is possible to avoid the dynamic_cast in most of the
317  // cases by keeping the result of createSubAlgorithm.
318  Algorithm* myAlg = dynamic_cast<Algorithm*>(myIAlg.get());
319  if (myAlg!=0) {
320  // Note: The reference counting is kept by the system of sub-algorithms
321  m_entries.push_back( AlgorithmEntry( myAlg ) );
322  if (msgLevel(MSG::DEBUG)) debug () << "Added algorithm " << theName << endmsg;
323  } else {
324  warning() << theName << " is not an Algorithm - failed dynamic_cast"
325  << endmsg;
326  final = StatusCode::FAILURE;
327  }
328  } else {
329  warning() << "Unable to find or create " << theName << endmsg;
330  final = result;
331  }
332 
333  }
334 
335  release(appMgr).ignore();
336  release(jos).ignore();
337 
338  //== Print the list of algorithms
339  MsgStream& msg = info();
340  if ( m_modeOR ) msg << "OR ";
341  msg << "Member list: ";
342  std::vector<AlgorithmEntry>::iterator itE;
343  for ( itE = m_entries.begin(); m_entries.end() != itE; itE++ ) {
344  Algorithm* myAlg = (*itE).algorithm();
345  std::string myAlgType = System::typeinfoName( typeid( *myAlg) ) ;
346  if ( myAlg->name() == myAlgType ) {
347  msg << myAlg->name();
348  } else {
349  msg << myAlgType << "/" << myAlg->name();
350  }
351  if ( itE+1 != m_entries.end() ) msg << ", ";
352  }
353  if ( "" != context() ) msg << ", with context '" << context() << "'";
354  if ( "" != rootInTES() ) msg << ", with rootInTES '" << rootInTES() << "'";
355  if ( 0.0 != globalTimeOffset() ) msg << ", with globalTimeOffset " << globalTimeOffset();
356  msg << endmsg;
357 
358  return final;
359 
360 }
MsgStream & warning() const
shortcut for the method msgStream ( MSG::WARNING )
Definition: GaudiCommon.h:495
virtual SmartIF< IAlgorithm > & algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
std::vector< Algorithm * > * subAlgorithms() const
List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.
Definition: Algorithm.cpp:870
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
virtual const std::vector< const Property * > * getProperties(const std::string &client) const =0
Get the properties associated to a given client.
MsgStream & info() const
shortcut for the method msgStream ( MSG::INFO )
Definition: GaudiCommon.h:497
StatusCode createSubAlgorithm(const std::string &type, const std::string &name, Algorithm *&pSubAlg)
Create a sub algorithm.
Definition: Algorithm.cpp:1116
const std::string & rootInTES() const
Returns the "rootInTES" string.
Definition: GaudiCommon.h:758
bool m_modeOR
Indicates that the OR is wanted instead of AND.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
The IAlgManager is the interface implemented by the Algorithm Factory in the Application Manager to s...
Definition: IAlgManager.h:28
const std::string & context() const
Returns the "context" string. Used to identify different processing states.
Definition: GaudiCommon.h:754
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
MSG::Level msgLevel() const
The current message service output level.
Definition: GaudiCommon.h:532
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:9
Main interface for the JobOptions service.
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
virtual unsigned long release()
Un-hide IInterface::release (ICC warning #1125)
Definition: GaudiCommon.h:733
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual Gaudi::StateMachine::State FSMState() const
returns the current state of the algorithm
Definition: Algorithm.h:190
virtual const std::string & name() const
The identifying name of the algorithm object.
Definition: Algorithm.cpp:837
MsgStream & msg() const
shortcut for the method msgStream ( MSG::INFO )
Definition: GaudiCommon.h:503
MsgStream & debug() const
shortcut for the method msgStream ( MSG::DEBUG )
Definition: GaudiCommon.h:499
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:62
const TYPE & value() const
explicit conversion
Definition: Property.h:355
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
virtual StatusCode removePropertyFromCatalogue(const std::string &client, const std::string &name)=0
Remove a property from the JobOptions catalog.
virtual StatusCode addPropertyToCatalogue(const std::string &client, const Property &property)=0
Add a property into the JobOptions catalog.
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
tuple appMgr
Definition: IOTest.py:83
double globalTimeOffset() const
Returns the "globalTimeOffset" double.
Definition: GaudiCommon.h:760
void ignore() const
Definition: StatusCode.h:94
std::string typeName(const std::type_info &typ)
Definition: Dictionary.cpp:22
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
std::vector< AlgorithmEntry > m_entries
List of algorithms to process.
StringArrayProperty m_names
Input string, list of algorithms.
StatusCode GaudiSequencer::endRun ( )
virtual

Algorithm endRun.

Reimplemented from Algorithm.

Definition at line 169 of file GaudiSequencer.cpp.

169  {
170 
171  if ( !isEnabled() ) return StatusCode::SUCCESS;
172 
173  if (msgLevel(MSG::DEBUG)) debug() << "==> endRun" << endmsg;
174  return StatusCode::SUCCESS;
175 }
virtual bool isEnabled() const
Is this algorithm enabled or disabled?
Definition: Algorithm.cpp:858
MSG::Level msgLevel() const
The current message service output level.
Definition: GaudiCommon.h:532
MsgStream & debug() const
shortcut for the method msgStream ( MSG::DEBUG )
Definition: GaudiCommon.h:499
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode GaudiSequencer::execute ( )
virtual

Algorithm execution.

Reimplemented from GaudiAlgorithm.

Definition at line 80 of file GaudiSequencer.cpp.

80  {
81 
83 
84  if (msgLevel(MSG::DEBUG)) debug() << "==> Execute" << endmsg;
85 
87 
88  bool seqPass = !m_modeOR; // for OR, result will be false, unless (at least) one is true
89  // for AND, result will be true, unless (at least) one is false
90  // also see comment below ....
91 
92  std::vector<AlgorithmEntry>::const_iterator itE;
93  for ( itE = m_entries.begin(); m_entries.end() != itE; ++itE ) {
94  Algorithm* myAlg = itE->algorithm();
95  if ( ! myAlg->isEnabled() ) continue;
96  if ( ! myAlg->isExecuted() ) {
97  if ( m_measureTime ) m_timerTool->start( itE->timer() );
98  result = myAlg->sysExecute();
99  if ( m_measureTime ) m_timerTool->stop( itE->timer() );
100  myAlg->setExecuted( true );
101  if ( ! result.isSuccess() ) break; //== Abort and return bad status
102  }
103  //== Check the returned status
104  if ( !m_ignoreFilter ) {
105  bool passed = myAlg->filterPassed();
106  if (msgLevel(MSG::VERBOSE))
107  verbose() << "Algorithm " << myAlg->name() << " returned filter passed "
108  << (passed ? "true" : "false") << endmsg;
109  if ( itE->reverse() ) passed = !passed;
110 
111 
112  //== indicate our own result. For OR, exit as soon as true.
113  // If no more, will exit with false.
114  //== for AND, exit as soon as false. Else, will be true (default)
115 
116  // if not short-circuiting, make sure we latch iPass to 'true' in
117  // OR mode (i.e. it is sufficient for one item to be true in order
118  // to be true at the end, and thus we start out at 'false'), and latch
119  // to 'false' in AND mode (i.e. it is sufficient for one item to
120  // be false to the false in the end, and thus we start out at 'true')
121  // -- i.e. we should not just blindly return the 'last' passed status!
122 
123  // or to put it another way: in OR mode, we don't care about things
124  // which are false, as they leave our current state alone (provided
125  // we stared as 'false'!), and in AND mode, we keep our current
126  // state until someone returns 'false' (provided we started as 'true')
127  if ( m_modeOR ? passed : !passed ) {
128  seqPass = passed;
129  if (msgLevel(MSG::VERBOSE))
130  verbose() << "SeqPass is now " << (seqPass ? "true" : "false") << endmsg;
131  if (m_shortCircuit) break;
132  }
133  }
134 
135  }
136  if (msgLevel(MSG::VERBOSE))
137  verbose() << "SeqPass is " << (seqPass ? "true" : "false") << endmsg;
138  if ( !m_ignoreFilter && !m_entries.empty() ) setFilterPassed( seqPass );
139  setExecuted( true );
140 
142 
143  return m_returnOK ? (result.ignore(), StatusCode::SUCCESS) : result;
144 }
bool m_shortCircuit
Indicates whether to stop processing as soon as possible, or to always execute all subalgorithms...
virtual void setExecuted(bool state)
Set the executed flag to the specified state.
Definition: Algorithm.cpp:849
virtual bool filterPassed() const
Did this algorithm pass or fail its filter criterion for the last event?
Definition: Algorithm.cpp:862
bool m_returnOK
Forces the sequencer to return a good status.
bool m_modeOR
Indicates that the OR is wanted instead of AND.
virtual StatusCode sysExecute()
The actions to be performed by the algorithm on an event.
Definition: Algorithm.cpp:578
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual bool isEnabled() const
Is this algorithm enabled or disabled?
Definition: Algorithm.cpp:858
virtual bool isExecuted() const
Has this algorithm been executed since the last reset?
Definition: Algorithm.cpp:845
MSG::Level msgLevel() const
The current message service output level.
Definition: GaudiCommon.h:532
ISequencerTimerTool * m_timerTool
Pointer to the timer tool.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual void setFilterPassed(bool state)
Set the filter passed flag to the specified state.
Definition: Algorithm.cpp:866
MsgStream & verbose() const
shortcut for the method msgStream ( MSG::VERBOSE )
Definition: GaudiCommon.h:501
bool m_measureTime
Flag to measure time.
virtual const std::string & name() const
The identifying name of the algorithm object.
Definition: Algorithm.cpp:837
MsgStream & debug() const
shortcut for the method msgStream ( MSG::DEBUG )
Definition: GaudiCommon.h:499
virtual void start(int index)=0
start the counter, i.e.
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
void ignore() const
Definition: StatusCode.h:94
virtual double stop(int index)=0
stop the counter, return the elapsed time
bool m_ignoreFilter
True if one continues always.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
int m_timer
Timer number for the sequencer.
std::vector< AlgorithmEntry > m_entries
List of algorithms to process.
StatusCode GaudiSequencer::finalize ( )
virtual

Algorithm finalization.

Reimplemented from GaudiAlgorithm.

Definition at line 149 of file GaudiSequencer.cpp.

149  {
150 
151  if (msgLevel(MSG::DEBUG)) debug() << "==> Finalize" << endmsg;
152  return GaudiAlgorithm::finalize();
153 }
MSG::Level msgLevel() const
The current message service output level.
Definition: GaudiCommon.h:532
virtual StatusCode finalize()
standard finalization method
MsgStream & debug() const
shortcut for the method msgStream ( MSG::DEBUG )
Definition: GaudiCommon.h:499
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode GaudiSequencer::initialize ( )
virtual

Algorithm initialization.

Reimplemented from GaudiAlgorithm.

Definition at line 40 of file GaudiSequencer.cpp.

40  {
42 
43  if (msgLevel(MSG::DEBUG)) debug() << "==> Initialise" << endmsg;
44 
45  StatusCode status = decodeNames();
46  if ( !status.isSuccess() ) return status;
47 
48  m_timerTool = tool<ISequencerTimerTool>( "SequencerTimerTool" );
49  if ( m_timerTool->globalTiming() ) m_measureTime = true;
50 
51  if ( m_measureTime ) {
54  } else {
56  m_timerTool = 0;
57  }
58 
59  //== Initialize the algorithms
60  std::vector<AlgorithmEntry>::iterator itE;
61  for ( itE = m_entries.begin(); m_entries.end() != itE; itE++ ) {
62  if ( m_measureTime ) {
63  itE->setTimer( m_timerTool->addTimer( itE->algorithm()->name() ) );
64  }
65 
66  status = itE->algorithm()->sysInitialize();
67  if ( !status.isSuccess() ) {
68  return Error( "Can not initialize " + itE->algorithm()->name(),
69  status );
70  }
71  }
73 
74  return StatusCode::SUCCESS;
75 }
virtual void decreaseIndent()=0
Decrease the indentation of the name.
virtual int addTimer(const std::string &name)=0
add a timer entry with the specified name
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
StatusCode Error(const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
Print the error message and return with the given StatusCode.
virtual StatusCode initialize()
standard initialization method
virtual void increaseIndent()=0
Increase the indentation of the name.
virtual bool globalTiming()=0
returns the flag telling that global timing is wanted
MSG::Level msgLevel() const
The current message service output level.
Definition: GaudiCommon.h:532
ISequencerTimerTool * m_timerTool
Pointer to the timer tool.
virtual unsigned long release()
Un-hide IInterface::release (ICC warning #1125)
Definition: GaudiCommon.h:733
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
bool m_measureTime
Flag to measure time.
virtual const std::string & name() const
The identifying name of the algorithm object.
Definition: Algorithm.cpp:837
MsgStream & debug() const
shortcut for the method msgStream ( MSG::DEBUG )
Definition: GaudiCommon.h:499
StatusCode decodeNames()
Decode a vector of string.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
int m_timer
Timer number for the sequencer.
std::vector< AlgorithmEntry > m_entries
List of algorithms to process.
void GaudiSequencer::membershipHandler ( Property theProp)

for asynchronous changes in the list of algorithms

Definition at line 369 of file GaudiSequencer.cpp.

370 {
371  // no action for not-yet initialized sequencer
372  if ( Gaudi::StateMachine::INITIALIZED > FSMState() ) { return ; } // RETURN
373 
374  decodeNames().ignore();
375 
376  if ( !m_measureTime ) { return ; } // RETURN
377 
378  // add the entries into timer table:
379 
380  if ( 0 == m_timerTool )
381  { m_timerTool = tool<ISequencerTimerTool>( "SequencerTimerTool" ) ; }
382 
383  if ( m_timerTool->globalTiming() ) m_measureTime = true;
384 
387 
388  for ( std::vector<AlgorithmEntry>::iterator itE = m_entries.begin() ;
389  m_entries.end() != itE; ++itE )
390  {
391  itE->setTimer( m_timerTool->addTimer( itE->algorithm()->name() ) );
392  }
393 
395 
396 }
virtual void decreaseIndent()=0
Decrease the indentation of the name.
virtual int addTimer(const std::string &name)=0
add a timer entry with the specified name
virtual void increaseIndent()=0
Increase the indentation of the name.
virtual bool globalTiming()=0
returns the flag telling that global timing is wanted
ISequencerTimerTool * m_timerTool
Pointer to the timer tool.
virtual Gaudi::StateMachine::State FSMState() const
returns the current state of the algorithm
Definition: Algorithm.h:190
bool m_measureTime
Flag to measure time.
virtual const std::string & name() const
The identifying name of the algorithm object.
Definition: Algorithm.cpp:837
StatusCode decodeNames()
Decode a vector of string.
void ignore() const
Definition: StatusCode.h:94
int m_timer
Timer number for the sequencer.
std::vector< AlgorithmEntry > m_entries
List of algorithms to process.
GaudiSequencer& GaudiSequencer::operator= ( const GaudiSequencer a)
private

Private assignment operator: This is not allowed.

void GaudiSequencer::resetExecuted ( )
virtual

Called before an event processing.

Reimplemented from Algorithm.

Definition at line 180 of file GaudiSequencer.cpp.

180  {
182  // algorithm doesn't call resetExecuted of subalgos! should it???
183  std::vector<AlgorithmEntry>::const_iterator itE;
184  for ( itE = m_entries.begin(); m_entries.end() != itE; ++itE ) {
185  itE->algorithm()->resetExecuted();
186  }
187 }
virtual void resetExecuted()
Reset the executed state of the Algorithm for the duration of the current event.
Definition: Algorithm.cpp:853
std::vector< AlgorithmEntry > m_entries
List of algorithms to process.

Member Data Documentation

std::vector<AlgorithmEntry> GaudiSequencer::m_entries
private

List of algorithms to process.

Definition at line 82 of file GaudiSequencer.h.

bool GaudiSequencer::m_ignoreFilter
private

True if one continues always.

Definition at line 87 of file GaudiSequencer.h.

bool GaudiSequencer::m_isInitialized
private

Indicate that we are ready.

Definition at line 88 of file GaudiSequencer.h.

bool GaudiSequencer::m_measureTime
private

Flag to measure time.

Definition at line 89 of file GaudiSequencer.h.

bool GaudiSequencer::m_modeOR
private

Indicates that the OR is wanted instead of AND.

Definition at line 83 of file GaudiSequencer.h.

StringArrayProperty GaudiSequencer::m_names
private

Input string, list of algorithms.

Definition at line 81 of file GaudiSequencer.h.

bool GaudiSequencer::m_returnOK
private

Forces the sequencer to return a good status.

Definition at line 90 of file GaudiSequencer.h.

bool GaudiSequencer::m_shortCircuit
private

Indicates whether to stop processing as soon as possible, or to always execute all subalgorithms.

In MOdeOR=True the behaviour is the exact opposite.

Definition at line 84 of file GaudiSequencer.h.

int GaudiSequencer::m_timer
private

Timer number for the sequencer.

Definition at line 92 of file GaudiSequencer.h.

ISequencerTimerTool* GaudiSequencer::m_timerTool
private

Pointer to the timer tool.

Definition at line 91 of file GaudiSequencer.h.


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