1 #ifndef GAUDIKERNEL_AUDITOR_H
2 #define GAUDIKERNEL_AUDITOR_H
5 #include "GaudiKernel/IProperty.h"
6 #include "GaudiKernel/IAuditor.h"
7 #include "GaudiKernel/IService.h"
8 #include "GaudiKernel/ISvcLocator.h"
9 #include "GaudiKernel/PropertyMgr.h"
10 #include <Gaudi/PluginService.h>
61 virtual void before(StandardEventType,
const std::string&);
64 virtual void before(CustomEventTypeRef,
const std::string&);
67 virtual void after(StandardEventType,
const std::string&,
const StatusCode&);
70 virtual void after(CustomEventTypeRef,
const std::string&,
const StatusCode&);
95 virtual const std::string& name()
const ;
97 virtual bool isEnabled()
const ;
105 int outputLevel()
const {
return m_outputLevel; }
108 void setOutputLevel(
int level );
119 StatusCode service(
const std::string& name, T*& svc,
bool createIf =
false )
const {
120 SmartIF<T> ptr(serviceLocator()->service(name, createIf));
150 const std::vector<Property*>& getProperties( )
const;
153 virtual bool hasProperty(
const std::string& name)
const;
195 template <
class TYPE>
197 (
const std::string& name ,
237 Property* declareProperty(
const std::string& name, T& property,
238 const std::string& doc =
"none")
const {
239 return m_PropertyMgr->declareProperty(name, property, doc);
251 bool m_isInitialized;
261 #ifndef GAUDI_NEW_PLUGIN_SERVICE
266 template <
typename S,
typename... Args>
267 static typename S::ReturnType
create(Args...
args) {
268 return new T(
args...);
274 #define DECLARE_AUDITOR_FACTORY(x) \
275 DECLARE_FACTORY_WITH_CREATOR(x, AudFactory< x >, Auditor::Factory)
276 #define DECLARE_NAMESPACE_AUDITOR_FACTORY(n, x) \
277 DECLARE_AUDITOR_FACTORY(n::x)
282 #define DECLARE_AUDITOR_FACTORY(x) DECLARE_COMPONENT(x)
283 #define DECLARE_NAMESPACE_AUDITOR_FACTORY(n, x) DECLARE_COMPONENT(n::x)
287 #endif //GAUDIKERNEL_AUDITOR_H
StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Base class used to implement the interfaces.
GAUDI_API bool hasProperty(const IProperty *p, const std::string &name)
simple function which check the existence of the property with the given name.
const char *PyHelper() getProperty(IInterface *p, char *name)
Property manager helper class.
General service interface definition.
This class is used for returning status codes from appropriate routines.
The IMessage is the interface implemented by the message service.
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Base class from which all concrete algorithm classes should be derived.
IInterface compliant class extending IInterface with the name() method.
Property base class allowing Property* collections to be "homogeneous".
Class wrapping the signature for a factory with any number of arguments.
static S::ReturnType create(Args...args)
The IAuditor is the interface implmented by the AlgAuditor base class.
Base class from which all concrete auditor classes should be derived.