12 #include <initializer_list> 45 if ( !status.isSuccess() )
return status;
47 m_timerTool = tool<ISequencerTimerTool>(
"SequencerTimerTool" );
64 if ( !status.isSuccess() ) {
return Error(
"Can not initialize " + entry.algorithm()->name(), status ); }
100 verbose() <<
"Algorithm " << myAlg->
name() <<
" returned filter passed " << ( passed ?
"true" :
"false" )
102 if ( entry.reverse() ) passed = !passed;
119 if (
m_modeOR ? passed : !passed ) {
129 state.setState( AlgExecState::State::Done );
144 auto jos = service<IJobOptionsSvc>(
"JobOptionsSvc" );
147 auto appMgr = service<IAlgManager>(
"ApplicationMgr" );
148 for (
const auto& item :
m_names.value() ) {
158 result = createSubAlgorithm( theType, theName, myAlg );
173 subAlgorithms()->push_back( myAlg );
201 if ( msgLevel(
MSG::DEBUG ) ) debug() <<
"Added algorithm " << theName <<
endmsg;
203 warning() << theName <<
" is not a Gaudi::Algorithm - failed dynamic_cast" <<
endmsg;
207 warning() <<
"Unable to find or create " << theName <<
endmsg;
215 msg <<
"Member list: ";
221 if (
alg->name() != typ ) os <<
"/" <<
alg->name();
262 if (
m_entries.size() > 1 ) os <<
"seq(";
264 const auto op =
m_modeOR ?
" | " :
" & ";
267 for (
auto iterator = first; iterator != last; ++iterator ) {
268 if ( iterator != first ) os << op;
269 if ( iterator->reverse() ) os <<
"~";
270 iterator->algorithm()->toControlFlowExpression( os );
282 if ( registerContext() ) { algCtx = contextSvc(); }
288 [&](
const std::string& loc ) {
return this->exist<DataObject>( evtSvc(), loc ); } );
290 if ( msgLevel(
MSG::DEBUG ) ) debug() << *it <<
" found, skipping event " <<
endmsg;
298 [&](
const std::string& loc ) {
return this->exist<DataObject>( evtSvc(), loc ); } );
Gaudi::Property< bool > m_measureTime
Definition of the MsgStream class used to transmit messages.
Helper "sentry" class to automatize the safe register/unregister the algorithm's context.
virtual StatusCode sysStart()=0
Startup method invoked by the framework.
StatusCode setProperty(const Gaudi::Details::PropertyBase &p) override
set the property form another property
StatusCode initialize() override
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
StatusCode Error(std::string_view msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
Print the error message and return with the given StatusCode.
constexpr static const auto SUCCESS
bool filterPassed() const
TYPE * get() const
Get interface pointer.
bool hasProperty(const std::string &name) const override
Return true if we have a property with the given name.
This class represents an entry point to all the event specific data.
virtual StatusCode sysInitialize()=0
Initialization method invoked by the framework.
ISequencerTimerTool * m_timerTool
Pointer to the timer tool.
StatusCode sysExecute(const EventContext &ctx) override
Gaudi::Property< bool > m_ignoreFilter
Helper class to parse a string of format "type/name".
Gaudi::Property< std::vector< std::string > > m_names
Gaudi::Property< bool > m_invert
This class is used for returning status codes from appropriate routines.
Gaudi::Algorithm * algorithm() const
const std::string & context() const
Returns the "context" string. Used to identify different processing states.
Gaudi::Property< bool > m_modeOR
StatusCode decodeNames()
Decode a vector of string.
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
Gaudi::Property< bool > m_shortCircuit
const std::string & rootInTES() const
Returns the "rootInTES" string.
StatusCode release(const IInterface *interface) const
Manual forced (and 'safe') release of the active tool or service.
void membershipHandler()
for asynchronous changes in the list of algorithms
const StatusCode & ignore() const
Ignore/check StatusCode.
StatusCode execute(const EventContext &ctx) const override
AlgExecState & execState(const EventContext &ctx) const override
reference to AlgExecState of Alg
Base class from which all concrete algorithm classes should be derived.
constexpr static const auto FAILURE
An abstract interface for Algorithm Context Service.
Gaudi::Property< bool > m_returnOK
AttribStringParser::Iterator begin(const AttribStringParser &parser)
bool isEnabled() const override
Is this algorithm enabled or disabled?
Gaudi::Property< std::vector< std::string > > m_requireObjs
std::string typeName(const std::type_info &typ)
Gaudi::Property< std::vector< std::string > > m_vetoObjs
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
int m_timer
Timer number for the sequencer.
std::vector< AlgorithmEntry > m_entries
List of algorithms to process.
const std::string & name() const override
The identifying name of the algorithm object.
StatusCode sysExecute(const EventContext &ctx) override
The actions to be performed by the algorithm on an event.
std::ostream & toControlFlowExpression(std::ostream &os) const override
Produce string represention of the control flow expression.