53 if ( !dpsvc ) {
return nullptr; }
64 const std::string s_NAME =
"EnableFaultHandler";
70 Disabler(
IInterface* svc,
bool disable ) : m_svc( svc ), m_old( s_NAME, true ), m_enable( !disable ) {
73 }
else if ( m_enable ) {
78 if ( !property || !m_old.assign( *property ) ) {
80 }
else if ( m_old.value() != m_enable ) {
90 else if ( code().isSuccess() && m_old.value() != m_enable ) {
101 SmartIF<IProperty> m_svc;
102 Gaudi::Property<bool> m_old = { s_NAME,
true };
120 const bool disable ) {
121 if ( !dpsvc ) {
return nullptr; }
123 Disabler sentry( dpsvc, disable );
129 return sc.
isSuccess() ? result :
nullptr;
Data provider interface definition.
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.
Definition of the basic interface.
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE
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
GAUDI_API Gaudi::Details::PropertyBase * getProperty(const IProperty *p, std::string_view name)
simple function which gets the property with given name from the component
static GAUDI_API DataObject * getobject(IDataProviderSvc *dpsvc, const std::string &path, const bool retrieve=true, const bool disableDoD=false)
the generic function to get object from TES
static GAUDI_API DataObject * findobject(IDataProviderSvc *dpsvc, const std::string &path)
simple wrapper for IDataProviderSvc::findObject The methdod does NOT trigger the loading the object f...