ATLAS Offline Software
Loading...
Searching...
No Matches
AthSequencer Class Reference

ClassName: AthSequencer. More...

#include <AthSequencer.h>

Inheritance diagram for AthSequencer:
Collaboration diagram for AthSequencer:

Public Member Functions

 AthSequencer (const std::string &name, ISvcLocator *svcloc)
 Constructor(s)
virtual ~AthSequencer ()
 Destructor.
virtual StatusCode initialize () override
 Initialization of a sequencer.
virtual StatusCode reinitialize () override
 AthSequencer Reinitialization.
virtual StatusCode execute (const EventContext &ctx) const override
 The actions to be performed by the sequencer on an event.
virtual StatusCode start () override
 Start (from INITIALIZED to RUNNING).
virtual StatusCode stop () override
 Stop (from RUNNING to INITIALIZED).
virtual void resetExecuted (const EventContext &ctx) const
 Reset the AthSequencer executed state for the current event.
virtual bool isStopOverride () const
 Has the StopOverride mode been set?
StatusCode append (Gaudi::Algorithm *pAlgorithm)
 Append an algorithm to the sequencer.
StatusCode createAndAppend (const std::string &type, const std::string &name, Gaudi::Algorithm *&pAlgorithm)
 Create a algorithm and append it to the sequencer.
StatusCode remove (Gaudi::Algorithm *pAlgorithm)
 Remove the specified algorithm from the sequencer.
StatusCode remove (const std::string &name)
StatusCode decodeMemberNames ()
 Decode Member Name list.
void membershipHandler (Gaudi::Details::PropertyBase &theProp)
 "Members" property handler
StatusCode decodeBranchMemberNames ()
 Decode branch member naem list.
void branchMembershipHandler (Gaudi::Details::PropertyBase &theProp)
 "BranchMembers" propertry handler
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

StatusCode append (Gaudi::Algorithm *pAlgorithm, std::vector< Gaudi::Algorithm * > *theAlgs)
 Append an algorithm to the sequencer.
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.
StatusCode decodeNames (Gaudi::Property< std::vector< std::string > > &theNames, std::vector< Gaudi::Algorithm * > *theAlgs)
 Decode algorithm names, creating or appending algorithms as appropriate.
StatusCode remove (const std::string &algname, std::vector< Gaudi::Algorithm * > *theAlgs)
 Remove the specified algorithm from the sequencer.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode executeAlgorithm (Gaudi::Algorithm *theAlgorithm, const EventContext &ctx) const
 Run one algorithm.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< std::vector< std::string > > m_names
Gaudi::Property< bool > m_modeOR
Gaudi::Property< bool > m_ignoreFilter
Gaudi::Property< bool > m_invert
Gaudi::Property< bool > m_stopOverride
Gaudi::Property< bool > m_sequential
Gaudi::Property< std::vector< std::string > > m_undeclaredOutputData
Gaudi::Property< bool > m_runPostInitialize
ServiceHandle< IClassIDSvc > m_clidSvc
const unsigned int m_maxPass {100}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

ClassName: AthSequencer.

Description: An AthSequencer 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 AthSequencer assumes the same filtered state as the last member.

Definition at line 38 of file AthSequencer.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ AthSequencer()

AthSequencer::AthSequencer ( const std::string & name,
ISvcLocator * svcloc )

Constructor(s)

Definition at line 27 of file AthSequencer.cxx.

28 :
30 m_clidSvc("ClassIDSvc/ClassIDSvc", name)
31{
32 m_names.declareUpdateHandler( &AthSequencer::membershipHandler, this );
33}
AthCommonDataStore(const std::string &name, T... args)
ServiceHandle< IClassIDSvc > m_clidSvc
void membershipHandler(Gaudi::Details::PropertyBase &theProp)
"Members" property handler
Gaudi::Property< std::vector< std::string > > m_names

◆ ~AthSequencer()

AthSequencer::~AthSequencer ( )
virtual

Destructor.

Definition at line 38 of file AthSequencer.cxx.

39{}

Member Function Documentation

◆ append() [1/2]

StatusCode AthSequencer::append ( Gaudi::Algorithm * pAlgorithm)

Append an algorithm to the sequencer.

Definition at line 224 of file AthSequencer.cxx.

225{
226 return append( pAlgorithm, subAlgorithms( ) );
227}
StatusCode append(Gaudi::Algorithm *pAlgorithm)
Append an algorithm to the sequencer.

◆ append() [2/2]

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

Append an algorithm to the sequencer.

Protected Member Functions.

Definition at line 267 of file AthSequencer.cxx.

269{
270 bool all_good = true;
271 // Check that the specified algorithm doesn't already exist
272 // in the membership list
273 for (Gaudi::Algorithm* theAlgorithm : *theAlgs) {
274 if ( theAlgorithm == pAlgorithm ) {
275 all_good = false;
276 break;
277 }
278 }
279 if ( all_good ) {
280 theAlgs->push_back( pAlgorithm );
281 pAlgorithm->addRef();
282 }
283 return all_good ? StatusCode::SUCCESS : StatusCode::FAILURE;
284}

◆ branchMembershipHandler()

void AthSequencer::branchMembershipHandler ( Gaudi::Details::PropertyBase & theProp)

"BranchMembers" propertry handler

◆ createAndAppend() [1/2]

StatusCode AthSequencer::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 230 of file AthSequencer.cxx.

233{
234 return createAndAppend( type, name, pAlgorithm, subAlgorithms( ) );
235}
StatusCode createAndAppend(const std::string &type, const std::string &name, Gaudi::Algorithm *&pAlgorithm)
Create a algorithm and append it to the sequencer.

◆ createAndAppend() [2/2]

StatusCode AthSequencer::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 287 of file AthSequencer.cxx.

291{
292 SmartIF<IAlgManager> theAlgMgr(Gaudi::svcLocator()->as<IAlgManager>());
293 IAlgorithm* tmp = nullptr;
294
295 ATH_CHECK( theAlgMgr->createAlgorithm( type, algName, tmp ) );
296 pAlgorithm = dynamic_cast<Gaudi::Algorithm*>(tmp);
297 theAlgs->push_back( pAlgorithm );
298
299 return StatusCode::SUCCESS;
300}
#define ATH_CHECK
Evaluate an expression and check for errors.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ decodeBranchMemberNames()

StatusCode AthSequencer::decodeBranchMemberNames ( )

Decode branch member naem list.

◆ decodeMemberNames()

StatusCode AthSequencer::decodeMemberNames ( )

Decode Member Name list.

Definition at line 250 of file AthSequencer.cxx.

251{
252 // Decode the membership list
253 return decodeNames( m_names, subAlgorithms() );
254}
StatusCode decodeNames(Gaudi::Property< std::vector< std::string > > &theNames, std::vector< Gaudi::Algorithm * > *theAlgs)
Decode algorithm names, creating or appending algorithms as appropriate.

◆ decodeNames()

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

Decode algorithm names, creating or appending algorithms as appropriate.

Definition at line 303 of file AthSequencer.cxx.

305{
306 SmartIF<IAlgManager> theAlgMgr(Gaudi::svcLocator()->as<IAlgManager>());
307
308 // Clear the existing list of algorithms
309 theAlgs->clear( );
310
311 // Build the list of member algorithms from the contents of the
312 // theNames list.
313 StatusCode result = StatusCode::SUCCESS;
314 for (const std::string& name : theNames.value()) {
315
316 // Parse the name for a syntax of the form <type>/<name>
317 Gaudi::Utils::TypeNameString tn(name);
318
319 // Check whether the supplied name corresponds to an existing
320 // Algorithm object.
321 SmartIF<IAlgorithm>& theIAlg = theAlgMgr->algorithm(tn.name(), /*createIf*/false);
322 Gaudi::Algorithm* theAlgorithm = nullptr;
323 if ( theIAlg ) {
324 theAlgorithm = dynamic_cast<Gaudi::Algorithm*>(theIAlg.get());
325 if ( theAlgorithm ) {
326 // The specified Algorithm already exists -
327 // just append it to the membership list.
328 if ( append(theAlgorithm, theAlgs).isSuccess( ) ) {
329 ATH_MSG_DEBUG (tn.name() << " already exists - appended to member list");
330 } else {
331 ATH_MSG_WARNING (tn.name() << " already exists - append failed!!!");
332 result = StatusCode::FAILURE;
333 }
334 }
335 else {
336 ATH_MSG_WARNING (tn.name() << " is not an Algorithm - Failed dynamic cast");
337 result = StatusCode::FAILURE;
338 }
339 } else {
340 // The specified name doesn't exist -
341 // create a new object of the specified type and append it to
342 // the membership list.
343 if ( createAndAppend(tn.type(), tn.name(), theAlgorithm, theAlgs).isSuccess( ) ) {
344 ATH_MSG_DEBUG (tn.name() << " doesn't exist - created and appended to member list");
345 } else {
346 ATH_MSG_WARNING (tn.name() << " doesn't exist - creation failed!!!");
347 result = StatusCode::FAILURE;
348 }
349 }
350 } //> loop over names
351
352 // Print membership list
353 if (msgLvl(MSG::DEBUG)) {
354 if ( result.isSuccess() && !theAlgs->empty() ) {
355
356 msg(MSG::DEBUG) << "Member list: ";
357 bool first = true;
358 for (Gaudi::Algorithm* alg : *theAlgs) {
359 if (first)
360 first = false;
361 else
362 msg() << ", ";
363 if ( alg->name() == System::typeinfoName(typeid(*alg)))
364 msg() << alg->name();
365 else
366 msg() << System::typeinfoName(typeid(*alg)) << "/" << alg->name();
367 }
368 msg(MSG::DEBUG) << endmsg;
369 }
370 }
371 return result;
372}
#define endmsg
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
bool msgLvl(const MSG::Level lvl) const
bool first
Definition DeMoScan.py:534
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode AthSequencer::execute ( const EventContext & ctx) const
overridevirtual

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

This method is invoked once per event.

Definition at line 98 of file AthSequencer.cxx.

99{
100 StatusCode sc = StatusCode::SUCCESS;
101 bool seqPass = !m_modeOR;
102
103 ATH_MSG_DEBUG ("Executing " << name() << "...");
104
105 auto state = execState( ctx );
106
107 // Bypass the loop if this sequencer is disabled or has already been executed
108 if ( isEnabled( ) && state.state() != AlgExecState::State::Done ) {
109
110 // Prevent multiple executions of this sequencer for the current event
111 state.setState( AlgExecState::State::Executing );
112
113 // Loop over all algorithms calling their execute functions if they
114 // are (a) not disabled, and (b) aren't already executed. Note that
115 // in the latter case the filter state is still examined. Terminate
116 // the loop if an algorithm indicates that it's filter didn't pass.
117 const std::vector<Gaudi::Algorithm*>* subAlgms = subAlgorithms( );
118 for (auto theAlgorithm : *subAlgms) {
119 if ( theAlgorithm->isEnabled( ) ) {
120 if ( theAlgorithm->execState(ctx).state() == AlgExecState::State::None ) {
121 sc = executeAlgorithm (theAlgorithm, ctx);
122 }
123
124 if ( sc.isSuccess() ) {
125
126 if ( !m_ignoreFilter ) {
127 // Take the filter passed status of this algorithm as my own status
128 const bool passed = theAlgorithm->execState( ctx ).filterPassed();
129 if ( m_invert ) {
130 state.setFilterPassed( !passed );
131 } else {
132 state.setFilterPassed( passed );
133 }
134
135 // The behaviour when the filter fails depends on the
136 // StopOverride property.
137 // The default action is to stop processing, but this default can be
138 // overridden by setting the "StopOverride" property to false.
139 if ( m_modeOR ? passed : !passed ) {
140 seqPass = passed;
141 if ( !m_stopOverride ) break;
142 }
143 }
144 } else {
145 ATH_MSG_INFO ("execute of [" << theAlgorithm->name() << "] did NOT succeed");
146 break;
147 }
148 }
149 }
150 }
151
152 if ( !m_ignoreFilter && !m_names.empty() ) {
153 if ( m_invert ) {
154 state.setFilterPassed( !seqPass );
155 } else {
156 state.setFilterPassed( seqPass );
157 }
158 }
159
160 state.setState( AlgExecState::State::Done );
161
162 return sc;
163}
#define ATH_MSG_INFO(x)
bool passed(DecisionID id, const DecisionIDContainer &)
checks if required decision ID is in the set of IDs in the container
static Double_t sc
Gaudi::Property< bool > m_invert
Gaudi::Property< bool > m_modeOR
StatusCode executeAlgorithm(Gaudi::Algorithm *theAlgorithm, const EventContext &ctx) const
Run one algorithm.
Gaudi::Property< bool > m_ignoreFilter
Gaudi::Property< bool > m_stopOverride

◆ executeAlgorithm()

StatusCode AthSequencer::executeAlgorithm ( Gaudi::Algorithm * theAlgorithm,
const EventContext & ctx ) const
private

Run one algorithm.

Definition at line 166 of file AthSequencer.cxx.

168{
169 // Call the sysExecute() of the method the algorithm
170 return theAlgorithm->sysExecute( ctx );
171}

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ initialize()

StatusCode AthSequencer::initialize ( )
overridevirtual

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 42 of file AthSequencer.cxx.

43{
44 if (!decodeMemberNames().isSuccess()) {
45 ATH_MSG_ERROR ("Unable to configure one or more sequencer members ");
46 return StatusCode::FAILURE;
47 }
48
49 Ath::DynamicDataHelper dynamic_data_helper;
50 StatusCode sc(StatusCode::SUCCESS);
51 // Loop over all sub-algorithms
52 for (Gaudi::Algorithm* theAlgorithm : *subAlgorithms()) {
53 if (!theAlgorithm->sysInitialize( ).isSuccess()) {
54 ATH_MSG_ERROR ("Unable to initialize Algorithm "
55 << theAlgorithm->type() << "/" << theAlgorithm->name());
56 sc= StatusCode::FAILURE;
57 }
58 else if (m_runPostInitialize) {
59 // visit all algorithms and its tools to gather their input, output handles and dynamic data consumers
60 dynamic_data_helper.gatherDataHandlesAndDynamicConsumers(this->name(),theAlgorithm);
61 }
62 }
63 if (sc.isSuccess() && m_runPostInitialize) {
64 ATH_MSG_DEBUG("Allow dynamic data consumers to update their data dependencies.");
65 if (!m_undeclaredOutputData.empty()) {
66 ATH_CHECK( m_clidSvc.retrieve() );
67 ATH_CHECK( dynamic_data_helper.addExtraDependencies(*m_clidSvc, m_undeclaredOutputData.value(), msg() ) );
68 }
69 dynamic_data_helper.updateDataNeeds(m_maxPass, msg());
70 }
71 return sc;
72}
#define ATH_MSG_ERROR(x)
const unsigned int m_maxPass
StatusCode decodeMemberNames()
Decode Member Name list.
Gaudi::Property< bool > m_runPostInitialize
Gaudi::Property< std::vector< std::string > > m_undeclaredOutputData
StatusCode addExtraDependencies(IClassIDSvc &clid_svc, std::vector< std::string > &undeclared_output_data, MsgStream &out)
Add extra output data which is not declared by any of the gathered components.
void gatherDataHandlesAndDynamicConsumers(const std::string &parent_name, Gaudi::Algorithm *theAlgorithm)
Gather the input and output data declared by the given algorithm, its child algorithms and their tool...
void updateDataNeeds(unsigned int max_pass, MsgStream &out)
Update the data dependencies of all components which dynamically declare tehm.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isStopOverride()

bool AthSequencer::isStopOverride ( ) const
virtual

Has the StopOverride mode been set?

Definition at line 218 of file AthSequencer.cxx.

219{
220 return m_stopOverride.value( );
221}

◆ membershipHandler()

void AthSequencer::membershipHandler ( Gaudi::Details::PropertyBase & theProp)

"Members" property handler

Definition at line 257 of file AthSequencer.cxx.

258{
259 if ( isInitialized() ) decodeMemberNames().ignore();
260}

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Sequence >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Sequence >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ reinitialize()

StatusCode AthSequencer::reinitialize ( )
overridevirtual

AthSequencer Reinitialization.

Definition at line 75 of file AthSequencer.cxx.

76{
77 StatusCode sc(StatusCode::SUCCESS);
78 // Bypass the loop if this sequencer is disabled
79 if ( isEnabled( ) ) {
80
81 // Loop over all members calling their reinitialize functions
82 // if they are not disabled.
83 for (Gaudi::Algorithm* theAlgorithm : *subAlgorithms()) {
84 if ( theAlgorithm->isEnabled( ) ) {
85 if (theAlgorithm->sysReinitialize( ).isFailure()) {
86 ATH_MSG_ERROR ("Unable to reinitialize Algorithm "
87 << theAlgorithm->type () << "/"
88 << theAlgorithm->name());
89 sc = StatusCode::FAILURE;
90 }
91 }
92 }
93 }
94 return sc;
95}

◆ remove() [1/3]

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

Remove the specified algorithm from the sequencer.

Definition at line 375 of file AthSequencer.cxx.

377{
378 ATH_MSG_ERROR ("AthSequencer::remove( ) is not supported");
379 return StatusCode::FAILURE;
380}

◆ remove() [2/3]

StatusCode AthSequencer::remove ( const std::string & name)

Definition at line 244 of file AthSequencer.cxx.

245{
246 return remove( algname, subAlgorithms( ) );
247}
StatusCode remove(Gaudi::Algorithm *pAlgorithm)
Remove the specified algorithm from the sequencer.

◆ remove() [3/3]

StatusCode AthSequencer::remove ( Gaudi::Algorithm * pAlgorithm)

Remove the specified algorithm from the sequencer.

Definition at line 238 of file AthSequencer.cxx.

239{
240 return remove (pAlgorithm->name());
241}

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ resetExecuted()

void AthSequencer::resetExecuted ( const EventContext & ctx) const
virtual

Reset the AthSequencer executed state for the current event.

Definition at line 206 of file AthSequencer.cxx.

207{
208 execState(ctx).reset();
209
210 // Loop over all members calling their resetExecuted functions
211 // if they are not disabled.
212 for (Gaudi::Algorithm* theAlgorithm : *subAlgorithms()) {
213 theAlgorithm->execState(ctx).reset();
214 }
215}

◆ start()

StatusCode AthSequencer::start ( )
overridevirtual

Start (from INITIALIZED to RUNNING).

IStateful::start

Definition at line 174 of file AthSequencer.cxx.

175{
176 StatusCode sc(StatusCode::SUCCESS);
177 // Loop over all sub-algorithms
178 for (Gaudi::Algorithm* theAlgorithm : *subAlgorithms()) {
179 if (!theAlgorithm->sysStart( ).isSuccess()) {
180 ATH_MSG_ERROR ("Unable to start Algorithm "
181 << theAlgorithm->type () << "/"
182 << theAlgorithm->name());
183 sc = StatusCode::FAILURE;
184 }
185 }
186 return sc;
187}

◆ stop()

StatusCode AthSequencer::stop ( )
overridevirtual

Stop (from RUNNING to INITIALIZED).

Definition at line 190 of file AthSequencer.cxx.

191{
192 StatusCode sc(StatusCode::SUCCESS);
193 // Loop over all sub-algorithms if they are not disabled.
194 for (Gaudi::Algorithm* theAlgorithm : *subAlgorithms()) {
195 if (theAlgorithm->sysStop( ).isFailure()) {
196 ATH_MSG_ERROR ("Unable to stop Algorithm "
197 << theAlgorithm->type () << "/"
198 << theAlgorithm->name());
199 sc = StatusCode::FAILURE;
200 }
201 }
202 return sc;
203}

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_clidSvc

ServiceHandle<IClassIDSvc> AthSequencer::m_clidSvc
private

Definition at line 203 of file AthSequencer.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_ignoreFilter

Gaudi::Property<bool> AthSequencer::m_ignoreFilter
private
Initial value:
{this, "IgnoreFilterPassed", false,
"Always continue sequence ignoring filterPassed of member algorithms"}

Definition at line 184 of file AthSequencer.h.

184 {this, "IgnoreFilterPassed", false,
185 "Always continue sequence ignoring filterPassed of member algorithms"};

◆ m_invert

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

Definition at line 187 of file AthSequencer.h.

187 { this, "Invert", false,
188 "Invert the logic result of the sequencer"};

◆ m_maxPass

const unsigned int AthSequencer::m_maxPass {100}
private

Definition at line 205 of file AthSequencer.h.

205{100}; //<! maximum number of iterations to process dynamic data dependencies

◆ m_modeOR

Gaudi::Property<bool> AthSequencer::m_modeOR
private
Initial value:
{this, "ModeOR", false,
"Use OR logic instead of AND"}

Definition at line 181 of file AthSequencer.h.

181 {this, "ModeOR", false,
182 "Use OR logic instead of AND"};

◆ m_names

Gaudi::Property<std::vector<std::string> > AthSequencer::m_names
private
Initial value:
{this, "Members",{},
"Algorithm names (of the form '<cppType>/<instanceName>')","std::vector<Algorithm>"}

Definition at line 178 of file AthSequencer.h.

178 {this, "Members",{},
179 "Algorithm names (of the form '<cppType>/<instanceName>')","std::vector<Algorithm>"};

◆ m_runPostInitialize

Gaudi::Property<bool> AthSequencer::m_runPostInitialize
private
Initial value:
{this, "ProcessDynamicDataDependencies", false,
"Run the post initialization step, to dynamically create and gather extra data dependencies. "
"Should be enabled for the top most sequence."}

Definition at line 199 of file AthSequencer.h.

199 {this, "ProcessDynamicDataDependencies", false,
200 "Run the post initialization step, to dynamically create and gather extra data dependencies. "
201 "Should be enabled for the top most sequence."};

◆ m_sequential

Gaudi::Property<bool> AthSequencer::m_sequential
private
Initial value:
{this, "Sequential", false,
"Concurrent or (strict) Sequential ordering of algorithms"}

Definition at line 193 of file AthSequencer.h.

193 {this, "Sequential", false,
194 "Concurrent or (strict) Sequential ordering of algorithms"};

◆ m_stopOverride

Gaudi::Property<bool> AthSequencer::m_stopOverride
private
Initial value:
{this, "StopOverride", false,
"Continue even if algorithm filter fails"}

Definition at line 190 of file AthSequencer.h.

190 {this, "StopOverride", false,
191 "Continue even if algorithm filter fails"};

◆ m_undeclaredOutputData

Gaudi::Property<std::vector<std::string> > AthSequencer::m_undeclaredOutputData
private
Initial value:
{this, "ExtraDataForDynamicConsumers", {},
"Pass these extra output data IDs, which are not declared by any of the algorithms or tools, to dynamic data consumers."}

Definition at line 196 of file AthSequencer.h.

196 {this, "ExtraDataForDynamicConsumers", {},
197 "Pass these extra output data IDs, which are not declared by any of the algorithms or tools, to dynamic data consumers."};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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