| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Member Functions | Private Attributes | List of all members
DetDataSvc Class Reference

More...

`#include <DetectorDataSvc/DetDataSvc.h>`

Inheritance diagram for DetDataSvc:
[legend]
Collaboration diagram for DetDataSvc:
[legend]

## Public Member Functions
StatusCode | initialize () override
| Initialize the service. More...
StatusCode | reinitialize () override
| Initialize the service. More...
StatusCode | finalize () override
| Finalize the service. More...
StatusCode | clearStore () override
| Remove all data objects in the data store. More...
StatusCode | updateObject (DataObject *toUpdate) override
| Update object. More...
| DetDataSvc (const std::string &name, ISvcLocator *svc)
| Standard Constructor. More...
| ~DetDataSvc () override=default
| Standard Destructor. More...
bool | validEventTime () const override
| Check if the event time has been set. More...
const Gaudi::Time & | eventTime () const override
| Get the event time. More...
void | setEventTime (const Gaudi::Time &time) override
| Set the new event time. More...
void | handle (const Incident &) override
| Inform that a new incident has occured. More...
Public Member Functions inherited from extends< TsDataSvc, IDetDataSvc, IIncidentListener >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| ~extends () override=default
| Virtual destructor. More...
Public Member Functions inherited from TsDataSvc
CLID | rootCLID () const override
| IDataManagerSvc: Accessor for root event CLID. More...
const std::string & | rootName () const override
| IDataManagerSvc: Accessor for root event name. More...
StatusCode | registerAddress (boost::string_ref fullPath, IOpaqueAddress *pAddress) override
| IDataManagerSvc: Register object address with the data store. More...
StatusCode | registerAddress (DataObject *parentObj, boost::string_ref objectPath, IOpaqueAddress *pAddress) override
| IDataManagerSvc: Register object address with the data store. More...
StatusCode | registerAddress (IRegistry *parentObj, boost::string_ref objectPath, IOpaqueAddress *pAddress) override
| IDataManagerSvc: Register object address with the data store. More...
StatusCode | unregisterAddress (boost::string_ref fullPath) override
| IDataManagerSvc: Unregister object address from the data store. More...
StatusCode | unregisterAddress (DataObject *pParent, boost::string_ref objPath) override
| IDataManagerSvc: Unregister object address from the data store. More...
StatusCode | unregisterAddress (IRegistry *pParent, boost::string_ref objPath) override
| IDataManagerSvc: Unregister object address from the data store. More...
StatusCode | objectLeaves (const DataObject *pObject, std::vector< IRegistry * > &refLeaves) override
| IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object. More...
StatusCode | objectLeaves (const IRegistry *pRegistry, std::vector< IRegistry * > &refLeaves) override
| IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object. More...
StatusCode | objectParent (const DataObject *pObject, IRegistry *&refpParent) override
| IDataManagerSvc: Explore the object store: retrieve the object's parent. More...
StatusCode | objectParent (const IRegistry *pRegistry, IRegistry *&refpParent) override
| IDataManagerSvc: Explore the object store: retrieve the object's parent. More...
StatusCode | clearSubTree (boost::string_ref sub_tree_path) override
| IDataManagerSvc: Remove all data objects below the sub tree identified by its full path name. More...
StatusCode | clearSubTree (DataObject *pObject) override
| IDataManagerSvc: Remove all data objects below the sub tree identified by the object. More...
StatusCode | clearStore () override
| IDataManagerSvc: Remove all data objects in the data store. More...
StatusCode | traverseSubTree (boost::string_ref sub_tree_path, IDataStoreAgent *pAgent) override
| IDataManagerSvc: Analyze by traversing all data objects below the sub tree identified by its full path name. More...
StatusCode | traverseSubTree (DataObject *pObject, IDataStoreAgent *pAgent) override
| IDataManagerSvc: Analyze by traversing all data objects below the sub tree. More...
StatusCode | traverseTree (IDataStoreAgent *pAgent) override
| IDataManagerSvc: Analyze by traversing all data objects in the data store. More...
StatusCode | setRoot (std::string root_name, DataObject *pRootObj) override
| Initialize data store for new event by giving new event path and root object. More...
virtual StatusCode | i_setRoot (std::string root_name, DataObject *pRootObj)
| Initialize data store for new event by giving new event path and root object. More...
StatusCode | setRoot (std::string root_path, IOpaqueAddress *pRootAddr) override
| Initialize data store for new event by giving new event path and address of root object. More...
virtual StatusCode | i_setRoot (std::string root_path, IOpaqueAddress *pRootAddr)
| Initialize data store for new event by giving new event path and address of root object. More...
StatusCode | setDataLoader (IConversionSvc *svc, IDataProviderSvc *dpsvc=nullptr) override
| IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service and optionally a data provider. More...
StatusCode | addPreLoadItem (const DataStoreItem &item) override
| Add an item to the preload list. More...
StatusCode | addPreLoadItem (std::string itemPath) override
| Add an item to the preload list. More...
StatusCode | removePreLoadItem (const DataStoreItem &item) override
| Remove an item from the preload list. More...
StatusCode | removePreLoadItem (std::string itemPath) override
| Add an item to the preload list. More...
StatusCode | resetPreLoad () override
| Clear the preload list. More...
virtual StatusCode | preLoad (int depth, int load_depth, DataObject *pObject)
| Execute one level of preloading and recursively load until the final level is reached. More...
StatusCode | preLoad () override
| load all preload items of the list More...
StatusCode | registerObject (boost::string_ref fullPath, DataObject *pObject) override
| Register object with the data store. More...
StatusCode | registerObject (boost::string_ref parentPath, boost::string_ref objPath, DataObject *pObject) override
| Register object with the data store. More...
StatusCode | registerObject (boost::string_ref parentPath, int item, DataObject *pObject) override
| Register object with the data store. More...
StatusCode | registerObject (DataObject *parentObj, boost::string_ref objPath, DataObject *pObject) override
| Register object with the data store. More...
StatusCode | registerObject (DataObject *parentObj, int item, DataObject *pObject) override
| Register object with the data store. More...
StatusCode | unregisterObject (boost::string_ref fullPath) override
| Unregister object from the data store. More...
StatusCode | unregisterObject (boost::string_ref parentPath, boost::string_ref objectPath) override
| Unregister object from the data store. More...
StatusCode | unregisterObject (boost::string_ref parentPath, int item) override
| Unregister object from the data store. More...
StatusCode | unregisterObject (DataObject *pObject) override
| Unregister object from the data store. More...
StatusCode | unregisterObject (DataObject *pObject, boost::string_ref objectPath) override
| Unregister object from the data store. More...
StatusCode | unregisterObject (DataObject *pObject, int item) override
| Unregister object from the data store. More...
StatusCode | retrieveObject (IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject) override
| Retrieve object from data store. More...
StatusCode | retrieveObject (boost::string_ref fullPath, DataObject *&pObject) override
| Retrieve object identified by its full path from the data store. More...
StatusCode | retrieveObject (boost::string_ref parentPath, boost::string_ref objPath, DataObject *&pObject) override
| Retrieve object from data store. More...
StatusCode | retrieveObject (boost::string_ref parentPath, int item, DataObject *&pObject) override
| Retrieve object from data store. More...
StatusCode | retrieveObject (DataObject *parentObj, boost::string_ref objPath, DataObject *&pObject) override
| Retrieve object from data store. More...
StatusCode | retrieveObject (DataObject *parentObj, int item, DataObject *&pObject) override
| Retrieve object from data store. More...
StatusCode | findObject (boost::string_ref fullPath, DataObject *&pObject) override
| Find object identified by its full path in the data store. More...
StatusCode | findObject (IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject) override
| Find object identified by its full path in the data store. More...
StatusCode | findObject (boost::string_ref parentPath, boost::string_ref objPath, DataObject *&pObject) override
| Find object in the data store. More...
StatusCode | findObject (boost::string_ref parentPath, int item, DataObject *&pObject) override
| Find object in the data store. More...
StatusCode | findObject (DataObject *parentObj, boost::string_ref objPath, DataObject *&pObject) override
| Find object in the data store. More...
StatusCode | findObject (DataObject *parentObj, int item, DataObject *&pObject) override
| Find object in the data store. More...
StatusCode | linkObject (IRegistry *from, boost::string_ref objPath, DataObject *to) override
| Add a link to another object. More...
StatusCode | linkObject (boost::string_ref fromPath, boost::string_ref objPath, DataObject *to) override
| Add a link to another object. More...
StatusCode | linkObject (DataObject *from, boost::string_ref objPath, DataObject *to) override
| Add a link to another object. More...
StatusCode | linkObject (boost::string_ref fullPath, DataObject *to) override
| Add a link to another object. More...
StatusCode | unlinkObject (IRegistry *from, boost::string_ref objPath) override
| Remove a link to another object. More...
StatusCode | unlinkObject (boost::string_ref fromPath, boost::string_ref objPath) override
| Remove a link to another object. More...
StatusCode | unlinkObject (DataObject *fromObj, boost::string_ref objPath) override
| Remove a link to another object. More...
StatusCode | unlinkObject (boost::string_ref fullPath) override
| Remove a link to another object. More...
StatusCode | updateObject (IRegistry *pDirectory) override
| Update object identified by its directory entry. More...
StatusCode | updateObject (boost::string_ref updatePath) override
| Update object. More...
StatusCode | updateObject (DataObject *toUpdate) override
| Update object. More...
StatusCode | updateObject (boost::string_ref parentPath, boost::string_ref updatePath) override
| Update object. More...
StatusCode | updateObject (DataObject *pParent, boost::string_ref updatePath) override
| Update object. More...
StatusCode | initialize () override
| Service initialization. More...
StatusCode | reinitialize () override
| Service initialization. More...
StatusCode | finalize () override
| Service initialization. More...
| ~TsDataSvc () override
| Standard Destructor. More...
Public Member Functions inherited from extends< Service, IDataProviderSvc, IDataManagerSvc >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| ~extends () override=default
| Virtual destructor. More...
Public Member Functions inherited from Service
const std::string & | name () const override
| Retrieve name of the service. More...
StatusCode | configure () override
StatusCode | initialize () override
StatusCode | start () override
StatusCode | stop () override
StatusCode | finalize () override
StatusCode | terminate () override
Gaudi::StateMachine::State | FSMState () const override
Gaudi::StateMachine::State | targetFSMState () const override
StatusCode | reinitialize () override
StatusCode | restart () override
StatusCode | sysInitialize () override
| Initialize Service. More...
StatusCode | sysStart () override
| Initialize Service. More...
StatusCode | sysStop () override
| Initialize Service. More...
StatusCode | sysFinalize () override
| Finalize Service. More...
StatusCode | sysReinitialize () override
| Re-initialize the Service. More...
StatusCode | sysRestart () override
| Re-initialize the Service. More...
| Service (std::string name, ISvcLocator *svcloc)
| Standard Constructor. More...
SmartIF< ISvcLocator > & | serviceLocator () const override
| Retrieve pointer to service locator. More...
StatusCode | setProperties ()
| Method for setting declared properties to the values specified for the job. More...
template<class T >
StatusCode | service (const std::string &name, const T *&psvc, bool createIf=true) const
| Access a service by name, creating it if it doesn't already exist. More...
template<class T >
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const
template<typename IFace = IService>
SmartIF< IFace > | service (const std::string &name, bool createIf=true) const
template<class T >
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const
| Access a service by name and type, creating it if it doesn't already exist. More...
template<class T >
StatusCode | declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
| Declare used tool. More...
SmartIF< IAuditorSvc > & | auditorSvc () const
| The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| PropertyHolder ()=default
| ~PropertyHolder () override=default
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Details::PropertyBase &prop)
| Declare a property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
| Helper to wrap a regular data member and use it as a regular property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none") const
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
| Declare a PropertyBase instance setting name and documentation. More...
Gaudi::Details::PropertyBase * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
| Declare a remote property. More...
StatusCode | setProperty (const Gaudi::Details::PropertyBase &p) override
| set the property form another property More...
StatusCode | setProperty (const std::string &s) override
| set the property from the formatted string More...
StatusCode | setProperty (const std::string &n, const std::string &v) override
| set the property from name and the value More...
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
StatusCode | getProperty (Gaudi::Details::PropertyBase *p) const override
| get the property More...
const Gaudi::Details::PropertyBase & | getProperty (const std::string &name) const override
| get the property by name More...
StatusCode | getProperty (const std::string &n, std::string &v) const override
| convert the property to the string More...
const std::vector< Gaudi::Details::PropertyBase * > & | getProperties () const override
| get all properties More...
bool | hasProperty (const std::string &name) const override
| Return true if we have a property with the given name. More...
| PropertyHolder (const PropertyHolder &)=delete
PropertyHolder & | operator= (const PropertyHolder &)=delete
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleBase &ref, const std::string &doc="none")
| Specializations for various GaudiHandles. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleArrayBase &ref, const std::string &doc="none")
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, DataObjectHandleBase &ref, const std::string &doc="none")
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
const SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...
MSG::Level | msgLevel () const
| get the cached level (originally extracted from the embedded MsgStream) More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces... >
| ~extend_interfaces () override=default
| Virtual destructor. More...

## Private Member Functions
StatusCode | setupDetectorDescription ()
| Deal with Detector Description initialization. More...
StatusCode | loadObject (IConversionSvc *pLoader, IRegistry *pNode) override final
| Invoke Persistency service to create transient object from its persistent representation. More...

## Private Attributes
Gaudi::Property< int > | m_detStorageType
Gaudi::Property< std::string > | m_detDbLocation
Gaudi::Property< std::string > | m_detDbRootName {this, "DetDbRootName", "dd", "name of the root node of the detector"}
Gaudi::Property< bool > | m_usePersistency {this, "UsePersistency", false, "control if the persistency is required"}
Gaudi::Property< std::string > | m_persistencySvcName
Gaudi::Property< bool > | m_allowLoadInRunning
Gaudi::Time | m_eventTime = 0
| Current event time. More...
SmartIF< IAddressCreator > | m_addrCreator = nullptr
| Address Creator to be used. More...

## Additional Inherited Members
Public Types inherited from extends< TsDataSvc, IDetDataSvc, IIncidentListener >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
Public Types inherited from TsDataSvc
typedef std::vector< DataStoreItem > | LoadItems
| Define set of load items. More...
Public Types inherited from extends< Service, IDataProviderSvc, IDataManagerSvc >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
Public Types inherited from Service
typedef Gaudi::PluginService::Factory< IService *, const std::string &, ISvcLocator * > | Factory
Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using | PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| Typedef used to refer to this class from derived classes, as in. More...
Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using | base_class = CommonMessaging
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...
Protected Member Functions inherited from TsDataSvc
bool | checkRoot ()
| Check if root path is valid. More...
virtual IConversionSvc * | getDataLoader (IRegistry *pReg)
| Retrieve customizable data loader according to registry entry to be retrieved. More...
virtual DataObject * | createDefaultObject () const
| Create default objects in case forced creation of leaves is requested. More...
virtual StatusCode | loadObject (IRegistry *pNode)
| Invoke Persistency service to create transient object from its persistent representation. More...
StatusCode | retrieveEntry (DataSvcHelpers::RegistryEntry *pNode, boost::string_ref path, DataSvcHelpers::RegistryEntry *&pEntry)
| Retrieve registry entry from store. More...
DataObject * | handleDataFault (IRegistry *pReg, boost::string_ref path={})
| Invoke data fault handling if enabled. More...
Protected Member Functions inherited from Service
| ~Service () override
| Standard Destructor. More...
int | outputLevel () const
| get the `Service's` output level More...
Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBase * | property (const std::string &name) const
Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level | setUpMessaging ()
| Set up local caches. More...
MSG::Level | resetMessaging ()
| Reinitialize internal states. More...
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...
Protected Attributes inherited from TsDataSvc
IConversionSvc * | m_dataLoader = nullptr
| Pointer to data loader service. More...
IIncidentSvc * | m_incidentSvc = nullptr
| Pointer to incident service. More...
Gaudi::Property< CLID > | m_rootCLID {this, "RootCLID", 110 , "CLID of root entry"}
Gaudi::Property< std::string > | m_rootName {this, "RootName", "/Event", "name of root entry"}
Gaudi::Property< bool > | m_forceLeaves {this, "ForceLeaves", false, "force creation of default leaves on registerObject"}
Gaudi::Property< std::vector< std::string > > | m_inhibitPathes {this, "InhibitPathes", {}, "inhibited leaves"}
Gaudi::Property< bool > | m_enableFaultHdlr
Gaudi::Property< std::string > | m_faultName {this, "DataFaultName", "DataFault", "Name of the data fault incident"}
Gaudi::Property< bool > | m_enableAccessHdlr
Gaudi::Property< std::string > | m_accessName {this, "DataAccessName", "DataAccess", "Name of the data access incident"}
LoadItems | m_preLoads
| Items to be pre-loaded. More...
DataSvcHelpers::RegistryEntry * | m_root = nullptr
| Pointer to root entry. More...
DataSvcHelpers::InhibitMap * | m_inhibitMap = nullptr
| Map with object paths to be inhibited from loading. More...
tsDataSvcMutex | m_accessMutex
| Mutex to protect access to the store. More...
Protected Attributes inherited from Service
Gaudi::StateMachine::State | m_state = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::StateMachine::State | m_targetState = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::Property< int > | m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
Gaudi::Property< bool > | m_auditInit {this, "AuditServices", false, "[[deprecated]] unused"}
Gaudi::Property< bool > | m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
Gaudi::Property< bool > | m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
Gaudi::Property< bool > | m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
Gaudi::Property< bool > | m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
Gaudi::Property< bool > | m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
Gaudi::Property< bool > | m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
SmartIF< IAuditorSvc > | m_pAuditorSvc
| Auditor Service. More...

## Detailed Description

A DataSvc specialized in detector data. Now inherits from TsDataSvc, a thread safe version of the DataSvc, which allows concurrent retrieval of DataObjects.

Author
  Marco Clemencic (previous author unknown)
  Danilo Piparo

Definition at line 29 of file DetDataSvc.h.

## Constructor & Destructor Documentation

DetDataSvc::DetDataSvc | ( | const std::string & | name,
|  | ISvcLocator * | svc
| ) |  |

Standard Constructor.

Definition at line 174 of file DetDataSvc.cpp.

174 : base_class( name, svc )
175 {
176 m_detDbRootName.declareUpdateHandler(
177 [this]( Gaudi::Details::PropertyBase& ) { m_rootName = "/" + m_detDbRootName; } );
178 m_rootName = "/" + m_detDbRootName;
179 m_rootCLID = CLID_Catalog;
180 }
TsDataSvc::m_rootCLID
Gaudi::Property< CLID > m_rootCLID
Definition: TsDataSvc.h:70
DetDataSvc::m_detDbRootName
Gaudi::Property< std::string > m_detDbRootName
Definition: DetDataSvc.h:98
extends< TsDataSvc, IDetDataSvc, IIncidentListener >::base_class
extends base_class
Typedef to this class.
Definition: extends.h:15
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
TsDataSvc::m_rootName
Gaudi::Property< std::string > m_rootName
Definition: TsDataSvc.h:71

DetDataSvc::~DetDataSvc | ( |  | ) |
| override default

Standard Destructor.

## Member Function Documentation

StatusCode DetDataSvc::clearStore | ( |  | ) |
| override

Remove all data objects in the data store.

Definition at line 148 of file DetDataSvc.cpp.

149 {
150
151 TsDataSvc::clearStore().ignore();
152
153 if ( m_usePersistency ) {
154 // Create root address
155 unsigned long iargs[] = {0, 0};
156 const std::string args[] = {m_detDbLocation, m_detDbRootName};
157 IOpaqueAddress* rootAddr;
158 StatusCode sc = m_addrCreator->createAddress( m_detStorageType, CLID_Catalog, args, iargs, rootAddr );
159 // Set detector data store root
160 if ( sc.isSuccess() ) {
161 sc = i_setRoot( m_rootName, rootAddr );
162 if ( sc.isFailure() ) {
163 error() << "Unable to set detector data store root" << endmsg;
164 }
165 } else {
166 error() << "Unable to create address for /dd" << endmsg;
167 }
168 return sc;
169 }
170 return StatusCode::SUCCESS;
171 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
gaudirun.args
args
Definition: gaudirun.py:244
IAddressCreator::createAddress
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ipar, IOpaqueAddress *&refpAddress)=0
Create a Generic address using explicit arguments to identify a single object.
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:50
DetDataSvc::m_detDbRootName
Gaudi::Property< std::string > m_detDbRootName
Definition: DetDataSvc.h:98
DetDataSvc::m_detDbLocation
Gaudi::Property< std::string > m_detDbLocation
Definition: DetDataSvc.h:96
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:61
std::string
STL class.
DetDataSvc::m_usePersistency
Gaudi::Property< bool > m_usePersistency
Definition: DetDataSvc.h:99
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
DetDataSvc::m_addrCreator
SmartIF< IAddressCreator > m_addrCreator
Address Creator to be used.
Definition: DetDataSvc.h:111
TsDataSvc::i_setRoot
virtual StatusCode i_setRoot(std::string root_name, DataObject *pRootObj)
Initialize data store for new event by giving new event path and root object.
Definition: TsDataSvc.cpp:169
DetDataSvc::m_detStorageType
Gaudi::Property< int > m_detStorageType
Definition: DetDataSvc.h:94
TsDataSvc::clearStore
StatusCode clearStore() override
IDataManagerSvc: Remove all data objects in the data store.
Definition: TsDataSvc.cpp:117
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:84
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
TsDataSvc::m_rootName
Gaudi::Property< std::string > m_rootName
Definition: TsDataSvc.h:71

const Gaudi::Time & DetDataSvc::eventTime | ( |  | ) | const
| override

Get the event time.

Definition at line 193 of file DetDataSvc.cpp.

193 { return m_eventTime; }
DetDataSvc::m_eventTime
Gaudi::Time m_eventTime
Current event time.
Definition: DetDataSvc.h:108

StatusCode DetDataSvc::finalize | ( |  | ) |
| override

Finalize the service.

Definition at line 129 of file DetDataSvc.cpp.

130 {
131 DEBMSG << "Finalizing" << endmsg;
132
133 // clears the store
134 m_usePersistency = false; // avoid creation of an empty store when clearing
135 clearStore().ignore();
136
137 // Releases the address creator
138 m_addrCreator = nullptr;
139
140 // Releases the DataLoader
141 setDataLoader( nullptr ).ignore();
142
143 // Finalize the base class
144 return TsDataSvc::finalize();
145 }
TsDataSvc::setDataLoader
StatusCode setDataLoader(IConversionSvc *svc, IDataProviderSvc *dpsvc=nullptr) override
IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service and optionally a data pro...
Definition: TsDataSvc.cpp:207
DetDataSvc::m_usePersistency
Gaudi::Property< bool > m_usePersistency
Definition: DetDataSvc.h:99
DetDataSvc::clearStore
StatusCode clearStore() override
Remove all data objects in the data store.
Definition: DetDataSvc.cpp:148
DetDataSvc::m_addrCreator
SmartIF< IAddressCreator > m_addrCreator
Address Creator to be used.
Definition: DetDataSvc.h:111
DEBMSG
#define DEBMSG
Definition: DetDataSvc.cpp:19
TsDataSvc::finalize
StatusCode finalize() override
Service initialization.
Definition: TsDataSvc.cpp:1127
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:84
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

void DetDataSvc::handle | ( | const Incident & | inc | ) |
| override

Inform that a new incident has occured.

Inform that a new incident has occurred.

Definition at line 196 of file DetDataSvc.cpp.

197 {
198 ON_DEBUG
199 {
200 debug() << "New incident received" << endmsg;
201 debug() << "Incident source: " << inc.source() << endmsg;
202 debug() << "Incident type: " << inc.type() << endmsg;
203 }
204 }
Incident::type
const std::string & type() const
Access to the incident type.
Definition: Incident.h:41
Incident::source
const std::string & source() const
Access to the source of the incident.
Definition: Incident.h:47
ON_DEBUG
#define ON_DEBUG
Definition: DetDataSvc.cpp:16
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:115
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

StatusCode DetDataSvc::initialize | ( |  | ) |
| override

Initialize the service.

Definition at line 27 of file DetDataSvc.cpp.

28 {
29 // Call base class initialization
30 StatusCode sc = TsDataSvc::initialize();
31 if ( UNLIKELY( sc.isFailure() ) ) return sc;
32
33 // Set Data Loader
34 auto cnv_svc = serviceLocator()->service<IConversionSvc>( m_persistencySvcName );
35 if ( UNLIKELY( !cnv_svc ) ) {
36 error() << "Unable to retrieve " << m_persistencySvcName << endmsg;
37 return StatusCode::FAILURE;
38 }
39
40 sc = setDataLoader( cnv_svc );
41 if ( UNLIKELY( sc.isFailure() ) ) {
42 error() << "Unable to set DataLoader" << endmsg;
43 return sc;
44 }
45
46 // Get address creator from the DetectorPersistencySvc
47 m_addrCreator = cnv_svc;
48 if ( UNLIKELY( !m_addrCreator ) ) {
49 error() << "Unable to get AddressCreator." << endmsg;
50 return StatusCode::FAILURE;
51 }
52
53 return setupDetectorDescription();
54 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:128
IConversionSvc
Definition: IConversionSvc.h:37
TsDataSvc::initialize
StatusCode initialize() override
Service initialization.
Definition: TsDataSvc.cpp:1086
TsDataSvc::setDataLoader
StatusCode setDataLoader(IConversionSvc *svc, IDataProviderSvc *dpsvc=nullptr) override
IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service and optionally a data pro...
Definition: TsDataSvc.cpp:207
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:61
DetDataSvc::setupDetectorDescription
StatusCode setupDetectorDescription()
Deal with Detector Description initialization.
Definition: DetDataSvc.cpp:56
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:79
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
DetDataSvc::m_addrCreator
SmartIF< IAddressCreator > m_addrCreator
Address Creator to be used.
Definition: DetDataSvc.h:111
DetDataSvc::m_persistencySvcName
Gaudi::Property< std::string > m_persistencySvcName
Definition: DetDataSvc.h:100
StatusCode::FAILURE
Definition: StatusCode.h:29
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:292
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

StatusCode DetDataSvc::loadObject | ( | IConversionSvc * | pLoader,
|  | IRegistry * | pNode
| ) |  |
| inline final override private virtual

Invoke Persistency service to create transient object from its persistent representation.

Reimplemented from TsDataSvc.

Definition at line 64 of file DetDataSvc.h.

65 {
66 if ( LIKELY( m_allowLoadInRunning ||
67 serviceLocator().as<IStateful>()->FSMState() != Gaudi::StateMachine::RUNNING ) ) {
68 return TsDataSvc::loadObject( pLoader, pNode );
69 }
70 error() << "Trying to load " << pNode->identifier() << " while RUNNING" << endmsg;
71 return StatusCode::FAILURE;
72 }
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
IRegistry::identifier
virtual const id_type & identifier() const =0
Full identifier (or key)
LIKELY
#define LIKELY(x)
Definition: Kernel.h:127
Gaudi::StateMachine::RUNNING
Definition: StateMachine.h:18
Service::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: Service.h:54
StatusCode::FAILURE
Definition: StatusCode.h:29
DetDataSvc::m_allowLoadInRunning
Gaudi::Property< bool > m_allowLoadInRunning
Definition: DetDataSvc.h:103
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:292
TsDataSvc::loadObject
virtual StatusCode loadObject(IRegistry *pNode)
Invoke Persistency service to create transient object from its persistent representation.
Definition: TsDataSvc.cpp:572
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

StatusCode DetDataSvc::reinitialize | ( |  | ) |
| override

Initialize the service.

Definition at line 110 of file DetDataSvc.cpp.

111 {
112 // The DetectorDataSvc does not need to be re-initialized. If it is done
113 // all the Algorithms having references to DetectorElements will become
114 // invalid and crash the program. (Pere Mato)
115
116 // Call base class reinitialization
117 // StatusCode sc = DataSvc::reinitialize();
118 // if( sc.isFailure() ) return sc;
119
120 // Delete the associated event time
121 // if( 0 != m_eventTime ) delete m_eventTime;
122 // m_eventTimeDefined = false;
123
124 // return setupDetectorDescription();
125 return StatusCode::SUCCESS;
126 }
StatusCode::SUCCESS
Definition: StatusCode.h:29

void DetDataSvc::setEventTime | ( | const Gaudi::Time & | time | ) |
| override

Set the new event time.

Definition at line 183 of file DetDataSvc.cpp.

184 {
185 m_eventTime = time;
186 DEBMSG << "Event Time set to " << eventTime() << endmsg;
187 }
plotSpeedupsPyRoot.time
time
Definition: plotSpeedupsPyRoot.py:154
DetDataSvc::eventTime
const Gaudi::Time & eventTime() const override
Get the event time.
Definition: DetDataSvc.cpp:193
DEBMSG
#define DEBMSG
Definition: DetDataSvc.cpp:19
DetDataSvc::m_eventTime
Gaudi::Time m_eventTime
Current event time.
Definition: DetDataSvc.h:108
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

StatusCode DetDataSvc::setupDetectorDescription | ( |  | ) |
| private

Deal with Detector Description initialization.

Todo:
  : remove references to obsolete package XMLDDDBROOT

Definition at line 56 of file DetDataSvc.cpp.

57 {
58 // Initialize the detector data transient store
59 ON_DEBUG
60 {
61 debug() << "Storage type used is: " << m_detStorageType << endmsg;
62 debug() << "Setting DetectorDataSvc root node... " << endmsg;
63 }
64
65 if ( m_usePersistency ) {
66
67 IOpaqueAddress* rootAddr = nullptr;
68 if ( m_detDbLocation.empty() || "empty" == m_detDbLocation ) {
69
70 // if the name of DBlocation is not given - construct it!
71 // by retrieving the value of XMLDDBROOT
72
74 if ( isEnvSet( "XMLDDDBROOT" ) ) {
75 const std::string loc = getEnv( "XMLDDDBROOT" );
76 m_detDbLocation = loc + "/DDDB/lhcb.xml";
77 }
78 }
79 if ( m_detDbLocation.empty() || "empty" == m_detDbLocation ) {
80 error() << "Detector data location name not set. Detector data will "
81 "not be found."
82 << endmsg;
83 return StatusCode::FAILURE;
84 } else {
85 // Create address
86 unsigned long iargs[] = {0, 0};
87 const std::string args[] = {m_detDbLocation, m_detDbRootName};
88 StatusCode sc = m_addrCreator->createAddress( m_detStorageType, CLID_Catalog, args, iargs, rootAddr );
89 if ( sc.isSuccess() ) {
90 sc = i_setRoot( m_rootName, rootAddr );
91 if ( sc.isFailure() ) {
92 error() << "Unable to set detector data store root" << endmsg;
93 return sc;
94 }
95 } else {
96 error() << "Unable to create address for /dd" << endmsg;
97 return sc;
98 }
99 }
100 // Writing the description file in the output log file [bugs #2854]
101 always() << "Detector description database: " << m_detDbLocation.value() << endmsg;
102 } else {
103 info() << "Detector description not requested to be loaded" << endmsg;
104 }
105
106 return StatusCode::SUCCESS;
107 }
System::getEnv
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
Definition: System.cpp:415
StatusCode::SUCCESS
Definition: StatusCode.h:29
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:112
gaudirun.args
args
Definition: gaudirun.py:244
IAddressCreator::createAddress
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ipar, IOpaqueAddress *&refpAddress)=0
Create a Generic address using explicit arguments to identify a single object.
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:50
DetDataSvc::m_detDbRootName
Gaudi::Property< std::string > m_detDbRootName
Definition: DetDataSvc.h:98
DetDataSvc::m_detDbLocation
Gaudi::Property< std::string > m_detDbLocation
Definition: DetDataSvc.h:96
ON_DEBUG
#define ON_DEBUG
Definition: DetDataSvc.cpp:16
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:61
std::string
STL class.
DetDataSvc::m_usePersistency
Gaudi::Property< bool > m_usePersistency
Definition: DetDataSvc.h:99
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
DetDataSvc::m_addrCreator
SmartIF< IAddressCreator > m_addrCreator
Address Creator to be used.
Definition: DetDataSvc.h:111
System::isEnvSet
GAUDI_API bool isEnvSet(const char *var)
Check if an environment variable is set or not.
Definition: System.cpp:437
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:115
TsDataSvc::i_setRoot
virtual StatusCode i_setRoot(std::string root_name, DataObject *pRootObj)
Initialize data store for new event by giving new event path and root object.
Definition: TsDataSvc.cpp:169
DetDataSvc::m_detStorageType
Gaudi::Property< int > m_detStorageType
Definition: DetDataSvc.h:94
StatusCode::FAILURE
Definition: StatusCode.h:29
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
CommonMessagingBase::always
MsgStream & always() const
shortcut for the method msgStream(MSG::ALWAYS)
Definition: CommonMessaging.h:97
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
TsDataSvc::m_rootName
Gaudi::Property< std::string > m_rootName
Definition: TsDataSvc.h:71

StatusCode DetDataSvc::updateObject | ( | DataObject * | toUpdate | ) |
| override

Update object.

Todo:
  update also its ancestors in the data store if necessary

Definition at line 208 of file DetDataSvc.cpp.

209 {
210
211 DEBMSG << "Method updateObject starting" << endmsg;
212
213 // Check that object to update exists
214 if ( !toUpdate ) {
215 error() << "There is no DataObject to update" << endmsg;
216 return INVALID_OBJECT;
217 }
218
219 // Retrieve IValidity interface of object to update
220 IValidity* condition = dynamic_cast<IValidity*>( toUpdate );
221 if ( !condition ) {
222 warning() << "Cannot update DataObject: DataObject does not implement IValidity" << endmsg;
223 return StatusCode::SUCCESS;
224 }
225
226 // Check that the event time has been defined
227 if ( !validEventTime() ) {
228 warning() << "Cannot update DataObject: event time undefined" << endmsg;
229 return StatusCode::SUCCESS;
230 }
231
232 // No need to update if condition is valid
233 if ( condition->isValid( eventTime() ) ) {
234 DEBMSG << "DataObject is valid: no need to update" << endmsg;
235 return StatusCode::SUCCESS;
236 }
237
238 DEBMSG << "DataObject is invalid: update it" << endmsg;
239 // TODO: before loading updated object, update HERE its parent in data store
240
241 // Now delegate update to the conversion service by calling the base class
242 DEBMSG << "Delegate update to relevant conversion service" << endmsg;
243 StatusCode status = TsDataSvc::updateObject( toUpdate );
244 if ( !status.isSuccess() ) {
245 error() << "Could not update DataObject" << endmsg;
246 if ( status == NO_DATA_LOADER ) error() << "There is no data loader" << endmsg;
247 return status;
248 }
249
250 // Now cross-check that the new condition is valid
251 condition = dynamic_cast<IValidity*>( toUpdate );
252 if ( !condition ) {
253 error() << "Updated DataObject does not implement IValidity" << endmsg;
254 return StatusCode::FAILURE;
255 }
256 if ( FSMState() == Gaudi::StateMachine::RUNNING && !condition->isValid( eventTime() ) ) {
257 error() << "Updated DataObject is not valid" << endmsg;
258 error() << "Are you sure the conversion service has updated it?" << endmsg;
259 return StatusCode::FAILURE;
260 }
261
262 // DataObject was successfully updated
263 DEBMSG << "Method updateObject exiting successfully" << endmsg;
264 return StatusCode::SUCCESS;
265 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
DetDataSvc::validEventTime
bool validEventTime() const override
Check if the event time has been set.
Definition: DetDataSvc.cpp:190
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:50
TsDataSvc::updateObject
StatusCode updateObject(IRegistry *pDirectory) override
Update object identified by its directory entry.
Definition: TsDataSvc.cpp:843
DetDataSvc::eventTime
const Gaudi::Time & eventTime() const override
Get the event time.
Definition: DetDataSvc.cpp:193
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:109
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
DEBMSG
#define DEBMSG
Definition: DetDataSvc.cpp:19
Gaudi::StateMachine::RUNNING
Definition: StateMachine.h:18
IValidity::isValid
virtual bool isValid() const =0
Check if the object is valid (it can be always invalid).
Service::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: Service.h:54
IValidity
Interface for objects with a validity.
Definition: IValidity.h:12
StatusCode::FAILURE
Definition: StatusCode.h:29
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

bool DetDataSvc::validEventTime | ( |  | ) | const
| override

Check if the event time has been set.

Kept for backward compatibility, returns always true.

Definition at line 190 of file DetDataSvc.cpp.

190 { return true; }

## Member Data Documentation

SmartIF<IAddressCreator> DetDataSvc::m_addrCreator = nullptr
| private

Address Creator to be used.

Definition at line 111 of file DetDataSvc.h.

Gaudi::Property<bool> DetDataSvc::m_allowLoadInRunning
| private

Initial value:
{this, "AllowLoadInRunning", true,
"if set to false, no new object can be loaded while in running state "
"(updates are still allowed), this forces preloading of the geometry"}

Definition at line 103 of file DetDataSvc.h.

Gaudi::Property<std::string> DetDataSvc::m_detDbLocation
| private

Initial value:
{this, "DetDbLocation", "empty",
"location of detector Db (filename,URL)"}

Definition at line 96 of file DetDataSvc.h.

Gaudi::Property<std::string> DetDataSvc::m_detDbRootName {this, "DetDbRootName", "dd", "name of the root node of the detector"}
| private

Definition at line 98 of file DetDataSvc.h.

Gaudi::Property<int> DetDataSvc::m_detStorageType
| private

Initial value:
{this, "DetStorageType", XML_StorageType,
"Detector Data Persistency Storage type"}

Definition at line 94 of file DetDataSvc.h.

Gaudi::Time DetDataSvc::m_eventTime = 0
| private

Current event time.

Definition at line 108 of file DetDataSvc.h.

Gaudi::Property<std::string> DetDataSvc::m_persistencySvcName
| private

Initial value:
{this, "PersistencySvc", "DetectorPersistencySvc",
"name of the persistency service"}

Definition at line 100 of file DetDataSvc.h.

Gaudi::Property<bool> DetDataSvc::m_usePersistency {this, "UsePersistency", false, "control if the persistency is required"}
| private

Definition at line 99 of file DetDataSvc.h.

The documentation for this class was generated from the following files:

- GaudiSvc/src/DetectorDataSvc/DetDataSvc.h
- GaudiSvc/src/DetectorDataSvc/DetDataSvc.cpp