| The Gaudi Framework v32r1 (f65d50dc)

LegacyAlgorithm.cpp
Go to the documentation of this file.
1 #include <GaudiKernel/Algorithm.h>
2
3 #include "GaudiKernel/ThreadLocalContext.h"
4
5 namespace Gaudi {
6 namespace details {
7 bool LegacyAlgorithmAdapter::isExecuted() const {
8 return execState( Gaudi::Hive::currentContext() ).state() == AlgExecState::State::Done;
9 }
10
11 void LegacyAlgorithmAdapter::setExecuted( bool state ) const {
12 execState( Gaudi::Hive::currentContext() )
13 .setState( state ? AlgExecState::State::Done : AlgExecState::State::None );
14 }
15
16 void LegacyAlgorithmAdapter::resetExecuted() { execState( Gaudi::Hive::currentContext() ).reset(); }
17
18 bool LegacyAlgorithmAdapter::filterPassed() const {
19 return execState( Gaudi::Hive::currentContext() ).filterPassed();
20 }
21
22 void LegacyAlgorithmAdapter::setFilterPassed( bool state ) const {
23 execState( Gaudi::Hive::currentContext() ).setFilterPassed( state );
24 }
25 } // namespace details
26 } // namespace Gaudi
Algorithm.h
Gaudi::details::LegacyAlgorithmAdapter::resetExecuted
void resetExecuted()
Reset the executed state of the Algorithm for the duration of the current event.
Definition: LegacyAlgorithm.cpp:16
Gaudi::details::LegacyAlgorithmAdapter::setFilterPassed
void setFilterPassed(bool state) const
Set the filter passed flag to the specified state.
Definition: LegacyAlgorithm.cpp:22
ThreadLocalContext.h
AlgExecState::filterPassed
bool filterPassed() const
Definition: IAlgExecStateSvc.h:31
AlgExecState::setState
void setState(State s)
Definition: IAlgExecStateSvc.h:36
details
Definition: AnyDataWrapper.h:10
AlgExecState::state
State state() const
Definition: IAlgExecStateSvc.h:32
compareRootHistos.state
def state
Definition: compareRootHistos.py:455
Gaudi::Hive::currentContext
GAUDI_API const EventContext & currentContext()
Definition: ThreadLocalContext.cpp:20
Gaudi::Algorithm::execState
AlgExecState & execState(const EventContext &ctx) const override
reference to AlgExecState of Alg
Definition: Algorithm.cpp:657
Gaudi::details::LegacyAlgorithmAdapter::setExecuted
void setExecuted(bool state) const
Set the executed flag to the specified state.
Definition: LegacyAlgorithm.cpp:11
Gaudi::details::LegacyAlgorithmAdapter::isExecuted
bool isExecuted() const
Has this algorithm been executed since the last reset?
Definition: LegacyAlgorithm.cpp:7
AlgExecState::setFilterPassed
void setFilterPassed(bool f=true)
Definition: IAlgExecStateSvc.h:35
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
Gaudi::details::LegacyAlgorithmAdapter::filterPassed
bool filterPassed() const
Did this algorithm pass or fail its filter criterion for the last event?
Definition: LegacyAlgorithm.cpp:18
AlgExecState::reset
void reset()
Definition: IAlgExecStateSvc.h:42