1 #define GAUDIALG_GAUDIALGORITHM_CPP 1
7 #include "GaudiKernel/IAlgContextSvc.h"
8 #include "GaudiKernel/DataObject.h"
12 #include "GaudiAlg/GaudiAlgorithm.h"
38 setProperty (
"RegisterForContextService" ,
true ).ignore() ;
41 "Skip execute if one or more of these TES objects exists" );
43 "Execute only if one or more of these TES objects exists" );
65 debug() <<
"Finalize base class GaudiAlgorithm" <<
endmsg;
78 return Error (
"Default GaudiAlgorithm execute method called !!" ) ;
86 {
m_evtColSvc = svc< INTupleSvc > (
"EvtTupleSvc" , true ) ; }
101 if ( registerContext() ) { ctx = contextSvc() ; }
107 [&](
const std::string& loc) {
return this->exist<DataObject>(loc); } );
109 debug() << *it <<
" found, skipping event " <<
endmsg;
117 [&](
const std::string& loc) {
return this->exist<DataObject>(loc); } );
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Helper "sentry" class to automatize the safe register/unregister the algorithm's context.
StatusCode initialize() override
standard initialization method
auto begin(reverse_wrapper< T > &w)
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.
StatusCode finalize() override
standard finalization method
StatusCode execute() override
standard execution method
bool isFailure() const
Test for a status code of FAILURE.
SmartIF< INTupleSvc > & evtColSvc() const
Access the standard event collection service.
std::vector< std::string > m_requireObjs
process the event only if one or more of these objects are present in TES
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
StatusCode sysExecute() override
the generic actions for the execution.
auto end(reverse_wrapper< T > &w)
This class is used for returning status codes from appropriate routines.
StatusCode sysExecute() override
The actions to be performed by the algorithm on an event.
StatusCode finalize() override
standard finalization method
SmartIF< INTupleSvc > m_evtColSvc
Event Tag Collection Service.
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
StatusCode initialize() override
standard initialization method
Base class from which all concrete algorithm classes should be derived.
std::vector< std::string > m_vetoObjs
skip the event if any of these objects are present in TES
An abstract interface for Algorithm Context Service.
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
MSG::Level msgLevel() const
get the output level from the embedded MsgStream