The Gaudi Framework  master (37c0b60a)
Gaudi::Sequencer Class Reference

A Sequencer is essentially a list of Algorithms and is responsible for their management. More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/Gaudi/Sequencer.h>

Inheritance diagram for Gaudi::Sequencer:
Collaboration diagram for Gaudi::Sequencer:

Public Member Functions

StatusCode initialize () override
 Initialization of a sequencer. More...
 
StatusCode reinitialize () override
 Sequencer Reinitialization. More...
 
StatusCode start () override
 Sequencer finalization. More...
 
StatusCode execute (const EventContext &ctx) const override
 The actions to be performed by the sequencer on an event. More...
 
StatusCode stop () override
 Sequencer stop. More...
 
StatusCode finalize () override
 Sequencer finalization. More...
 
bool branchFilterPassed (const EventContext &ctx) const
 Was the branch filter passed for the last event? More...
 
void setBranchFilterPassed (const EventContext &ctx, bool state) const
 Set the branch filter passed flag for the last event. More...
 
StatusCode append (Gaudi::Algorithm *pAlgorithm)
 Append an algorithm to the sequencer. More...
 
StatusCode appendToBranch (Gaudi::Algorithm *pAlgorithm)
 Append an algorithm to the sequencer branch. More...
 
StatusCode createAndAppend (const std::string &type, const std::string &name, Gaudi::Algorithm *&pAlgorithm)
 Create a algorithm and append it to the sequencer. More...
 
StatusCode createAndAppendToBranch (const std::string &type, const std::string &name, Gaudi::Algorithm *&pAlgorithm)
 Create a algorithm and append it to the sequencer branch. More...
 
StatusCode remove (Gaudi::Algorithm *pAlgorithm)
 Remove the specified algorithm from the sequencer. More...
 
StatusCode remove (const std::string &name)
 
StatusCode removeFromBranch (Gaudi::Algorithm *pAlgorithm)
 
StatusCode removeFromBranch (const std::string &name)
 
const std::vector< Gaudi::Algorithm * > & branchAlgorithms () const
 List of branch algorithms. More...
 
std::vector< Gaudi::Algorithm * > & branchAlgorithms ()
 
StatusCode decodeMemberNames ()
 Decode Member Name list. More...
 
StatusCode decodeBranchMemberNames ()
 Decode branch member name list. More...
 
std::ostreamtoControlFlowExpression (std::ostream &os) const override
 Produce string representation of the control flow expression. More...
 
- Public Member Functions inherited from Gaudi::Sequence
bool isSequence () const override final
 Are we a Sequence? 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 start () override
 System start. More...
 
StatusCode initialize () override
 Initialization method invoked by the framework. More...
 
StatusCode reinitialize () override
 Reinitialization method invoked by the framework. More...
 
StatusCode restart () override
 Restart method invoked by the framework. More...
 
StatusCode stop () override
 System stop. More...
 
StatusCode finalize () override
 System finalization. More...
 
void acceptDHVisitor (IDataHandleVisitor *) const override
 
 Algorithm (std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
 Constructor. More...
 
- Public Member Functions inherited from Gaudi::Algorithm
 Algorithm (std::string name, ISvcLocator *svcloc, 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...
 
const std::stringname () const override
 The identifying name of the algorithm object. More...
 
const Gaudi::StringKeynameKey () const override
 
const std::stringtype () const override
 The type of the algorithm object. More...
 
void setType (std::string type) override
 
const std::stringversion () 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 isEnabled () const override
 Is this algorithm enabled or disabled? More...
 
bool isSequence () const override
 Are we a Sequence? More...
 
unsigned int errorCount () const
 Get the number of failures of the algorithm. More...
 
template<class T >
StatusCode service (std::string_view 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 (std::string_view svcType, std::string_view svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
SmartIF< IServiceservice (std::string_view 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 (std::string_view 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< IDataProviderSvc > & detSvc () const
 The standard detector data service. More...
 
SmartIF< IConversionSvc > & detCnvSvc () const
 The standard detector data persistency conversion service. More...
 
SmartIF< IDataProviderSvc > & eventSvc () const
 The standard event data service. More...
 
SmartIF< IDataProviderSvc > & evtSvc () const
 shortcut for method eventSvc More...
 
SmartIF< IConversionSvc > & eventCnvSvc () const
 The standard event data persistency conversion service. More...
 
SmartIF< IHistogramSvc > & histoSvc () const
 The standard histogram service. More...
 
SmartIF< INTupleSvc > & ntupleSvc () const
 The standard N tuple service. More...
 
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...
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (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...
 
void acceptDHVisitor (IDataHandleVisitor *) const override
 
void registerTool (IAlgTool *tool) const
 
void deregisterTool (IAlgTool *tool) const
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, bool createIf=true)
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, const std::string &toolTypeAndName, bool createIf=true)
 
template<class T >
void addToolsArray (ToolHandleArray< T > &hndlArr)
 
const std::vector< IAlgTool * > & tools () const
 
bool isAsynchronous () const
 
void setAsynchronous (bool value)
 
unsigned int cardinality () const override
 Return the cardinality. More...
 
const std::vector< std::string > & neededResources () const override
 
AlgExecStateexecState (const EventContext &ctx) const override
 reference to AlgExecState of Alg More...
 
std::ostreamtoControlFlowExpression (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 DataObjIDCollextraInputDeps () const override
 
virtual const DataObjIDCollextraOutputDeps () const override
 
void declare (Gaudi::DataHandle &handle) override
 
void renounce (Gaudi::DataHandle &handle) override
 
bool renounceInput (const DataObjID &id) override
 
const DataObjIDCollinputDataObjs () const override
 
const DataObjIDColloutputDataObjs () 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::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > > >
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (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::PropertyBasedeclareProperty (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::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p) override
 set the property from another property with a different name More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p)
 Set the property from a property. More...
 
virtual StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p)=0
 Set the property from a property with a different name. More...
 
virtual StatusCode setProperty (const std::string &s)=0
 Set the property by string. More...
 
StatusCode setProperty (const std::string &name, const char *v)
 Special case for string literals. More...
 
StatusCode setProperty (const std::string &name, const std::string &v)
 Special case for std::string. More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode setPropertyRepr (const std::string &n, const std::string &r) override
 set the property from name and value string representation More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (std::string_view name) const override
 get the property by name More...
 
StatusCode getProperty (std::string_view 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 (std::string_view name) const override
 Return true if we have a property with the given name. More...
 
Gaudi::Details::PropertyBaseproperty (std::string_view name) const
 \fixme property and bindPropertiesTo should be protected More...
 
void bindPropertiesTo (Gaudi::Interfaces::IOptionsSvc &optsSvc)
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 

Protected Member Functions

StatusCode append (Gaudi::Algorithm *pAlgorithm, std::vector< Gaudi::Algorithm * > &theAlgs)
 Append an algorithm to the sequencer. More...
 
StatusCode createAndAppend (const std::string &type, const std::string &name, Gaudi::Algorithm *&pAlgorithm, std::vector< Gaudi::Algorithm * > &theAlgs)
 Create a algorithm and append it to the sequencer. More...
 
StatusCode decodeNames (Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Gaudi::Algorithm * > &theAlgs, std::vector< bool > &theLogic)
 Decode algorithm names, creating or appending algorithms as appropriate. More...
 
StatusCode execute (const EventContext &ctx, const std::vector< Gaudi::Algorithm * > &theAlgs, const std::vector< bool > &theLogic, Gaudi::Algorithm *&lastAlgorithm, std::size_t first=0) const
 Execute the members in the specified list. More...
 
StatusCode executeMember (Gaudi::Algorithm *theAlgorithm, const EventContext &context) const
 Execute member algorithm. More...
 
StatusCode remove (const std::string &algname, std::vector< Gaudi::Algorithm * > &theAlgs)
 Remove the specified algorithm from the sequencer. More...
 
 Sequencer (const Sequencer &a)=delete
 
Sequenceroperator= (const Sequencer &rhs)=delete
 
- Protected Member Functions inherited from Gaudi::Algorithm
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...
 
bool isReEntrant () const override
 
- 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 CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >
MSG::Level setUpMessaging () const
 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...
 

Private Attributes

Gaudi::Property< std::vector< std::string > > m_names
 
Gaudi::Property< std::vector< std::string > > m_branchNames
 
Gaudi::Property< bool > m_shortCircuit { this, "ShortCircuit", true, "stop processing as soon as possible" }
 
Gaudi::Property< bool > m_sequential { this, "Sequential", false, "execute members one at a time" }
 
Gaudi::Property< bool > m_modeOR { this, "ModeOR", false, "use OR logic instead of AND" }
 
Gaudi::Property< bool > m_ignoreFilter { this, "IgnoreFilterPassed", false, "always continue" }
 
Gaudi::Property< bool > m_invert { this, "Invert", false, "invert the logic result of the sequencer" }
 
Gaudi::Property< std::vector< std::string > > m_vetoObjs
 
Gaudi::Property< std::vector< std::string > > m_requireObjs
 
std::vector< bool > m_isInverted
 
std::vector< Gaudi::Algorithm * > m_branchAlgs
 
std::vector< bool > m_isBranchInverted
 
std::mutex m_branchFilterMutex
 
std::map< EventContext::ContextID_t, bool > m_branchFilterPassed
 

Additional Inherited Members

- Public Types inherited from Gaudi::Algorithm
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 Attributes inherited from Gaudi::Algorithm
friend AlgorithmManager
 
- Protected Attributes inherited from Gaudi::Algorithm
std::unique_ptr< IDataHandleVisitorm_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
 

Detailed Description

A Sequencer is essentially a list of Algorithms and is responsible for their management.

Note that Sequences may themselves contain other Sequences. The default execute() implementation loops over the members of the sequence, calling their execute() methods. However, this can be modified if a member is disabled, has already been executed, or a member indicates that it's filter fails. The the former two cases the execution of the member is bypassed. In the latter case, the loop is terminated and the Sequencer assumes the same filtered state as the last member.

Definition at line 28 of file Sequencer.h.

Constructor & Destructor Documentation

◆ Sequencer()

Gaudi::Sequencer::Sequencer ( const Sequencer a)
protecteddelete

Member Function Documentation

◆ append() [1/2]

StatusCode Gaudi::Sequencer::append ( Gaudi::Algorithm pAlgorithm)

Append an algorithm to the sequencer.

Definition at line 161 of file Sequencer.cpp.

161 { return append( pAlgorithm, *subAlgorithms() ); }

◆ append() [2/2]

StatusCode Gaudi::Sequencer::append ( Gaudi::Algorithm pAlgorithm,
std::vector< Gaudi::Algorithm * > &  theAlgs 
)
protected

Append an algorithm to the sequencer.

Protected Member Functions.

Definition at line 205 of file Sequencer.cpp.

205  {
206  // Check that the specified algorithm doesn't already exist in the membership list
207  if ( std::find( std::begin( theAlgs ), std::end( theAlgs ), pAlgorithm ) != std::end( theAlgs ) ) {
208  return StatusCode::FAILURE;
209  }
210  theAlgs.push_back( pAlgorithm );
211  pAlgorithm->addRef();
212  return StatusCode::SUCCESS;
213  }

◆ appendToBranch()

StatusCode Gaudi::Sequencer::appendToBranch ( Gaudi::Algorithm pAlgorithm)

Append an algorithm to the sequencer branch.

Definition at line 163 of file Sequencer.cpp.

163  {
164  return append( pAlgorithm, branchAlgorithms() );
165  }

◆ branchAlgorithms() [1/2]

std::vector< Gaudi::Algorithm * > & Gaudi::Sequencer::branchAlgorithms ( )

Definition at line 189 of file Sequencer.cpp.

189 { return m_branchAlgs; }

◆ branchAlgorithms() [2/2]

const std::vector< Gaudi::Algorithm * > & Gaudi::Sequencer::branchAlgorithms ( ) const

List of branch algorithms.

These are the algorithms that would get executed if a filter algorithm indicated a failure. The branch is located within the main sequence by the first element, which is the filter algorithm.

Definition at line 187 of file Sequencer.cpp.

187 { return m_branchAlgs; }

◆ branchFilterPassed()

bool Gaudi::Sequencer::branchFilterPassed ( const EventContext ctx) const

Was the branch filter passed for the last event?

Definition at line 151 of file Sequencer.cpp.

151  {
152  auto lock = std::scoped_lock{ m_branchFilterMutex };
153  return m_branchFilterPassed[ctx.slot()];
154  }

◆ createAndAppend() [1/2]

StatusCode Gaudi::Sequencer::createAndAppend ( const std::string type,
const std::string name,
Gaudi::Algorithm *&  pAlgorithm 
)

Create a algorithm and append it to the sequencer.

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 algorithm's properties. Using this mechanism instead of creating algorithms directly via the new operator is preferred since then the framework may take care of all of the necessary book-keeping.

Definition at line 167 of file Sequencer.cpp.

168  {
169  return createAndAppend( type, name, pAlgorithm, *subAlgorithms() );
170  }

◆ createAndAppend() [2/2]

StatusCode Gaudi::Sequencer::createAndAppend ( const std::string type,
const std::string name,
Gaudi::Algorithm *&  pAlgorithm,
std::vector< Gaudi::Algorithm * > &  theAlgs 
)
protected

Create a algorithm and append it to the sequencer.

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 algorithm's properties. Using this mechanism instead of creating algorithms directly via the new operator is preferred since then the framework may take care of all of the necessary book-keeping.

Definition at line 215 of file Sequencer.cpp.

216  {
217  auto theAlgMgr = serviceLocator()->service<IAlgManager>( "ApplicationMgr" );
218  if ( !theAlgMgr ) return StatusCode::FAILURE;
219 
220  IAlgorithm* tmp;
221  StatusCode result = theAlgMgr->createAlgorithm( type, algName, tmp );
222  if ( result.isSuccess() ) {
223  try {
224  pAlgorithm = dynamic_cast<Gaudi::Algorithm*>( tmp );
225  theAlgs.push_back( pAlgorithm );
226  } catch ( ... ) {
227  error() << "Unable to create Algorithm " << algName << endmsg;
228  result = StatusCode::FAILURE;
229  }
230  }
231 
232  return result;
233  }

◆ createAndAppendToBranch()

StatusCode Gaudi::Sequencer::createAndAppendToBranch ( const std::string type,
const std::string name,
Gaudi::Algorithm *&  pAlgorithm 
)

Create a algorithm and append it to the sequencer branch.

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 algorithm's properties. Using this mechanism instead of creating algorithms directly via the new operator is preferred since then the framework may take care of all of the necessary book-keeping.

Definition at line 172 of file Sequencer.cpp.

173  {
174  return createAndAppend( type, name, pAlgorithm, branchAlgorithms() );
175  }

◆ decodeBranchMemberNames()

StatusCode Gaudi::Sequencer::decodeBranchMemberNames ( )

Decode branch member name list.

Definition at line 196 of file Sequencer.cpp.

196  {
197  // Decode the branch membership list
199  }

◆ decodeMemberNames()

StatusCode Gaudi::Sequencer::decodeMemberNames ( )

Decode Member Name list.

Definition at line 191 of file Sequencer.cpp.

191  {
192  // Decode the membership list
194  }

◆ decodeNames()

StatusCode Gaudi::Sequencer::decodeNames ( Gaudi::Property< std::vector< std::string >> &  theNames,
std::vector< Gaudi::Algorithm * > &  theAlgs,
std::vector< bool > &  theLogic 
)
protected

Decode algorithm names, creating or appending algorithms as appropriate.

Definition at line 235 of file Sequencer.cpp.

236  {
237  StatusCode result;
238  auto theAlgMgr = serviceLocator()->service<IAlgManager>( "ApplicationMgr" );
239  if ( theAlgMgr ) {
240  // Clear the existing list of algorithms
241  theAlgs.clear();
242 
243  // Build the list of member algorithms from the contents of the
244  // theNames list.
245  for ( const auto& n : theNames.value() ) {
246 
247  // Parse the name for a syntax of the form:
248  //
249  // <type>/<name>
250  //
251  // Where <name> is the algorithm instance name, and <type> is the
252  // algorithm class type (being a subclass of Algorithm).
254  std::string theName = typeName.name();
255  std::string theType = typeName.type();
256 
257  // Parse the name for a syntax of the form:
258  //
259  // <name>:invert
260  //
261  // Where <name> is the algorithm instance name and ":invert"
262  // indicates that the filter passed logic is inverted.
263  bool isInverted = false;
264  std::string::size_type invert = theName.find_first_of( ":" );
265  // Skip all occurrences of "::" (allow namespaces)
266  while ( std::string::npos != invert && invert < ( theName.size() - 1 ) && theName[invert + 1] == ':' )
267  invert = theName.find_first_of( ":", invert + 2 );
268  if ( std::string::npos != invert ) {
269  if ( theName == theType ) {
270  // This means that we got something like "Type:invert",
271  // so we have to strip the ":invert" from the type too.
272  theType = theType.substr( 0, invert );
273  }
274  theName = theName.substr( 0, invert );
275  isInverted = true;
276  }
277  // Check whether the supplied name corresponds to an existing
278  // Algorithm object.
279  SmartIF<IAlgorithm>& theIAlg = theAlgMgr->algorithm( theName, false );
280  Gaudi::Algorithm* theAlgorithm = nullptr;
282  if ( theIAlg ) {
283  try {
284  theAlgorithm = dynamic_cast<Gaudi::Algorithm*>( theIAlg.get() );
285  } catch ( ... ) {
286  warning() << theName << " is not an Algorithm - Failed dynamic cast" << endmsg;
287  theAlgorithm = nullptr; // release
288  }
289  }
290  if ( theAlgorithm ) {
291 
292  // The specified Algorithm already exists - just append it to the membership list.
293  status = append( theAlgorithm, theAlgs );
294  if ( status.isSuccess() ) {
295  ON_DEBUG debug() << theName << " already exists - appended to member list" << endmsg;
296  } else {
297  warning() << theName << " already exists - append failed!!!" << endmsg;
298  result = StatusCode::FAILURE;
299  }
300  } else {
301 
302  // The specified name doesn't exist - create a new object of the specified type
303  // and append it to the membership list.
304  status = createAndAppend( theType, theName, theAlgorithm, theAlgs );
305  if ( status.isSuccess() ) {
306  ON_DEBUG debug() << theName << " doesn't exist - created and appended to member list" << endmsg;
307  } else {
308  warning() << theName << " doesn't exist - creation failed!!!" << endmsg;
309  result = StatusCode::FAILURE;
310  }
311  }
312  if ( status.isSuccess() ) theLogic.push_back( isInverted );
313  }
314  }
315  // Print membership list
316  if ( result.isSuccess() && theAlgs.size() != 0 ) {
317  info() << "Member list: ";
318  auto ai = theAlgs.begin();
319  auto li = theLogic.begin();
320  for ( ; ai != theAlgs.end(); ++ai, ++li ) {
321 
322  if ( ai != theAlgs.begin() ) info() << ", ";
323  auto alg = *ai;
324  if ( alg->name() == System::typeinfoName( typeid( *alg ) ) )
325  info() << alg->name();
326  else
327  info() << System::typeinfoName( typeid( *alg ) ) << "/" << alg->name();
328 
329  if ( *li ) info() << ":invert";
330  }
331  info() << endmsg;
332  }
333  return result;
334  }

◆ execute() [1/2]

StatusCode Gaudi::Sequencer::execute ( const EventContext ctx) const
override

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

Definition at line 71 of file Sequencer.cpp.

71  {
73  ON_DEBUG debug() << name() << " Sequencer::execute()" << endmsg;
74 
75  auto& state = execState( ctx );
76 
77  // Bypass the loop if this sequencer is disabled or has already been executed
78  if ( isEnabled() && !( execState( ctx ).state() == AlgExecState::State::Done ) ) {
79  Gaudi::Algorithm* lastAlgorithm;
80  result = execute( ctx, *subAlgorithms(), m_isInverted, lastAlgorithm );
81  if ( result.isSuccess() ) {
82  const bool passed = state.filterPassed();
83  if ( !passed && m_shortCircuit ) {
84 
85  // Filter failed and stop override not set. Execute the
86  // branch if there is one associated with the filter
87  // algorithm that failed. Note that the first member on
88  // the branch is the failing algorithm and so should
89  // be skipped.
90  const auto& theAlgs = branchAlgorithms();
91  if ( !theAlgs.empty() ) {
92  Gaudi::Algorithm* branchAlgorithm = theAlgs[0];
93  if ( lastAlgorithm == branchAlgorithm ) {
94 
95  // Branch specified - Loop over branch members
96  result = execute( ctx, branchAlgorithms(), m_isBranchInverted, lastAlgorithm, 1 );
97  if ( result.isSuccess() ) {
98 
99  // The final filter passed state will be set true if either
100  // of the main or branches passed, otherwise false.
101 
102  // Save the branch filter passed state.
103  setBranchFilterPassed( ctx, state.filterPassed() );
104  }
105  }
106  }
107  }
108  }
109 
110  // Prevent multiple executions of this sequencer for the current event
111  state.setState( AlgExecState::State::Done );
112  }
113  return result;
114  }

◆ execute() [2/2]

StatusCode Gaudi::Sequencer::execute ( const EventContext ctx,
const std::vector< Gaudi::Algorithm * > &  theAlgs,
const std::vector< bool > &  theLogic,
Gaudi::Algorithm *&  lastAlgorithm,
std::size_t  first = 0 
) const
protected

Execute the members in the specified list.

Definition at line 336 of file Sequencer.cpp.

338  {
340 
341  auto& state = execState( ctx );
342  state.setFilterPassed( !m_modeOR ); // for OR, result will be false, unless (at least) one is true
343  // for AND, result will be true, unless (at least) one is false
344  // also see comment below ....)
345 
346  // Reset the branch filter passed flag
347  setBranchFilterPassed( ctx, false );
348 
349  auto exists = [&]( const std::string_view loc ) -> bool {
350  DataObject* tmp{ nullptr };
351  return evtSvc()->retrieveObject( loc, tmp ).isSuccess();
352  };
353 
354  // Do not execute if one or more of the m_vetoObjs exist in TES
355  if ( const auto it = find_if( begin( m_vetoObjs ), end( m_vetoObjs ), exists ); it != end( m_vetoObjs ) ) {
356  if ( msgLevel( MSG::DEBUG ) ) debug() << *it << " found, skipping event " << endmsg;
357  return result;
358  }
359 
360  // Execute if m_requireObjs is empty
361  // or if one or more of the m_requireObjs exist in TES
362  if ( !( m_requireObjs.empty() || any_of( begin( m_requireObjs ), end( m_requireObjs ), exists ) ) ) {
363  return result;
364  }
365 
366  // Loop over all algorithms calling their execute functions if they
367  // are (a) not disabled, and (b) aren't already executed. Note that
368  // in the latter case the filter state is still examined. Terminate
369  // the loop if an algorithm indicates that it's filter didn't pass.
370  auto size = theAlgs.size();
371  for ( auto i = first; i < size; i++ ) {
372  lastAlgorithm = theAlgs[i];
373  result = executeMember( lastAlgorithm, ctx );
374  if ( result.isSuccess() ) {
375  if ( !m_ignoreFilter ) {
376  // Take the filter passed status of this algorithm as my own status.
377  // Note that we take into account inverted logic.
378  bool passed = lastAlgorithm->execState( ctx ).filterPassed();
379  bool isInverted = theLogic[i];
380  if ( isInverted ) passed = !passed;
381 
382  // in OR mode, we don't care about things
383  // which are false, as they leave our current state alone (provided
384  // we stared as 'false'!), and in AND mode, we keep our current
385  // state until someone returns 'false' (provided we started as 'true')
386  if ( m_modeOR ? passed : !passed ) {
387  state.setFilterPassed( m_modeOR );
388  if ( m_shortCircuit ) { break; }
389  }
390  }
391  } else {
392  break;
393  }
394  }
395  if ( m_invert ) state.setFilterPassed( !state.filterPassed() );
396  return result;
397  }

◆ executeMember()

StatusCode Gaudi::Sequencer::executeMember ( Gaudi::Algorithm theAlgorithm,
const EventContext context 
) const
protected

Execute member algorithm.

Definition at line 399 of file Sequencer.cpp.

399  {
401  if ( theAlgorithm->isEnabled() ) {
402  if ( theAlgorithm->execState( context ).state() != AlgExecState::State::Done ) {
403  result = theAlgorithm->sysExecute( context );
404  }
405  }
406  return result;
407  }

◆ finalize()

StatusCode Gaudi::Sequencer::finalize ( )
override

Sequencer finalization.

Definition at line 116 of file Sequencer.cpp.

116  {
117  // Loop over all branch members calling their finalize functions
118  // if they are not disabled. Note that the Sequence::finalize
119  // function already does this for the main members.
120  for ( auto& alg : branchAlgorithms() ) {
121  if ( alg->sysFinalize().isFailure() ) { error() << "Unable to finalize Algorithm " << alg->name() << endmsg; }
122  }
123  return Sequence::finalize();
124  }

◆ initialize()

StatusCode Gaudi::Sequencer::initialize ( )
override

Initialization of a sequencer.

Typically things like histogram creation, setting up of data structures etc, should be done here. If a sequence has properties specified in the job options file, they will be set to the requested values BEFORE the initialize() method is invoked.

Definition at line 28 of file Sequencer.cpp.

28  {
29  auto is_good = decodeMemberNames();
30  if ( !is_good ) {
31  error() << "Unable to configure one or more sequencer members " << endmsg;
32  return is_good;
33  }
34 
35  is_good = decodeBranchMemberNames();
36  if ( !is_good ) {
37  error() << "Unable to configure one or more branch members " << endmsg;
38  return is_good;
39  }
40 
41  // We have to "decode" members before calling base class initialize
42  is_good = Sequence::initialize();
43  if ( !is_good ) return is_good;
44 
45  // Loop over all branches
46  // (Sequence does not know about branches)
47  for ( auto& alg : branchAlgorithms() ) {
48  is_good = alg->sysInitialize();
49  if ( is_good.isFailure() ) {
50  error() << "Unable to initialize Algorithm " << alg->name() << endmsg;
51  return is_good;
52  }
53  }
54 
55  return is_good;
56  }

◆ operator=()

Sequencer& Gaudi::Sequencer::operator= ( const Sequencer rhs)
protecteddelete

◆ reinitialize()

StatusCode Gaudi::Sequencer::reinitialize ( )
override

Sequencer Reinitialization.

Definition at line 58 of file Sequencer.cpp.

58  {
59  // Bypass the loop if this sequencer is disabled
60  if ( isEnabled() ) {
61  // Loop over all branch members calling their reinitialize functions
62  // if they are not disabled.
63  for ( auto& alg : branchAlgorithms() ) {
64  if ( alg->isEnabled() ) { alg->reinitialize().ignore(); }
65  }
66  return Sequence::reinitialize();
67  }
68  return StatusCode::SUCCESS;
69  }

◆ remove() [1/3]

StatusCode Gaudi::Sequencer::remove ( const std::string algname,
std::vector< Gaudi::Algorithm * > &  theAlgs 
)
protected

Remove the specified algorithm from the sequencer.

Definition at line 409 of file Sequencer.cpp.

409  {
411 
412  // Test that the algorithm exists in the member list
413  for ( auto& alg : theAlgs ) {
414  if ( alg->name() == algname ) {
415 
416  // Algorithm with specified name exists in the algorithm list - remove it
417  // THIS ISN'T IMPLEMENTED YET!!!!
418  info() << "Sequencer::remove( ) isn't implemented yet!!!!!" << endmsg;
419  result = StatusCode::SUCCESS;
420  break;
421  }
422  }
423  return result;
424  }

◆ remove() [2/3]

StatusCode Gaudi::Sequencer::remove ( const std::string name)

Definition at line 179 of file Sequencer.cpp.

179 { return remove( algname, *subAlgorithms() ); }

◆ remove() [3/3]

StatusCode Gaudi::Sequencer::remove ( Gaudi::Algorithm pAlgorithm)

Remove the specified algorithm from the sequencer.

Definition at line 177 of file Sequencer.cpp.

177 { return remove( pAlgorithm->name() ); }

◆ removeFromBranch() [1/2]

StatusCode Gaudi::Sequencer::removeFromBranch ( const std::string name)

Definition at line 185 of file Sequencer.cpp.

185 { return remove( algname, branchAlgorithms() ); }

◆ removeFromBranch() [2/2]

StatusCode Gaudi::Sequencer::removeFromBranch ( Gaudi::Algorithm pAlgorithm)

Definition at line 181 of file Sequencer.cpp.

181  {
182  return removeFromBranch( pAlgorithm->name() );
183  }

◆ setBranchFilterPassed()

void Gaudi::Sequencer::setBranchFilterPassed ( const EventContext ctx,
bool  state 
) const

Set the branch filter passed flag for the last event.

Definition at line 156 of file Sequencer.cpp.

156  {
157  auto lock = std::scoped_lock{ m_branchFilterMutex };
158  m_branchFilterPassed[ctx.slot()] = state;
159  }

◆ start()

StatusCode Gaudi::Sequencer::start ( )
override

Sequencer finalization.

Definition at line 126 of file Sequencer.cpp.

126  {
127  auto is_good = Sequence::start();
128  if ( !is_good ) return is_good;
129 
130  // Loop over all branches
131  for ( auto& alg : branchAlgorithms() ) {
132  is_good = alg->sysStart();
133  if ( !is_good ) {
134  error() << "Unable to start Algorithm " << alg->name() << endmsg;
135  return is_good;
136  }
137  }
138 
139  return is_good;
140  }

◆ stop()

StatusCode Gaudi::Sequencer::stop ( )
override

Sequencer stop.

Definition at line 142 of file Sequencer.cpp.

142  {
143  // Loop over all branch members calling their finalize functions
144  // if they are not disabled.
145  for ( auto& alg : branchAlgorithms() ) {
146  if ( alg->sysStop().isFailure() ) { error() << "Unable to stop Algorithm " << alg->name() << endmsg; }
147  }
148  return Sequence::stop();
149  }

◆ toControlFlowExpression()

std::ostream & Gaudi::Sequencer::toControlFlowExpression ( std::ostream os) const
override

Produce string representation of the control flow expression.

Definition at line 426 of file Sequencer.cpp.

426  {
427  if ( m_invert ) os << '~';
428 
429  auto& theAlgs = *subAlgorithms();
430  if ( theAlgs.empty() ) return os << ( ( !m_modeOR ) ? "CFTrue" : "CFFalse" );
431 
432  // if we have only one element, we do not need a name
433  if ( theAlgs.size() > 1 ) os << "seq(";
434 
435  const auto algs_count = theAlgs.size();
436  const auto op = m_shortCircuit ? ( m_modeOR ? " | " : " & " ) : " >> ";
437  size_t i = 0;
438  while ( i < algs_count ) {
439  if ( i ) os << op;
440  if ( m_isInverted[i] ) os << '~';
441  theAlgs[i]->toControlFlowExpression( os );
442  ++i;
443  }
444  if ( theAlgs.size() > 1 ) os << ')';
445  return os;
446  }

Member Data Documentation

◆ m_branchAlgs

std::vector<Gaudi::Algorithm*> Gaudi::Sequencer::m_branchAlgs
private

Definition at line 204 of file Sequencer.h.

◆ m_branchFilterMutex

std::mutex Gaudi::Sequencer::m_branchFilterMutex
mutableprivate

Definition at line 207 of file Sequencer.h.

◆ m_branchFilterPassed

std::map<EventContext::ContextID_t, bool> Gaudi::Sequencer::m_branchFilterPassed
mutableprivate

Definition at line 208 of file Sequencer.h.

◆ m_branchNames

Gaudi::Property<std::vector<std::string> > Gaudi::Sequencer::m_branchNames
private
Initial value:
{ this,
"BranchMembers",
{},
[this]( auto& ) {
if ( this->isInitialized() )
},
"branch member names",
"vector<Algorithm>" }

Definition at line 182 of file Sequencer.h.

◆ m_ignoreFilter

Gaudi::Property<bool> Gaudi::Sequencer::m_ignoreFilter { this, "IgnoreFilterPassed", false, "always continue" }
private

Definition at line 195 of file Sequencer.h.

◆ m_invert

Gaudi::Property<bool> Gaudi::Sequencer::m_invert { this, "Invert", false, "invert the logic result of the sequencer" }
private

Definition at line 196 of file Sequencer.h.

◆ m_isBranchInverted

std::vector<bool> Gaudi::Sequencer::m_isBranchInverted
private

Definition at line 205 of file Sequencer.h.

◆ m_isInverted

std::vector<bool> Gaudi::Sequencer::m_isInverted
private

Definition at line 203 of file Sequencer.h.

◆ m_modeOR

Gaudi::Property<bool> Gaudi::Sequencer::m_modeOR { this, "ModeOR", false, "use OR logic instead of AND" }
private

Definition at line 194 of file Sequencer.h.

◆ m_names

Gaudi::Property<std::vector<std::string> > Gaudi::Sequencer::m_names
private
Initial value:
{ this,
"Members",
{},
[this]( auto& ) {
if ( this->isInitialized() )
},
"member names",
"vector<Algorithm>" }

Definition at line 173 of file Sequencer.h.

◆ m_requireObjs

Gaudi::Property<std::vector<std::string> > Gaudi::Sequencer::m_requireObjs
private
Initial value:
{
this, "RequireObjects", {}, "execute only if one or more of these TES objects exist" }

Definition at line 200 of file Sequencer.h.

◆ m_sequential

Gaudi::Property<bool> Gaudi::Sequencer::m_sequential { this, "Sequential", false, "execute members one at a time" }
private

Definition at line 193 of file Sequencer.h.

◆ m_shortCircuit

Gaudi::Property<bool> Gaudi::Sequencer::m_shortCircuit { this, "ShortCircuit", true, "stop processing as soon as possible" }
private

Definition at line 192 of file Sequencer.h.

◆ m_vetoObjs

Gaudi::Property<std::vector<std::string> > Gaudi::Sequencer::m_vetoObjs
private
Initial value:
{
this, "VetoObjects", {}, "skip execute if one or more of these TES objects exist" }

Definition at line 198 of file Sequencer.h.


The documentation for this class was generated from the following files:
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:25
std::lock
T lock(T... args)
Gaudi::Algorithm::sysExecute
StatusCode sysExecute(const EventContext &ctx) override
The actions to be performed by the algorithm on an event.
Definition: Algorithm.cpp:325
Gaudi::Sequencer::setBranchFilterPassed
void setBranchFilterPassed(const EventContext &ctx, bool state) const
Set the branch filter passed flag for the last event.
Definition: Sequencer.cpp:156
std::string
STL class.
details::size
constexpr auto size(const T &, Args &&...) noexcept
Definition: AnyDataWrapper.h:23
Gaudi::Sequence::initialize
StatusCode initialize() override
Initialization method invoked by the framework.
Definition: Sequence.cpp:24
AlgExecState::state
State state() const
Definition: IAlgExecStateSvc.h:41
Gaudi::Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:526
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
Gaudi::Algorithm::isInitialized
bool isInitialized() const override
Has the Algorithm already been initialized?
Definition: Algorithm.h:421
Gaudi::Algorithm::type
const std::string & type() const override
The type of the algorithm object.
Definition: Algorithm.h:165
std::find
T find(T... args)
std::string::size
T size(T... args)
Gaudi::Sequencer::executeMember
StatusCode executeMember(Gaudi::Algorithm *theAlgorithm, const EventContext &context) const
Execute member algorithm.
Definition: Sequencer.cpp:399
Gaudi::Algorithm::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:570
Gaudi::Sequencer::m_names
Gaudi::Property< std::vector< std::string > > m_names
Definition: Sequencer.h:173
Gaudi::Sequence::finalize
StatusCode finalize() override
System finalization.
Definition: Sequence.cpp:36
Gaudi::Sequencer::branchAlgorithms
const std::vector< Gaudi::Algorithm * > & branchAlgorithms() const
List of branch algorithms.
Definition: Sequencer.cpp:187
Gaudi::Sequencer::append
StatusCode append(Gaudi::Algorithm *pAlgorithm)
Append an algorithm to the sequencer.
Definition: Sequencer.cpp:161
Gaudi::Sequencer::m_modeOR
Gaudi::Property< bool > m_modeOR
Definition: Sequencer.h:194
std::any_of
T any_of(T... args)
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:315
Gaudi::Sequence::stop
StatusCode stop() override
System stop.
Definition: Sequence.cpp:66
Gaudi::Sequencer::m_requireObjs
Gaudi::Property< std::vector< std::string > > m_requireObjs
Definition: Sequencer.h:200
CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:148
Gaudi::Sequence::start
StatusCode start() override
System start.
Definition: Sequence.cpp:54
std::vector::clear
T clear(T... args)
Gaudi::Sequencer::removeFromBranch
StatusCode removeFromBranch(Gaudi::Algorithm *pAlgorithm)
Definition: Sequencer.cpp:181
Gaudi::Sequencer::decodeNames
StatusCode decodeNames(Gaudi::Property< std::vector< std::string >> &theNames, std::vector< Gaudi::Algorithm * > &theAlgs, std::vector< bool > &theLogic)
Decode algorithm names, creating or appending algorithms as appropriate.
Definition: Sequencer.cpp:235
Gaudi::Sequencer::m_shortCircuit
Gaudi::Property< bool > m_shortCircuit
Definition: Sequencer.h:192
std::vector::push_back
T push_back(T... args)
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:81
IAlgManager
Definition: IAlgManager.h:37
Gaudi::Algorithm::isEnabled
bool isEnabled() const override
Is this algorithm enabled or disabled?
Definition: Algorithm.cpp:536
Gaudi::Utils::begin
AttribStringParser::Iterator begin(const AttribStringParser &parser)
Definition: AttribStringParser.h:136
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:20
GaudiPython.Pythonizations.ctx
ctx
Definition: Pythonizations.py:578
StatusCode
Definition: StatusCode.h:65
Gaudi::Sequencer::m_isInverted
std::vector< bool > m_isInverted
Definition: Sequencer.h:203
IAlgorithm
Definition: IAlgorithm.h:38
Gaudi::Sequencer::m_branchFilterPassed
std::map< EventContext::ContextID_t, bool > m_branchFilterPassed
Definition: Sequencer.h:208
Gaudi::Algorithm::execState
AlgExecState & execState(const EventContext &ctx) const override
reference to AlgExecState of Alg
Definition: Algorithm.cpp:538
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:90
Gaudi::Property::value
const ValueType & value() const
Definition: Property.h:237
Gaudi::Sequencer::m_isBranchInverted
std::vector< bool > m_isBranchInverted
Definition: Sequencer.h:205
Gaudi::Sequencer::decodeMemberNames
StatusCode decodeMemberNames()
Decode Member Name list.
Definition: Sequencer.cpp:191
SmartIF< IAlgorithm >
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
Gaudi::Sequencer::execute
StatusCode execute(const EventContext &ctx) const override
The actions to be performed by the sequencer on an event.
Definition: Sequencer.cpp:71
Gaudi::Sequencer::m_branchNames
Gaudi::Property< std::vector< std::string > > m_branchNames
Definition: Sequencer.h:182
cpluginsvc.n
n
Definition: cpluginsvc.py:234
StatusCode::ignore
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition: StatusCode.h:139
std::string::substr
T substr(T... args)
ON_DEBUG
#define ON_DEBUG
Definition: Sequencer.cpp:24
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
Gaudi::Algorithm::evtSvc
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
Definition: Algorithm.h:250
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:86
GaudiDict::typeName
std::string typeName(const std::type_info &typ)
Definition: Dictionary.cpp:31
std::begin
T begin(T... args)
Gaudi::Sequencer::m_vetoObjs
Gaudi::Property< std::vector< std::string > > m_vetoObjs
Definition: Sequencer.h:198
DataObject
Definition: DataObject.h:36
Gaudi::Sequence::subAlgorithms
const std::vector< Algorithm * > * subAlgorithms() const
List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.
Definition: Sequence.cpp:103
AlgExecState::filterPassed
bool filterPassed() const
Definition: IAlgExecStateSvc.h:40
std::string::find_first_of
T find_first_of(T... args)
Gaudi::Sequencer::decodeBranchMemberNames
StatusCode decodeBranchMemberNames()
Decode branch member name list.
Definition: Sequencer.cpp:196
Gaudi::Sequencer::createAndAppend
StatusCode createAndAppend(const std::string &type, const std::string &name, Gaudi::Algorithm *&pAlgorithm)
Create a algorithm and append it to the sequencer.
Definition: Sequencer.cpp:167
Gaudi::Sequencer::m_invert
Gaudi::Property< bool > m_invert
Definition: Sequencer.h:196
std::end
T end(T... args)
IOTest.end
end
Definition: IOTest.py:125
Gaudi::Sequencer::remove
StatusCode remove(Gaudi::Algorithm *pAlgorithm)
Remove the specified algorithm from the sequencer.
Definition: Sequencer.cpp:177
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
compareRootHistos.state
state
Definition: compareRootHistos.py:496
Gaudi::Sequencer::m_branchAlgs
std::vector< Gaudi::Algorithm * > m_branchAlgs
Definition: Sequencer.h:204
Gaudi::Sequencer::m_ignoreFilter
Gaudi::Property< bool > m_ignoreFilter
Definition: Sequencer.h:195
Gaudi::Sequencer::m_branchFilterMutex
std::mutex m_branchFilterMutex
Definition: Sequencer.h:207
Gaudi::Sequence::reinitialize
StatusCode reinitialize() override
Reinitialization method invoked by the framework.
Definition: Sequence.cpp:76