All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DataSvc Class Reference

Data service base class. More...

#include <GaudiKernel/DataSvc.h>

Inheritance diagram for DataSvc:
Collaboration diagram for DataSvc:

Public Types

typedef std::vector
< DataStoreItem
LoadItems
 Define set of load items.
 
typedef std::vector
< DataStoreItem
LoadItems
 Define set of load items.
 
- Public Types inherited from extends2< Service, IDataProviderSvc, IDataManagerSvc >
typedef extends2 base_class
 Typedef to this class.
 
typedef extends2 base_class
 Typedef to this class.
 
typedef extend_interfaces2
< IDataProviderSvc,
IDataManagerSvc
extend_interfaces_base
 Typedef to the base of this class.
 
typedef extend_interfaces2
< IDataProviderSvc,
IDataManagerSvc
extend_interfaces_base
 Typedef to the base of this class.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 
- Public Types inherited from Service
typedef
Gaudi::PluginService::Factory
< IService *, const
std::string &, ISvcLocator * > 
Factory
 
typedef
Gaudi::PluginService::Factory
< IService *, const
std::string &, ISvcLocator * > 
Factory
 
- Public Types inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
typedef CommonMessaging base_class
 
typedef CommonMessaging base_class
 
- Public Types inherited from implements3< IService, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class.
 
typedef implements3 base_class
 Typedef to this class.
 
typedef extend_interfaces3
< IService, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class.
 
typedef extend_interfaces3
< IService, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 
- Public Types inherited from extend_interfaces3< I1, I2, I3 >
typedef mpl::fold< typename
I1::iid::iids::type, typename
mpl::fold< typename
I2::iid::iids::type, typename
I3::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one.
 
typedef mpl::fold< typename
I1::iid::iids::type, typename
mpl::fold< typename
I2::iid::iids::type, typename
I3::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one.
 
- Public Types inherited from extend_interfaces2< I1, I2 >
typedef mpl::fold< typename
I1::iid::iids::type, typename
I2::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type 
ext_iids
 MPL set of interfaces extended by this one.
 
typedef mpl::fold< typename
I1::iid::iids::type, typename
I2::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type 
ext_iids
 MPL set of interfaces extended by this one.
 

Public Member Functions

virtual CLID rootCLID () const
 IDataManagerSvc: Accessor for root event CLID.
 
virtual std::string rootName () const
 IDataManagerSvc: Accessor for root event name.
 
virtual StatusCode registerAddress (const std::string &fullPath, IOpaqueAddress *pAddress)
 IDataManagerSvc: Register object address with the data store.
 
virtual StatusCode registerAddress (DataObject *parentObj, const std::string &objectPath, IOpaqueAddress *pAddress)
 IDataManagerSvc: Register object address with the data store.
 
virtual StatusCode registerAddress (IRegistry *parentObj, const std::string &objectPath, IOpaqueAddress *pAddress)
 IDataManagerSvc: Register object address with the data store.
 
virtual StatusCode unregisterAddress (const std::string &fullPath)
 IDataManagerSvc: Unregister object address from the data store.
 
virtual StatusCode unregisterAddress (DataObject *pParent, const std::string &objPath)
 IDataManagerSvc: Unregister object address from the data store.
 
virtual StatusCode unregisterAddress (IRegistry *pParent, const std::string &objPath)
 IDataManagerSvc: Unregister object address from the data store.
 
virtual StatusCode objectLeaves (const DataObject *pObject, std::vector< IRegistry * > &refLeaves)
 IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object.
 
virtual StatusCode objectLeaves (const IRegistry *pRegistry, std::vector< IRegistry * > &refLeaves)
 IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object.
 
virtual StatusCode objectParent (const DataObject *pObject, IRegistry *&refpParent)
 IDataManagerSvc: Explore the object store: retrieve the object's parent.
 
virtual StatusCode objectParent (const IRegistry *pRegistry, IRegistry *&refpParent)
 IDataManagerSvc: Explore the object store: retrieve the object's parent.
 
virtual StatusCode clearSubTree (const std::string &sub_tree_path)
 IDataManagerSvc: Remove all data objects below the sub tree identified by its full path name.
 
virtual StatusCode clearSubTree (DataObject *pObject)
 IDataManagerSvc: Remove all data objects below the sub tree identified by the object.
 
virtual StatusCode clearStore ()
 IDataManagerSvc: Remove all data objects in the data store.
 
virtual StatusCode traverseSubTree (const std::string &sub_tree_path, IDataStoreAgent *pAgent)
 IDataManagerSvc: Analyze by traversing all data objects below the sub tree identified by its full path name.
 
virtual StatusCode traverseSubTree (DataObject *pObject, IDataStoreAgent *pAgent)
 IDataManagerSvc: Analyze by traversing all data objects below the sub tree.
 
virtual StatusCode traverseTree (IDataStoreAgent *pAgent)
 IDataManagerSvc: Analyze by traversing all data objects in the data store.
 
virtual StatusCode setRoot (const std::string &root_name, DataObject *pRootObj)
 Initialize data store for new event by giving new event path and root object.
 
virtual StatusCode i_setRoot (const std::string &root_name, DataObject *pRootObj)
 Initialize data store for new event by giving new event path and root object.
 
virtual StatusCode setRoot (const std::string &root_path, IOpaqueAddress *pRootAddr)
 Initialize data store for new event by giving new event path and address of root object.
 
virtual StatusCode i_setRoot (const std::string &root_path, IOpaqueAddress *pRootAddr)
 Initialize data store for new event by giving new event path and address of root object.
 
virtual StatusCode setDataLoader (IConversionSvc *svc)
 IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service.
 
virtual StatusCode addPreLoadItem (const DataStoreItem &item)
 Add an item to the preload list.
 
virtual StatusCode addPreLoadItem (const std::string &itemPath)
 Add an item to the preload list.
 
virtual StatusCode removePreLoadItem (const DataStoreItem &item)
 Remove an item from the preload list.
 
virtual StatusCode removePreLoadItem (const std::string &itemPath)
 Add an item to the preload list.
 
virtual StatusCode resetPreLoad ()
 Clear the preload list.
 
virtual StatusCode preLoad (int depth, int load_depth, DataObject *pObject)
 Execute one level of preloading and recursively load until the final level is reached.
 
virtual StatusCode preLoad ()
 load all preload items of the list
 
virtual StatusCode registerObject (const std::string &fullPath, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode registerObject (const std::string &parentPath, const std::string &objPath, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode registerObject (const std::string &parentPath, int item, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode registerObject (DataObject *parentObj, const std::string &objPath, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode registerObject (DataObject *parentObj, int item, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode unregisterObject (const std::string &fullPath)
 Unregister object from the data store.
 
virtual StatusCode unregisterObject (const std::string &parentPath, const std::string &objectPath)
 Unregister object from the data store.
 
virtual StatusCode unregisterObject (const std::string &parentPath, int item)
 Unregister object from the data store.
 
virtual StatusCode unregisterObject (DataObject *pObject)
 Unregister object from the data store.
 
virtual StatusCode unregisterObject (DataObject *pObject, const std::string &objectPath)
 Unregister object from the data store.
 
virtual StatusCode unregisterObject (DataObject *pObject, int item)
 Unregister object from the data store.
 
virtual StatusCode retrieveObject (IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
 Retrieve object from data store.
 
virtual StatusCode retrieveObject (const std::string &fullPath, DataObject *&pObject)
 Retrieve object identified by its full path from the data store.
 
virtual StatusCode retrieveObject (const std::string &parentPath, const std::string &objPath, DataObject *&pObject)
 Retrieve object from data store.
 
virtual StatusCode retrieveObject (const std::string &parentPath, int item, DataObject *&pObject)
 Retrieve object from data store.
 
virtual StatusCode retrieveObject (DataObject *parentObj, const std::string &objPath, DataObject *&pObject)
 Retrieve object from data store.
 
virtual StatusCode retrieveObject (DataObject *parentObj, int item, DataObject *&pObject)
 Retrieve object from data store.
 
virtual StatusCode findObject (const std::string &fullPath, DataObject *&pObject)
 Find object identified by its full path in the data store.
 
virtual StatusCode findObject (IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
 Find object identified by its full path in the data store.
 
virtual StatusCode findObject (const std::string &parentPath, const std::string &objPath, DataObject *&pObject)
 Find object in the data store.
 
virtual StatusCode findObject (const std::string &parentPath, int item, DataObject *&pObject)
 Find object in the data store.
 
virtual StatusCode findObject (DataObject *parentObj, const std::string &objPath, DataObject *&pObject)
 Find object in the data store.
 
virtual StatusCode findObject (DataObject *parentObj, int item, DataObject *&pObject)
 Find object in the data store.
 
virtual StatusCode linkObject (IRegistry *from, const std::string &objPath, DataObject *to)
 Add a link to another object.
 
virtual StatusCode linkObject (const std::string &fromPath, const std::string &objPath, DataObject *to)
 Add a link to another object.
 
virtual StatusCode linkObject (DataObject *from, const std::string &objPath, DataObject *to)
 Add a link to another object.
 
virtual StatusCode linkObject (const std::string &fullPath, DataObject *to)
 Add a link to another object.
 
virtual StatusCode unlinkObject (IRegistry *from, const std::string &objPath)
 Remove a link to another object.
 
virtual StatusCode unlinkObject (const std::string &fromPath, const std::string &objPath)
 Remove a link to another object.
 
virtual StatusCode unlinkObject (DataObject *fromObj, const std::string &objPath)
 Remove a link to another object.
 
virtual StatusCode unlinkObject (const std::string &fullPath)
 Remove a link to another object.
 
virtual StatusCode updateObject (IRegistry *pDirectory)
 Update object identified by its directory entry.
 
virtual StatusCode updateObject (const std::string &updatePath)
 Update object.
 
virtual StatusCode updateObject (DataObject *toUpdate)
 Update object.
 
virtual StatusCode updateObject (const std::string &parentPath, const std::string &updatePath)
 Update object.
 
virtual StatusCode updateObject (DataObject *pParent, const std::string &updatePath)
 Update object.
 
virtual StatusCode initialize ()
 Service initialization.
 
virtual StatusCode reinitialize ()
 Service initialization.
 
virtual StatusCode finalize ()
 Service initialization.
 
 DataSvc (const std::string &name, ISvcLocator *svc)
 Standard Constructor.
 
virtual ~DataSvc ()
 Standard Destructor.
 
virtual CLID rootCLID () const
 IDataManagerSvc: Accessor for root event CLID.
 
virtual std::string rootName () const
 IDataManagerSvc: Accessor for root event name.
 
virtual StatusCode registerAddress (const std::string &fullPath, IOpaqueAddress *pAddress)
 IDataManagerSvc: Register object address with the data store.
 
virtual StatusCode registerAddress (DataObject *parentObj, const std::string &objectPath, IOpaqueAddress *pAddress)
 IDataManagerSvc: Register object address with the data store.
 
virtual StatusCode registerAddress (IRegistry *parentObj, const std::string &objectPath, IOpaqueAddress *pAddress)
 IDataManagerSvc: Register object address with the data store.
 
virtual StatusCode unregisterAddress (const std::string &fullPath)
 IDataManagerSvc: Unregister object address from the data store.
 
virtual StatusCode unregisterAddress (DataObject *pParent, const std::string &objPath)
 IDataManagerSvc: Unregister object address from the data store.
 
virtual StatusCode unregisterAddress (IRegistry *pParent, const std::string &objPath)
 IDataManagerSvc: Unregister object address from the data store.
 
virtual StatusCode objectLeaves (const DataObject *pObject, std::vector< IRegistry * > &refLeaves)
 IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object.
 
virtual StatusCode objectLeaves (const IRegistry *pRegistry, std::vector< IRegistry * > &refLeaves)
 IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object.
 
virtual StatusCode objectParent (const DataObject *pObject, IRegistry *&refpParent)
 IDataManagerSvc: Explore the object store: retrieve the object's parent.
 
virtual StatusCode objectParent (const IRegistry *pRegistry, IRegistry *&refpParent)
 IDataManagerSvc: Explore the object store: retrieve the object's parent.
 
virtual StatusCode clearSubTree (const std::string &sub_tree_path)
 IDataManagerSvc: Remove all data objects below the sub tree identified by its full path name.
 
virtual StatusCode clearSubTree (DataObject *pObject)
 IDataManagerSvc: Remove all data objects below the sub tree identified by the object.
 
virtual StatusCode clearStore ()
 IDataManagerSvc: Remove all data objects in the data store.
 
virtual StatusCode traverseSubTree (const std::string &sub_tree_path, IDataStoreAgent *pAgent)
 IDataManagerSvc: Analyze by traversing all data objects below the sub tree identified by its full path name.
 
virtual StatusCode traverseSubTree (DataObject *pObject, IDataStoreAgent *pAgent)
 IDataManagerSvc: Analyze by traversing all data objects below the sub tree.
 
virtual StatusCode traverseTree (IDataStoreAgent *pAgent)
 IDataManagerSvc: Analyze by traversing all data objects in the data store.
 
virtual StatusCode setRoot (const std::string &root_name, DataObject *pRootObj)
 Initialize data store for new event by giving new event path and root object.
 
virtual StatusCode i_setRoot (const std::string &root_name, DataObject *pRootObj)
 Initialize data store for new event by giving new event path and root object.
 
virtual StatusCode setRoot (const std::string &root_path, IOpaqueAddress *pRootAddr)
 Initialize data store for new event by giving new event path and address of root object.
 
virtual StatusCode i_setRoot (const std::string &root_path, IOpaqueAddress *pRootAddr)
 Initialize data store for new event by giving new event path and address of root object.
 
virtual StatusCode setDataLoader (IConversionSvc *svc)
 IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service.
 
virtual StatusCode addPreLoadItem (const DataStoreItem &item)
 Add an item to the preload list.
 
virtual StatusCode addPreLoadItem (const std::string &itemPath)
 Add an item to the preload list.
 
virtual StatusCode removePreLoadItem (const DataStoreItem &item)
 Remove an item from the preload list.
 
virtual StatusCode removePreLoadItem (const std::string &itemPath)
 Add an item to the preload list.
 
virtual StatusCode resetPreLoad ()
 Clear the preload list.
 
virtual StatusCode preLoad (int depth, int load_depth, DataObject *pObject)
 Execute one level of preloading and recursively load until the final level is reached.
 
virtual StatusCode preLoad ()
 load all preload items of the list
 
virtual StatusCode registerObject (const std::string &fullPath, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode registerObject (const std::string &parentPath, const std::string &objPath, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode registerObject (const std::string &parentPath, int item, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode registerObject (DataObject *parentObj, const std::string &objPath, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode registerObject (DataObject *parentObj, int item, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode unregisterObject (const std::string &fullPath)
 Unregister object from the data store.
 
virtual StatusCode unregisterObject (const std::string &parentPath, const std::string &objectPath)
 Unregister object from the data store.
 
virtual StatusCode unregisterObject (const std::string &parentPath, int item)
 Unregister object from the data store.
 
virtual StatusCode unregisterObject (DataObject *pObject)
 Unregister object from the data store.
 
virtual StatusCode unregisterObject (DataObject *pObject, const std::string &objectPath)
 Unregister object from the data store.
 
virtual StatusCode unregisterObject (DataObject *pObject, int item)
 Unregister object from the data store.
 
virtual StatusCode retrieveObject (IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
 Retrieve object from data store.
 
virtual StatusCode retrieveObject (const std::string &fullPath, DataObject *&pObject)
 Retrieve object identified by its full path from the data store.
 
virtual StatusCode retrieveObject (const std::string &parentPath, const std::string &objPath, DataObject *&pObject)
 Retrieve object from data store.
 
virtual StatusCode retrieveObject (const std::string &parentPath, int item, DataObject *&pObject)
 Retrieve object from data store.
 
virtual StatusCode retrieveObject (DataObject *parentObj, const std::string &objPath, DataObject *&pObject)
 Retrieve object from data store.
 
virtual StatusCode retrieveObject (DataObject *parentObj, int item, DataObject *&pObject)
 Retrieve object from data store.
 
virtual StatusCode findObject (const std::string &fullPath, DataObject *&pObject)
 Find object identified by its full path in the data store.
 
virtual StatusCode findObject (IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
 Find object identified by its full path in the data store.
 
virtual StatusCode findObject (const std::string &parentPath, const std::string &objPath, DataObject *&pObject)
 Find object in the data store.
 
virtual StatusCode findObject (const std::string &parentPath, int item, DataObject *&pObject)
 Find object in the data store.
 
virtual StatusCode findObject (DataObject *parentObj, const std::string &objPath, DataObject *&pObject)
 Find object in the data store.
 
virtual StatusCode findObject (DataObject *parentObj, int item, DataObject *&pObject)
 Find object in the data store.
 
virtual StatusCode linkObject (IRegistry *from, const std::string &objPath, DataObject *to)
 Add a link to another object.
 
virtual StatusCode linkObject (const std::string &fromPath, const std::string &objPath, DataObject *to)
 Add a link to another object.
 
virtual StatusCode linkObject (DataObject *from, const std::string &objPath, DataObject *to)
 Add a link to another object.
 
virtual StatusCode linkObject (const std::string &fullPath, DataObject *to)
 Add a link to another object.
 
virtual StatusCode unlinkObject (IRegistry *from, const std::string &objPath)
 Remove a link to another object.
 
virtual StatusCode unlinkObject (const std::string &fromPath, const std::string &objPath)
 Remove a link to another object.
 
virtual StatusCode unlinkObject (DataObject *fromObj, const std::string &objPath)
 Remove a link to another object.
 
virtual StatusCode unlinkObject (const std::string &fullPath)
 Remove a link to another object.
 
virtual StatusCode updateObject (IRegistry *pDirectory)
 Update object identified by its directory entry.
 
virtual StatusCode updateObject (const std::string &updatePath)
 Update object.
 
virtual StatusCode updateObject (DataObject *toUpdate)
 Update object.
 
virtual StatusCode updateObject (const std::string &parentPath, const std::string &updatePath)
 Update object.
 
virtual StatusCode updateObject (DataObject *pParent, const std::string &updatePath)
 Update object.
 
virtual StatusCode initialize ()
 Service initialization.
 
virtual StatusCode reinitialize ()
 Service initialization.
 
virtual StatusCode finalize ()
 Service initialization.
 
 DataSvc (const std::string &name, ISvcLocator *svc)
 Standard Constructor.
 
virtual ~DataSvc ()
 Standard Destructor.
 
- Public Member Functions inherited from extends2< Service, IDataProviderSvc, IDataManagerSvc >
 extends2 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments.
 
 extends2 (A1 a1, A2 a2)
 Templated constructor with 2 arguments.
 
 extends2 (A1 a1)
 Templated constructor with 1 argument.
 
 extends2 ()
 Default constructor.
 
 extends2 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments.
 
 extends2 (A1 a1, A2 a2)
 Templated constructor with 2 arguments.
 
 extends2 (A1 a1)
 Templated constructor with 1 argument.
 
 extends2 ()
 Default constructor.
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast.
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast.
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface.
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface.
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames.
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames.
 
virtual ~extends2 ()
 Virtual destructor.
 
virtual ~extends2 ()
 Virtual destructor.
 
- Public Member Functions inherited from Service
virtual unsigned long release ()
 Release Interface instance.
 
virtual const std::string & name () const
 Retrieve name of the service.
 
virtual StatusCode configure ()
 
virtual StatusCode start ()
 
virtual StatusCode stop ()
 
virtual StatusCode terminate ()
 
virtual Gaudi::StateMachine::State FSMState () const
 
virtual Gaudi::StateMachine::State targetFSMState () const
 
virtual StatusCode restart ()
 
virtual StatusCode sysInitialize ()
 Initialize Service.
 
virtual StatusCode sysStart ()
 Initialize Service.
 
virtual StatusCode sysStop ()
 Initialize Service.
 
virtual StatusCode sysFinalize ()
 Finalize Service.
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service.
 
virtual StatusCode sysRestart ()
 Re-initialize the Service.
 
virtual StatusCode setProperty (const Property &p)
 
virtual StatusCode setProperty (const std::string &s)
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 
virtual StatusCode getProperty (Property *p) const
 
virtual const PropertygetProperty (const std::string &name) const
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 
virtual const std::vector
< Property * > & 
getProperties () const
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor.
 
SmartIF< ISvcLocator > & serviceLocator () const
 Retrieve pointer to service locator.
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job.
 
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.
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, 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.
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property.
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties.
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked.
 
virtual unsigned long release ()
 Release Interface instance.
 
virtual const std::string & name () const
 Retrieve name of the service.
 
virtual StatusCode configure ()
 
virtual StatusCode start ()
 
virtual StatusCode stop ()
 
virtual StatusCode terminate ()
 
virtual Gaudi::StateMachine::State FSMState () const
 
virtual Gaudi::StateMachine::State targetFSMState () const
 
virtual StatusCode restart ()
 
virtual StatusCode sysInitialize ()
 Initialize Service.
 
virtual StatusCode sysStart ()
 Initialize Service.
 
virtual StatusCode sysStop ()
 Initialize Service.
 
virtual StatusCode sysFinalize ()
 Finalize Service.
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service.
 
virtual StatusCode sysRestart ()
 Re-initialize the Service.
 
virtual StatusCode setProperty (const Property &p)
 
virtual StatusCode setProperty (const std::string &s)
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 
virtual StatusCode getProperty (Property *p) const
 
virtual const PropertygetProperty (const std::string &name) const
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 
virtual const std::vector
< Property * > & 
getProperties () const
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor.
 
SmartIF< ISvcLocator > & serviceLocator () const
 Retrieve pointer to service locator.
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job.
 
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.
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, 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.
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property.
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties.
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked.
 
- Public Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments.
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments.
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument.
 
 CommonMessaging ()
 Default constructor.
 
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments.
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments.
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument.
 
 CommonMessaging ()
 Default constructor.
 
virtual ~CommonMessaging ()
 Virtual destructor.
 
virtual ~CommonMessaging ()
 Virtual destructor.
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service.
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service.
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream.
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts.
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream.
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts.
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS)
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS)
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL)
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL)
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR)
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR)
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR)
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR)
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING)
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING)
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO)
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO)
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG)
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG)
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE)
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE)
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO)
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO)
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream
 
- Public Member Functions inherited from extend_interfaces2< I1, I2 >
virtual ~extend_interfaces2 ()
 Virtual destructor.
 
virtual ~extend_interfaces2 ()
 Virtual destructor.
 

Protected Member Functions

bool checkRoot ()
 Check if root path is valid.
 
virtual IConversionSvcgetDataLoader (IRegistry *pReg)
 Retrieve customizable data loader according to registry entry to be retrieved.
 
virtual DataObjectcreateDefaultObject () const
 Create default objects in case forced creation of leaves is requested.
 
virtual StatusCode loadObject (IRegistry *pNode)
 Invoke Persistency service to create transient object from its persistent representation.
 
virtual StatusCode loadObject (IConversionSvc *pLoader, IRegistry *pNode)
 Invoke Persistency service to create transient object from its persistent representation.
 
StatusCode retrieveEntry (DataSvcHelpers::RegistryEntry *pNode, const std::string &path, DataSvcHelpers::RegistryEntry *&pEntry)
 Retrieve registry entry from store.
 
DataObjecthandleDataFault (IRegistry *pReg, const std::string &path="")
 Invoke data fault handling if enabled.
 
bool checkRoot ()
 Check if root path is valid.
 
virtual IConversionSvcgetDataLoader (IRegistry *pReg)
 Retrieve customizable data loader according to registry entry to be retrieved.
 
virtual DataObjectcreateDefaultObject () const
 Create default objects in case forced creation of leaves is requested.
 
virtual StatusCode loadObject (IRegistry *pNode)
 Invoke Persistency service to create transient object from its persistent representation.
 
virtual StatusCode loadObject (IConversionSvc *pLoader, IRegistry *pNode)
 Invoke Persistency service to create transient object from its persistent representation.
 
StatusCode retrieveEntry (DataSvcHelpers::RegistryEntry *pNode, const std::string &path, DataSvcHelpers::RegistryEntry *&pEntry)
 Retrieve registry entry from store.
 
DataObjecthandleDataFault (IRegistry *pReg, const std::string &path="")
 Invoke data fault handling if enabled.
 

Protected Attributes

CLID m_rootCLID
 Integer Property corresponding to CLID of root entry.
 
std::string m_rootName
 Name of root event.
 
IConversionSvcm_dataLoader
 Pointer to data loader service.
 
IIncidentSvcm_incidentSvc
 Pointer to incident service.
 
LoadItems m_preLoads
 Items to be pre-loaded.
 
bool m_forceLeaves
 Allow forced creation of default leaves on registerObject.
 
bool m_enableAccessHdlr
 Flag to enable interrupts on data access requests.
 
bool m_enableFaultHdlr
 Flag to enable interrupts on data creation requests.
 
DataSvcHelpers::RegistryEntrym_root
 Pointer to root entry.
 
DataSvcHelpers::InhibitMap * m_inhibitMap
 Map with object paths to be inhibited from loading.
 
std::vector< std::string > m_inhibitPathes
 Property for the inhibited leaves.
 
std::string m_accessName
 Name of the data access incident.
 
std::string m_faultName
 Name of the data fault incident.
 

Private Member Functions

 DataSvc (const DataSvc &)
 Fake copy constructor (never implemented).
 
DataSvcoperator= (const DataSvc &)
 Fake assignment operator (never implemented).
 
StatusCode i_retrieveEntry (DataSvcHelpers::RegistryEntry *parentObj, boost::string_ref path, DataSvcHelpers::RegistryEntry *&pEntry)
 
DataObjecti_handleDataFault (IRegistry *pReg, boost::string_ref path=boost::string_ref{})
 
 DataSvc (const DataSvc &)
 Fake copy constructor (never implemented).
 
DataSvcoperator= (const DataSvc &)
 Fake assignment operator (never implemented).
 
StatusCode i_retrieveEntry (DataSvcHelpers::RegistryEntry *parentObj, boost::string_ref path, DataSvcHelpers::RegistryEntry *&pEntry)
 
DataObjecti_handleDataFault (IRegistry *pReg, boost::string_ref path=boost::string_ref{})
 

Detailed Description

Data service base class.

A data service manages the transient data stores and implements the IDataProviderSvc and IDataManagerSvc interfaces.

Author
Markus Frank
Sebastien Ponce
Version
1.0

Definition at line 40 of file DataSvc.h.

Member Typedef Documentation

typedef std::vector<DataStoreItem> DataSvc::LoadItems

Define set of load items.

Definition at line 44 of file DataSvc.h.

typedef std::vector<DataStoreItem> DataSvc::LoadItems

Define set of load items.

Definition at line 44 of file DataSvc.h.

Constructor & Destructor Documentation

DataSvc::DataSvc ( const std::string &  name,
ISvcLocator svc 
)

Standard Constructor.

Definition at line 1276 of file DataSvc.cpp.

: base_class(name,svc), m_rootCLID( /*CLID_Event*/ 110),
m_rootName( "/Event"), m_root(nullptr)
{
m_dataLoader = nullptr;
m_incidentSvc = nullptr;
m_forceLeaves = false;
m_faultName = "DataFault";
m_accessName = "DataAccess";
declareProperty("ForceLeaves", m_forceLeaves);
declareProperty("InhibitPathes", m_inhibitPathes);
declareProperty("DataFaultName", m_faultName);
declareProperty("DataAccessName", m_accessName);
declareProperty("EnableFaultHandler", m_enableFaultHdlr);
declareProperty("EnableAccessHandler", m_enableAccessHdlr);
}
DataSvc::~DataSvc ( )
virtual

Standard Destructor.

Definition at line 1299 of file DataSvc.cpp.

DataSvc::DataSvc ( const DataSvc )
private

Fake copy constructor (never implemented).

DataSvc::DataSvc ( const std::string &  name,
ISvcLocator svc 
)

Standard Constructor.

virtual DataSvc::~DataSvc ( )
virtual

Standard Destructor.

DataSvc::DataSvc ( const DataSvc )
private

Fake copy constructor (never implemented).

Member Function Documentation

StatusCode DataSvc::addPreLoadItem ( const DataStoreItem item)
virtual

Add an item to the preload list.

Definition at line 1138 of file DataSvc.cpp.

{
auto i = std::find(std::begin(m_preLoads), std::end(m_preLoads), item);
if ( i == std::end(m_preLoads) ) {
m_preLoads.push_back(item);
}
}
virtual StatusCode DataSvc::addPreLoadItem ( const DataStoreItem item)
virtual

Add an item to the preload list.

StatusCode DataSvc::addPreLoadItem ( const std::string &  itemPath)
virtual

Add an item to the preload list.

Definition at line 1147 of file DataSvc.cpp.

{
return addPreLoadItem( DataStoreItem(itemPath,1) );
}
virtual StatusCode DataSvc::addPreLoadItem ( const std::string &  itemPath)
virtual

Add an item to the preload list.

bool DataSvc::checkRoot ( )
inlineprotected

Check if root path is valid.

Definition at line 385 of file DataSvc.h.

{
return 0 != m_root;
}
bool DataSvc::checkRoot ( )
inlineprotected

Check if root path is valid.

Definition at line 385 of file DataSvc.h.

{
return 0 != m_root;
}
virtual StatusCode DataSvc::clearStore ( )
virtual

IDataManagerSvc: Remove all data objects in the data store.

Reimplemented in DetDataSvc.

StatusCode DataSvc::clearStore ( )
virtual

IDataManagerSvc: Remove all data objects in the data store.

Reimplemented in DetDataSvc.

Definition at line 115 of file DataSvc.cpp.

{
if ( checkRoot() ) {
m_root = nullptr;
return SUCCESS;
}
return INVALID_ROOT;
}
virtual StatusCode DataSvc::clearSubTree ( const std::string &  sub_tree_path)
virtual

IDataManagerSvc: Remove all data objects below the sub tree identified by its full path name.

StatusCode DataSvc::clearSubTree ( const std::string &  sub_tree_path)
virtual

IDataManagerSvc: Remove all data objects below the sub tree identified by its full path name.

Definition at line 77 of file DataSvc.cpp.

{
DataObject* pObject = nullptr;
StatusCode status = findObject(sub_tree_path, pObject);
if ( status.isSuccess() ) {
RegEntry* node_entry = CAST_REGENTRY(RegEntry*,pObject->registry());
if ( node_entry ) {
RegEntry* parent = node_entry->parentEntry();
if ( parent ) {
parent->remove(node_entry);
}
return INVALID_PARENT;
}
return INVALID_OBJECT;
}
return status;
}
virtual StatusCode DataSvc::clearSubTree ( DataObject pObject)
virtual

IDataManagerSvc: Remove all data objects below the sub tree identified by the object.

StatusCode DataSvc::clearSubTree ( DataObject pObject)
virtual

IDataManagerSvc: Remove all data objects below the sub tree identified by the object.

Definition at line 98 of file DataSvc.cpp.

{
if ( checkRoot() ) {
RegEntry* entry = CAST_REGENTRY(RegEntry*,pObject->registry());
if ( entry ) {
RegEntry* parent = entry->parentEntry();
if ( parent ) {
parent->remove(entry);
return SUCCESS;
}
return INVALID_PARENT;
}
return INVALID_OBJECT;
}
return INVALID_ROOT;
}
DataObject * DataSvc::createDefaultObject ( ) const
protectedvirtual

Create default objects in case forced creation of leaves is requested.

Definition at line 1264 of file DataSvc.cpp.

{
return new DataObject();
}
virtual DataObject* DataSvc::createDefaultObject ( ) const
protectedvirtual

Create default objects in case forced creation of leaves is requested.

StatusCode DataSvc::finalize ( )
virtual

Service initialization.

Service initialisation.

Reimplemented from Service.

Reimplemented in HistogramSvc, NTupleSvc, DetDataSvc, TagCollectionSvc, RecordDataSvc, and EvtDataSvc.

Definition at line 1241 of file DataSvc.cpp.

{
// Nothing to do: just call base class initialisation
setDataLoader(nullptr).ignore();
if ( m_incidentSvc ) {
m_incidentSvc = nullptr;
}
}
virtual StatusCode DataSvc::finalize ( )
virtual

Service initialization.

Reimplemented from Service.

Reimplemented in HistogramSvc, NTupleSvc, DetDataSvc, TagCollectionSvc, RecordDataSvc, and EvtDataSvc.

StatusCode DataSvc::findObject ( const std::string &  fullPath,
DataObject *&  pObject 
)
virtual

Find object identified by its full path in the data store.

Definition at line 855 of file DataSvc.cpp.

{
pObject = nullptr;
if ( checkRoot() ) {
if ( path.empty() || path == m_rootName ) {
pObject = m_root->object();
return (0 == pObject) ? OBJ_NOT_LOADED : IDataProviderSvc_NO_ERROR;
}
else if ( path.front() != SEPARATOR ) {
return findObject(m_rootName, path, pObject);
}
return findObject((IRegistry*)nullptr, path, pObject);
}
return INVALID_ROOT;
}
virtual StatusCode DataSvc::findObject ( const std::string &  fullPath,
DataObject *&  pObject 
)
virtual

Find object identified by its full path in the data store.

virtual StatusCode DataSvc::findObject ( IRegistry pDirectory,
const std::string &  path,
DataObject *&  pObject 
)
virtual

Find object identified by its full path in the data store.

StatusCode DataSvc::findObject ( IRegistry pDirectory,
const std::string &  path,
DataObject *&  pObject 
)
virtual

Find object identified by its full path in the data store.

Retrieve object identified by its directory from the data store.

Definition at line 836 of file DataSvc.cpp.

{
pObject = nullptr;
IRegistry* pReg = ( pRegistry ? pRegistry : m_root );
RegEntry* root_entry = CAST_REGENTRY(RegEntry*, pReg);
if ( root_entry ) {
if ( !path.empty() ) {
pReg = root_entry->find(path);
}
if ( !pReg ) {
return INVALID_OBJ_PATH;
}
pObject = pReg->object();
}
return (!pObject) ? OBJ_NOT_LOADED : IDataProviderSvc_NO_ERROR;
}
virtual StatusCode DataSvc::findObject ( const std::string &  parentPath,
const std::string &  objPath,
DataObject *&  pObject 
)
virtual

Find object in the data store.

StatusCode DataSvc::findObject ( const std::string &  parentPath,
const std::string &  objPath,
DataObject *&  pObject 
)
virtual

Find object in the data store.

Retrieve object identified by its full path from the data store.

Definition at line 872 of file DataSvc.cpp.

{
DataObject* parent = nullptr;
StatusCode status = findObject(parentPath, parent);
if ( status.isSuccess() ) {
status = findObject (parent, objectPath, pObject);
}
return status;
}
virtual StatusCode DataSvc::findObject ( const std::string &  parentPath,
int  item,
DataObject *&  pObject 
)
virtual

Find object in the data store.

StatusCode DataSvc::findObject ( const std::string &  parentPath,
int  item,
DataObject *&  pObject 
)
virtual

Find object in the data store.

Retrieve object identified by its full path from the data store.

Definition at line 884 of file DataSvc.cpp.

{
return findObject(parentPath, itemToPath(item), pObject);
}
virtual StatusCode DataSvc::findObject ( DataObject parentObj,
const std::string &  objPath,
DataObject *&  pObject 
)
virtual

Find object in the data store.

StatusCode DataSvc::findObject ( DataObject parentObj,
const std::string &  objPath,
DataObject *&  pObject 
)
virtual

Find object in the data store.

Find object identified by its full path in the data store.

Definition at line 897 of file DataSvc.cpp.

{
IRegistry* pDir = ( parentObj ? parentObj->registry() : nullptr );
return findObject(pDir, path, pObject);
}
virtual StatusCode DataSvc::findObject ( DataObject parentObj,
int  item,
DataObject *&  pObject 
)
virtual

Find object in the data store.

StatusCode DataSvc::findObject ( DataObject parentObj,
int  item,
DataObject *&  pObject 
)
virtual

Find object in the data store.

Find object identified by its full path in the data store.

Definition at line 890 of file DataSvc.cpp.

{
return findObject(parentObj, itemToPath(item), pObject);
}
IConversionSvc * DataSvc::getDataLoader ( IRegistry pReg)
protectedvirtual

Retrieve customizable data loader according to registry entry to be retrieved.

Reimplemented in NTupleSvc.

Definition at line 1271 of file DataSvc.cpp.

{
return m_dataLoader;
}
virtual IConversionSvc* DataSvc::getDataLoader ( IRegistry pReg)
protectedvirtual

Retrieve customizable data loader according to registry entry to be retrieved.

Reimplemented in NTupleSvc.

DataObject * DataSvc::handleDataFault ( IRegistry pReg,
const std::string &  path = "" 
)
protected

Invoke data fault handling if enabled.

Parameters
pReg[IN] Pointer to missing registry entry
path[IN] Sub-path of requested object from pReg
Returns
Object corresponding to the specified leaf

Definition at line 562 of file DataSvc.cpp.

{
return i_handleDataFault(pReg,path);
}
DataObject* DataSvc::handleDataFault ( IRegistry pReg,
const std::string &  path = "" 
)
protected

Invoke data fault handling if enabled.

Parameters
pReg[IN] Pointer to missing registry entry
path[IN] Sub-path of requested object from pReg
Returns
Object corresponding to the specified leaf
DataObject * DataSvc::i_handleDataFault ( IRegistry pReg,
boost::string_ref  path = boost::string_ref{} 
)
private

Definition at line 566 of file DataSvc.cpp.

{
IRegistry* pLeaf = nullptr;
if ( pReg && path.empty() ) {
DataIncident incident(name(), m_faultName, pReg->identifier());
return pReg->object();
}
else if ( pReg ) {
std::string p = pReg->identifier();
if (path.front() != SEPARATOR ) p += SEPARATOR;
p.append(path.data(),path.size());
DataIncident incident(name(), m_faultName, p);
pLeaf = m_root->findLeaf(p);
}
else {
std::string p = m_root->identifier();
if (path.front() != SEPARATOR ) p += SEPARATOR;
p.append(path.data(),path.size());
DataIncident incident(name(), m_faultName, p);
pLeaf = m_root->findLeaf(p);
}
if ( pLeaf ) {
return pLeaf->object();
}
}
return nullptr;
}
DataObject* DataSvc::i_handleDataFault ( IRegistry pReg,
boost::string_ref  path = boost::string_ref{} 
)
private
StatusCode DataSvc::i_retrieveEntry ( DataSvcHelpers::RegistryEntry parentObj,
boost::string_ref  path,
DataSvcHelpers::RegistryEntry *&  pEntry 
)
private
StatusCode DataSvc::i_retrieveEntry ( DataSvcHelpers::RegistryEntry parentObj,
boost::string_ref  path,
DataSvcHelpers::RegistryEntry *&  pEntry 
)
private

Definition at line 692 of file DataSvc.cpp.

{
// A.Valassi 16.08.2001 avoid core dump if store is empty
if ( !checkRoot() ) return StatusCode(INVALID_ROOT,true);
static const auto empty = boost::string_ref{};
auto sep = find(path,SEPARATOR,1);
pEntry = nullptr;
if ( !parentObj ) {
if ( path.empty() || path == m_rootName ) {
parentObj = m_root;
path = empty;
} else if ( path.front() != SEPARATOR ) {
parentObj = m_root;
} else if ( sep != boost::string_ref::npos ) {
if ( !m_root->object() ) {
RegEntry* r = nullptr;
auto status = i_retrieveEntry(m_root, empty, r);
if ( !status.isSuccess() ) return status;
}
parentObj = m_root;
path = path.substr(sep);
} else {
return INVALID_OBJ_PATH;
}
sep = find(path,SEPARATOR,1);
}
StatusCode status = StatusCode(INVALID_ROOT,true);
if ( sep != boost::string_ref::npos ) { // the string contains a separator (after pos 0)
if (!parentObj->object()) { // if the parent object has not been loaded yet, load it now
status = loadObject(parentObj);
if ( !status.isSuccess() ) return status;
}
auto p_path = path.substr(0,sep);
RegEntry* root_entry = parentObj->findLeaf(p_path);
if ( !root_entry && m_enableFaultHdlr ) {
// If not even the parent is there, an incident
// to load the parent must be fired...
i_handleDataFault(parentObj, p_path);
root_entry = parentObj->findLeaf(p_path);
}
if ( root_entry ) {
DataObject* pO = root_entry->object();
if ( !pO ) {
// Object is not loaded: load the object if at all possible
status = loadObject(root_entry);
if ( !status.isSuccess() ) return status;
}
if ( root_entry->isSoft() ) {
root_entry = CAST_REGENTRY(RegEntry*,pO->registry());
}
return i_retrieveEntry(root_entry, path.substr(sep), pEntry);
}
return status;
} else if ( path.empty() ) {
pEntry = parentObj;
} else {
if (!parentObj->object()) { // if the parent object has not been loaded yet, load it now
status = loadObject(parentObj);
if ( !status.isSuccess() ) return status;
}
// last leave in search: find leaf and load
pEntry = parentObj->findLeaf(path);
// If no registry entry was found, trigger incident for action-on-demand
if ( !pEntry && m_enableFaultHdlr ) {
i_handleDataFault(parentObj, path);
pEntry = (path.empty() ? parentObj : parentObj->findLeaf(path) );
}
}
// Check results and return
if ( !pEntry ) return INVALID_OBJ_PATH;
if ( !pEntry->object() ) return loadObject(pEntry);
// Fire data access incident
// I do not know if this is a good idea....
// This fires too often!
//
//DataIncident incident(name(), m_accessName, pEntry->identifier());
//m_incidentSvc->fireIncident(incident);
return SUCCESS;
}
return SUCCESS;
}
StatusCode DataSvc::i_setRoot ( const std::string &  root_path,
DataObject pRootObj 
)
virtual

Initialize data store for new event by giving new event path and root object.

Does not clear the store before reinitializing it. This could lead to errors and should be handle with care. Use setRoot if unsure

Definition at line 165 of file DataSvc.cpp.

{
if ( pRootObj ) {
m_root = new RegEntry(root_path);
m_root->makeHard(pRootObj);
}
return SUCCESS;
}
virtual StatusCode DataSvc::i_setRoot ( const std::string &  root_name,
DataObject pRootObj 
)
virtual

Initialize data store for new event by giving new event path and root object.

Does not clear the store before reinitializing it. This could lead to errors and should be handle with care. Use setRoot if unsure

StatusCode DataSvc::i_setRoot ( const std::string &  root_path,
IOpaqueAddress pRootAddr 
)
virtual

Initialize data store for new event by giving new event path and address of root object.

Does not clear the store before reinitializing it. This could lead to errors and should be handle with care. Use setRoot if unsure

Definition at line 191 of file DataSvc.cpp.

{
if ( pRootAddr ) {
m_root = new RegEntry(root_path);
m_root->makeHard(pRootAddr);
}
return SUCCESS;
}
virtual StatusCode DataSvc::i_setRoot ( const std::string &  root_path,
IOpaqueAddress pRootAddr 
)
virtual

Initialize data store for new event by giving new event path and address of root object.

Does not clear the store before reinitializing it. This could lead to errors and should be handle with care. Use setRoot if unsure

StatusCode DataSvc::initialize ( )
virtual

Service initialization.

Reimplemented from Service.

Reimplemented in HistogramSvc, NTupleSvc, DetDataSvc, TagCollectionSvc, RecordDataSvc, and EvtDataSvc.

Definition at line 1201 of file DataSvc.cpp.

{
// Nothing to do: just call base class initialisation
if ( !sc.isSuccess() ) {
return sc;
}
sc = service("IncidentSvc", m_incidentSvc, true);
if ( UNLIKELY(!sc.isSuccess()) ) {
error() << "Failed to access incident service." << endmsg;
}
return sc;
}
virtual StatusCode DataSvc::initialize ( )
virtual

Service initialization.

Reimplemented from Service.

Reimplemented in HistogramSvc, NTupleSvc, DetDataSvc, TagCollectionSvc, RecordDataSvc, and EvtDataSvc.

virtual StatusCode DataSvc::linkObject ( IRegistry from,
const std::string &  objPath,
DataObject to 
)
virtual

Add a link to another object.

StatusCode DataSvc::linkObject ( IRegistry from,
const std::string &  objPath,
DataObject to 
)
virtual

Add a link to another object.

Definition at line 1001 of file DataSvc.cpp.

{
if ( checkRoot() ) {
try {
RegEntry* from_entry = CAST_REGENTRY(RegEntry*,from);
if ( from_entry ) {
// First check if both objects are already registered to the store
RegEntry* to_entry = m_root->findLeaf(to);
if ( !to_entry ) {
return INVALID_OBJECT;
}
else {
std::string::size_type sep = objPath.rfind(SEPARATOR);
if ( sep > 0 && sep != std::string::npos ) { // in case the objPath is a sub-directory itself
DataObject* pO = nullptr;
StatusCode sc = retrieveObject(from, objPath.substr(0,sep), pO);
if ( sc.isSuccess() ) {
sc = linkObject(pO->registry(), objPath.substr(sep), to);
}
return sc;
}
// Now register the soft link
StatusCode status = from_entry->add( objPath, to, true);
return status.isSuccess() ?
IDataProviderSvc_NO_ERROR : DOUBL_OBJ_PATH;
}
}
}
catch (...) {
}
return INVALID_PARENT;
}
return INVALID_ROOT;
}
virtual StatusCode DataSvc::linkObject ( const std::string &  fromPath,
const std::string &  objPath,
DataObject to 
)
virtual

Add a link to another object.

StatusCode DataSvc::linkObject ( const std::string &  fromPath,
const std::string &  objPath,
DataObject to 
)
virtual

Add a link to another object.

Definition at line 1050 of file DataSvc.cpp.

{
DataObject* pO = nullptr;
StatusCode status = retrieveObject(from, pO);
if ( status.isSuccess() ) {
return linkObject(pO->registry(), objPath, to);
}
return status;
}
virtual StatusCode DataSvc::linkObject ( DataObject from,
const std::string &  objPath,
DataObject to 
)
virtual

Add a link to another object.

StatusCode DataSvc::linkObject ( DataObject from,
const std::string &  objPath,
DataObject to 
)
virtual

Add a link to another object.

Definition at line 1062 of file DataSvc.cpp.

{
if ( from ) {
IRegistry* from_entry = from->registry();
if ( from_entry ) {
return linkObject( from_entry, objPath, to);
}
}
return INVALID_PARENT;
}
virtual StatusCode DataSvc::linkObject ( const std::string &  fullPath,
DataObject to 
)
virtual

Add a link to another object.

StatusCode DataSvc::linkObject ( const std::string &  fullPath,
DataObject to 
)
virtual

Add a link to another object.

Definition at line 1037 of file DataSvc.cpp.

{
if ( !fullPath.empty() ) {
if ( fullPath.front() != SEPARATOR ) {
return linkObject(m_rootName, fullPath, to);
}
auto sep = fullPath.rfind(SEPARATOR);
return linkObject( fullPath.substr( 0, sep), fullPath.substr(sep), to);
}
return INVALID_OBJ_PATH;
}
StatusCode DataSvc::loadObject ( IRegistry pNode)
protectedvirtual

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

Definition at line 601 of file DataSvc.cpp.

{
IConversionSvc* pLoader = getDataLoader(pRegistry);
return loadObject(pLoader, pRegistry);
}
virtual StatusCode DataSvc::loadObject ( IRegistry pNode)
protectedvirtual

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

virtual StatusCode DataSvc::loadObject ( IConversionSvc pLoader,
IRegistry pNode 
)
protectedvirtual

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

StatusCode DataSvc::loadObject ( IConversionSvc pLoader,
IRegistry pNode 
)
protectedvirtual

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

Definition at line 609 of file DataSvc.cpp.

{
StatusCode status = INVALID_OBJ_ADDR;
DataObject* pObject = nullptr;
if ( !pLoader ) { // Precondition: Data loader must be present
if (handleDataFault(pRegistry)) return SUCCESS;
else return NO_DATA_LOADER;
}
if ( !pRegistry ) { // Precondition: Directory must be valid
if (handleDataFault(pRegistry)) return SUCCESS;
else return INVALID_OBJ_ADDR;
}
VERMSG << "Requested object " << pRegistry->identifier() << endmsg;
// Fire data access incident
DataIncident incident(name(), m_accessName, pRegistry->identifier());
}
if ( !m_inhibitPathes.empty() ) {
auto inhibit = std::find(m_inhibitPathes.begin(), m_inhibitPathes.end(),
pRegistry->identifier());
if ( inhibit != m_inhibitPathes.end() ) {
return NO_ACCESS;
}
}
IOpaqueAddress* pAddress = pRegistry->address();
if ( !pAddress ) { // Precondition:
return INVALID_OBJ_ADDR; // Address must be valid
}
try {
status = pLoader->createObj(pAddress, pObject); // Call data loader
if ( status.isSuccess() ) {
VERMSG << "Object " << pRegistry->identifier() << " created" << endmsg;
RegEntry *pEntry = CAST_REGENTRY(RegEntry*,pRegistry);
pEntry->setObject(pObject);
VERMSG << "Filling object " << pRegistry->identifier() << endmsg;
status = pLoader->fillObjRefs(pAddress, pObject);
}
}
catch( const GaudiException& exc ) {
if ( handleDataFault(pRegistry) ) {
return SUCCESS;
}
throw GaudiException("GaudiException in loadObject() " + pRegistry->identifier(),
}
catch( const std::exception& x) {
if ( handleDataFault(pRegistry) ) {
return SUCCESS;
}
throw GaudiException("std::exception in loadObject() " + pRegistry->identifier() +
": " + System::typeinfoName(typeid(x)) + ", " + x.what(),
}
catch(...) {
if ( handleDataFault(pRegistry) ) {
return SUCCESS;
}
throw GaudiException("UNKN exception in loadObject() " + pRegistry->identifier(),
}
if ( !status.isSuccess() ) {
if ( handleDataFault(pRegistry) ) {
}
}
ON_VERBOSE if ( status.isSuccess() ) {
verbose() << "Object " << pRegistry->identifier() << " successfully loaded" << endmsg;
}
return status;
}
virtual StatusCode DataSvc::objectLeaves ( const DataObject pObject,
std::vector< IRegistry * > &  refLeaves 
)
virtual

IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object.

StatusCode DataSvc::objectLeaves ( const DataObject pObject,
std::vector< IRegistry * > &  refLeaves 
)
virtual

IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object.

IDataManagerSvc: Explore an object identified by its pointer.

Definition at line 230 of file DataSvc.cpp.

{
if ( !pObject ) return INVALID_OBJECT;
return objectLeaves(pObject->registry(), leaves);
}
StatusCode DataSvc::objectLeaves ( const IRegistry pRegistry,
std::vector< IRegistry * > &  refLeaves 
)
virtual

IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object.

IDataManagerSvc: Explore an object identified by the pointer to the registry entry.

Definition at line 239 of file DataSvc.cpp.

{
if ( !checkRoot() ) return INVALID_ROOT;
const RegEntry* node_entry = CAST_REGENTRY(const RegEntry*,pRegistry);
if ( !node_entry ) return INVALID_OBJECT;
leaves = node_entry->leaves();
}
virtual StatusCode DataSvc::objectLeaves ( const IRegistry pRegistry,
std::vector< IRegistry * > &  refLeaves 
)
virtual

IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object.

StatusCode DataSvc::objectParent ( const DataObject pObject,
IRegistry *&  refpParent 
)
virtual

IDataManagerSvc: Explore the object store: retrieve the object's parent.

Definition at line 214 of file DataSvc.cpp.

{
if ( !pObject ) return INVALID_OBJECT;
return objectParent(pObject->registry(), refpParent);
}
virtual StatusCode DataSvc::objectParent ( const DataObject pObject,
IRegistry *&  refpParent 
)
virtual

IDataManagerSvc: Explore the object store: retrieve the object's parent.

virtual StatusCode DataSvc::objectParent ( const IRegistry pRegistry,
IRegistry *&  refpParent 
)
virtual

IDataManagerSvc: Explore the object store: retrieve the object's parent.

StatusCode DataSvc::objectParent ( const IRegistry pRegistry,
IRegistry *&  refpParent 
)
virtual

IDataManagerSvc: Explore the object store: retrieve the object's parent.

Definition at line 220 of file DataSvc.cpp.

{
if ( !checkRoot() ) return INVALID_ROOT;
const RegEntry* node_entry = CAST_REGENTRY(const RegEntry*,pRegistry);
if ( !node_entry ) return INVALID_OBJECT;
refpParent = node_entry->parent();
}
DataSvc& DataSvc::operator= ( const DataSvc )
private

Fake assignment operator (never implemented).

DataSvc& DataSvc::operator= ( const DataSvc )
private

Fake assignment operator (never implemented).

virtual StatusCode DataSvc::preLoad ( int  depth,
int  load_depth,
DataObject pObject 
)
virtual

Execute one level of preloading and recursively load until the final level is reached.

Parameters
depthcurrent level of loading from requested parent
load_depthmaximum level of object loading
pObjectpointer to next level root object
Returns
Status code indicating success or failure.
StatusCode DataSvc::preLoad ( int  depth,
int  load_depth,
DataObject pObject 
)
virtual

Execute one level of preloading and recursively load until the final level is reached.

Preload one level deep, then recursively call the next level.

Parameters
depthcurrent level of loading from requested parent
load_depthmaximum level of object loading
pObjectpointer to next level root object
Returns
Status code indicating success or failure.

Definition at line 1170 of file DataSvc.cpp.

{
//unused: StatusCode sc = StatusCode::FAILURE;
if ( pObject && depth++ < load_depth ) {
RegEntry* dir = CAST_REGENTRY(RegEntry*,pObject->registry());
if ( dir ) {
for (const auto& i : *dir) {
DataObject *pObj = nullptr;
StatusCode status = retrieveObject(pObject, i->name(), pObj);
if ( status.isSuccess() && depth < load_depth ) {
preLoad(depth, load_depth, pObj).ignore();
}
}
}
}
}
virtual StatusCode DataSvc::preLoad ( )
virtual

load all preload items of the list

StatusCode DataSvc::preLoad ( )
virtual

load all preload items of the list

Definition at line 1188 of file DataSvc.cpp.

{
DataObject* pObj = nullptr;
for (const auto& i : m_preLoads ) {
StatusCode sc = retrieveObject( i.path(), pObj);
int load_depth = i.depth();
if ( sc.isSuccess() && load_depth > 1 ) {
preLoad(1, load_depth, pObj).ignore();
}
}
}
virtual StatusCode DataSvc::registerAddress ( const std::string &  fullPath,
IOpaqueAddress pAddress 
)
virtual

IDataManagerSvc: Register object address with the data store.

StatusCode DataSvc::registerAddress ( const std::string &  fullPath,
IOpaqueAddress pAddress 
)
virtual

IDataManagerSvc: Register object address with the data store.

Definition at line 249 of file DataSvc.cpp.

{
if ( fullPath.empty() ) return INVALID_OBJ_PATH;
return registerAddress( fullPath.front() != SEPARATOR ? m_root : nullptr,
fullPath, pAddress);
}
StatusCode DataSvc::registerAddress ( DataObject parentObj,
const std::string &  objectPath,
IOpaqueAddress pAddress 
)
virtual

IDataManagerSvc: Register object address with the data store.

Definition at line 257 of file DataSvc.cpp.

{
IRegistry* pRegistry = ( parentObj ? parentObj->registry() : nullptr );
return registerAddress(pRegistry, objectPath, pAddress);
}
virtual StatusCode DataSvc::registerAddress ( DataObject parentObj,
const std::string &  objectPath,
IOpaqueAddress pAddress 
)
virtual

IDataManagerSvc: Register object address with the data store.

StatusCode DataSvc::registerAddress ( IRegistry parentObj,
const std::string &  objectPath,
IOpaqueAddress pAddress 
)
virtual

IDataManagerSvc: Register object address with the data store.

Definition at line 265 of file DataSvc.cpp.

{
if ( !checkRoot() ) return INVALID_ROOT;
if ( objPath.empty() ) return INVALID_OBJ_PATH;
if ( !parentObj ) {
if ( objPath.front() != SEPARATOR ) {
return registerAddress(m_root, objPath, pAddress);
}
std::string::size_type sep = objPath.find(SEPARATOR,1);
if ( sep == std::string::npos ) {
return INVALID_PARENT;
}
if ( objPath.compare(0,sep,m_rootName) == 0 ) {
return registerAddress(m_root, objPath.substr(sep), pAddress);
}
}
if ( objPath.front() != SEPARATOR ) {
return registerAddress(parentObj, char(SEPARATOR)+objPath, pAddress);
}
RegEntry* par_entry = CAST_REGENTRY(RegEntry*,parentObj);
if ( !par_entry ) return INVALID_PARENT;
std::string::size_type sep = objPath.rfind(SEPARATOR);
if ( sep > 0 && sep != std::string::npos ) {
auto p_path = objPath.substr( 0, sep);
auto o_path = objPath.substr( sep );
RegEntry* p_entry = par_entry->findLeaf(p_path);
// Create default object leafs if the
// intermediate nodes are not present
if ( 0 == p_entry && m_forceLeaves ) {
p_path,
pLeaf);
if ( sc.isFailure() ) delete pLeaf;
p_entry = par_entry->findLeaf(p_path);
}
if ( !p_entry ) return INVALID_PARENT;
return registerAddress(p_entry, o_path, pAddress);
}
StatusCode status = par_entry->add(objPath, pAddress);
return status.isSuccess() ? status : DOUBL_OBJ_PATH;
}
virtual StatusCode DataSvc::registerAddress ( IRegistry parentObj,
const std::string &  objectPath,
IOpaqueAddress pAddress 
)
virtual

IDataManagerSvc: Register object address with the data store.

virtual StatusCode DataSvc::registerObject ( const std::string &  fullPath,
DataObject pObject 
)
virtual

Register object with the data store.

StatusCode DataSvc::registerObject ( const std::string &  fullPath,
DataObject pObject 
)
virtual

Register object with the data store.

Definition at line 361 of file DataSvc.cpp.

{
return registerObject(nullptr, fullPath, pObject);
}
StatusCode DataSvc::registerObject ( const std::string &  parentPath,
const std::string &  objPath,
DataObject pObject 
)
virtual

Register object with the data store.

Definition at line 368 of file DataSvc.cpp.

{
DataObject* pO = nullptr;
StatusCode status = retrieveObject(parentPath, pO);
if ( !status.isSuccess() && m_forceLeaves ) {
status = registerObject(parentPath, pO);
if ( !status.isSuccess() ) pO->release();
}
if ( status.isFailure() ) return status;
return registerObject(pO, objPath, pObject);
}
virtual StatusCode DataSvc::registerObject ( const std::string &  parentPath,
const std::string &  objPath,
DataObject pObject 
)
virtual

Register object with the data store.

StatusCode DataSvc::registerObject ( const std::string &  parentPath,
int  item,
DataObject pObject 
)
virtual

Register object with the data store.

Definition at line 383 of file DataSvc.cpp.

{
return registerObject(parentPath, itemToPath(item), pObject);
}
virtual StatusCode DataSvc::registerObject ( const std::string &  parentPath,
int  item,
DataObject pObject 
)
virtual

Register object with the data store.

StatusCode DataSvc::registerObject ( DataObject parentObj,
const std::string &  objPath,
DataObject pObject 
)
virtual

Register object with the data store.

Definition at line 397 of file DataSvc.cpp.

{
if ( !checkRoot() ) return INVALID_ROOT;
if ( !parentObj ) {
if ( !objPath.empty() ) {
if ( objPath.front() == SEPARATOR ) {
std::string::size_type sep = objPath.find(SEPARATOR,1);
if ( sep != std::string::npos ) {
return registerObject(objPath.substr( 0, sep), objPath.substr( sep ), pObject);
}
}
else {
return registerObject(m_rootName, objPath, pObject);
}
}
return INVALID_OBJ_PATH;
}
RegEntry* node_entry = CAST_REGENTRY(RegEntry*,parentObj->registry());
if ( node_entry ) {
StatusCode status = INVALID_PARENT;
std::string::size_type sep = objPath.find(SEPARATOR,1);
if ( sep != std::string::npos ) {
auto p_path = objPath.substr( 0, sep );
auto o_path = objPath.substr( sep );
RegEntry* par_entry = node_entry->findLeaf(p_path);
// Create default object leafs if the
// intermediate nodes are not present
if ( 0 == par_entry && m_forceLeaves ) {
StatusCode sc = registerObject(parentObj, p_path, pLeaf);
if ( ! sc.isSuccess() ) {
delete pLeaf;
}
par_entry = node_entry->findLeaf(p_path);
}
else if ( 0 != par_entry && par_entry->object() == 0 ) {
status = i_retrieveEntry( node_entry, p_path, par_entry);
if ( !status.isSuccess() && !par_entry->address() && m_forceLeaves ) {
StatusCode sc = registerObject(parentObj, p_path, pLeaf);
if ( ! sc.isSuccess() ) {
delete pLeaf;
}
par_entry = node_entry->findLeaf(p_path);
}
}
node_entry = par_entry;
if ( node_entry ) {
DataObject* obj = node_entry->object();
if ( obj ) {
status = registerObject( obj, o_path, pObject );
}
}
}
else {
RegEntry* leaf = node_entry->findLeaf(objPath);
if ( !leaf ) {
status = node_entry->add( objPath, pObject );
}
else {
DataObject* obj = leaf->object();
if ( !obj ) {
if ( !pObject ) {
error() << "registerObject: trying to register null DataObject" << endmsg;
}
else {
pObject->setRegistry(leaf);
}
leaf->setAddress(0);
leaf->setObject(pObject);
}
else {
status = DOUBL_OBJ_PATH;
}
}
}
return status;
}
return INVALID_PARENT;
}
virtual StatusCode DataSvc::registerObject ( DataObject parentObj,
const std::string &  objPath,
DataObject pObject 
)
virtual

Register object with the data store.

StatusCode DataSvc::registerObject ( DataObject parentObj,
int  item,
DataObject pObject 
)
virtual

Register object with the data store.

Definition at line 390 of file DataSvc.cpp.

{
return registerObject(parentObj, itemToPath(item), pObject);
}
virtual StatusCode DataSvc::registerObject ( DataObject parentObj,
int  item,
DataObject pObject 
)
virtual

Register object with the data store.

StatusCode DataSvc::reinitialize ( )
virtual

Service initialization.

Service reinitialization.

Reimplemented from Service.

Reimplemented in HistogramSvc, NTupleSvc, DetDataSvc, RecordDataSvc, and EvtDataSvc.

Definition at line 1215 of file DataSvc.cpp.

{
// the finalize part is copied here
setDataLoader(nullptr).ignore();
if ( m_incidentSvc ) {
m_incidentSvc = nullptr;
}
// re-initialize the base class
if ( UNLIKELY(!sc.isSuccess()) ) {
error() << "Unable to reinitialize base class" << endmsg;
return sc;
}
// the initialize part is copied here
sc = service("IncidentSvc", m_incidentSvc, true);
if ( UNLIKELY(!sc.isSuccess()) ) {
error() << "Failed to access incident service." << endmsg;
return sc;
}
// return
}
virtual StatusCode DataSvc::reinitialize ( )
virtual

Service initialization.

Reimplemented from Service.

Reimplemented in HistogramSvc, NTupleSvc, DetDataSvc, RecordDataSvc, and EvtDataSvc.

virtual StatusCode DataSvc::removePreLoadItem ( const DataStoreItem item)
virtual

Remove an item from the preload list.

StatusCode DataSvc::removePreLoadItem ( const DataStoreItem item)
virtual

Remove an item from the preload list.

Definition at line 1152 of file DataSvc.cpp.

StatusCode DataSvc::removePreLoadItem ( const std::string &  itemPath)
virtual

Add an item to the preload list.

Definition at line 1159 of file DataSvc.cpp.

{
return removePreLoadItem( DataStoreItem(itemPath,1) );
}
virtual StatusCode DataSvc::removePreLoadItem ( const std::string &  itemPath)
virtual

Add an item to the preload list.

virtual StatusCode DataSvc::resetPreLoad ( )
virtual

Clear the preload list.

StatusCode DataSvc::resetPreLoad ( )
virtual

Clear the preload list.

Definition at line 1164 of file DataSvc.cpp.

{
m_preLoads.erase(std::begin(m_preLoads), std::end(m_preLoads));
}
StatusCode DataSvc::retrieveEntry ( DataSvcHelpers::RegistryEntry pNode,
const std::string &  path,
DataSvcHelpers::RegistryEntry *&  pEntry 
)
protected

Retrieve registry entry from store.

StatusCode DataSvc::retrieveEntry ( DataSvcHelpers::RegistryEntry pNode,
const std::string &  path,
DataSvcHelpers::RegistryEntry *&  pEntry 
)
protected

Retrieve registry entry from store.

Definition at line 686 of file DataSvc.cpp.

{
return i_retrieveEntry(parentObj,path,pEntry);
}
StatusCode DataSvc::retrieveObject ( IRegistry pDirectory,
const std::string &  path,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

Retrieve object identified by its directory from the data store.

Definition at line 782 of file DataSvc.cpp.

{
pObject = nullptr;
RegEntry *result = nullptr, *parent = CAST_REGENTRY(RegEntry*,pRegistry);
StatusCode status = i_retrieveEntry(parent, path, result);
if ( status.isSuccess() ) {
pObject = result->object();
}
return status;
}
virtual StatusCode DataSvc::retrieveObject ( IRegistry pDirectory,
const std::string &  path,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

StatusCode DataSvc::retrieveObject ( const std::string &  fullPath,
DataObject *&  pObject 
)
virtual

Retrieve object identified by its full path from the data store.

Definition at line 795 of file DataSvc.cpp.

{
IRegistry* nullDir = nullptr;
return retrieveObject(nullDir, fullPath, pObject);
}
virtual StatusCode DataSvc::retrieveObject ( const std::string &  fullPath,
DataObject *&  pObject 
)
virtual

Retrieve object identified by its full path from the data store.

StatusCode DataSvc::retrieveObject ( const std::string &  parentPath,
const std::string &  objPath,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

Retrieve object identified by its full path from the data store.

Definition at line 802 of file DataSvc.cpp.

{
DataObject* parent = nullptr;
StatusCode status = retrieveObject(parentPath, parent);
if ( status.isSuccess() ) {
status = retrieveObject (parent, objectPath, pObject);
}
return status;
}
virtual StatusCode DataSvc::retrieveObject ( const std::string &  parentPath,
const std::string &  objPath,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

StatusCode DataSvc::retrieveObject ( const std::string &  parentPath,
int  item,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

Retrieve object identified by its full path from the data store.

Definition at line 814 of file DataSvc.cpp.

{
return retrieveObject(parentPath, itemToPath(item), pObject);
}
virtual StatusCode DataSvc::retrieveObject ( const std::string &  parentPath,
int  item,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

StatusCode DataSvc::retrieveObject ( DataObject parentObj,
const std::string &  objPath,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

Definition at line 821 of file DataSvc.cpp.

{
IRegistry* pRegistry = (parentObj ? parentObj->registry() : nullptr);
return retrieveObject(pRegistry, path, pObject);
}
virtual StatusCode DataSvc::retrieveObject ( DataObject parentObj,
const std::string &  objPath,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

virtual StatusCode DataSvc::retrieveObject ( DataObject parentObj,
int  item,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

StatusCode DataSvc::retrieveObject ( DataObject parentObj,
int  item,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

Retrieve registry entry from store.

Definition at line 829 of file DataSvc.cpp.

{
return retrieveObject(parentObj, itemToPath(item), pObject);
}
virtual CLID DataSvc::rootCLID ( ) const
virtual

IDataManagerSvc: Accessor for root event CLID.

CLID DataSvc::rootCLID ( ) const
virtual

IDataManagerSvc: Accessor for root event CLID.

CLID for root Event.

Definition at line 1254 of file DataSvc.cpp.

{
return( (CLID)m_rootCLID );
}
std::string DataSvc::rootName ( ) const
virtual

IDataManagerSvc: Accessor for root event name.

Name for root Event.

Definition at line 1259 of file DataSvc.cpp.

{
return( m_rootName );
}
virtual std::string DataSvc::rootName ( ) const
virtual

IDataManagerSvc: Accessor for root event name.

virtual StatusCode DataSvc::setDataLoader ( IConversionSvc svc)
virtual

IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service.

StatusCode DataSvc::setDataLoader ( IConversionSvc svc)
virtual

IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service.

IDataManagerSvc: Pass a default data loader to the service.

Definition at line 203 of file DataSvc.cpp.

{
if ( pDataLoader ) pDataLoader->addRef();
if ( pDataLoader ) {
pDataLoader->setDataProvider(this).ignore();
}
m_dataLoader = pDataLoader;
return SUCCESS;
}
virtual StatusCode DataSvc::setRoot ( const std::string &  root_name,
DataObject pRootObj 
)
virtual

Initialize data store for new event by giving new event path and root object.

Takes care to clear the store before reinitializing it

StatusCode DataSvc::setRoot ( const std::string &  root_path,
DataObject pRootObj 
)
virtual

Initialize data store for new event by giving new event path and root object.

Takes care to clear the store before reinitializing it

Definition at line 154 of file DataSvc.cpp.

{
return i_setRoot (root_path, pRootObj);
}
StatusCode DataSvc::setRoot ( const std::string &  root_path,
IOpaqueAddress pRootAddr 
)
virtual

Initialize data store for new event by giving new event path and address of root object.

Takes care to clear the store before reinitializing it

Definition at line 180 of file DataSvc.cpp.

{
return i_setRoot (root_path, pRootAddr);
}
virtual StatusCode DataSvc::setRoot ( const std::string &  root_path,
IOpaqueAddress pRootAddr 
)
virtual

Initialize data store for new event by giving new event path and address of root object.

Takes care to clear the store before reinitializing it

StatusCode DataSvc::traverseSubTree ( const std::string &  sub_tree_path,
IDataStoreAgent pAgent 
)
virtual

IDataManagerSvc: Analyze by traversing all data objects below the sub tree identified by its full path name.

IDataManagerSvc: Analyse by traversing all data objects below the sub tree identified by its full path name.

Definition at line 127 of file DataSvc.cpp.

{
DataObject* pO = nullptr;
StatusCode status = findObject(sub_tree_path, pO);
if ( status.isFailure() ) return status;
return traverseSubTree(pO, pAgent);
}
virtual StatusCode DataSvc::traverseSubTree ( const std::string &  sub_tree_path,
IDataStoreAgent pAgent 
)
virtual

IDataManagerSvc: Analyze by traversing all data objects below the sub tree identified by its full path name.

virtual StatusCode DataSvc::traverseSubTree ( DataObject pObject,
IDataStoreAgent pAgent 
)
virtual

IDataManagerSvc: Analyze by traversing all data objects below the sub tree.

StatusCode DataSvc::traverseSubTree ( DataObject pObject,
IDataStoreAgent pAgent 
)
virtual

IDataManagerSvc: Analyze by traversing all data objects below the sub tree.

IDataManagerSvc: Analyse by traversing all data objects below the sub tree.

Definition at line 136 of file DataSvc.cpp.

{
if ( !checkRoot() ) return INVALID_ROOT;
RegEntry* entry = CAST_REGENTRY(RegEntry*,pObject->registry());
if ( !entry ) return INVALID_OBJECT;
return entry->traverseTree(pAgent);
}
virtual StatusCode DataSvc::traverseTree ( IDataStoreAgent pAgent)
virtual

IDataManagerSvc: Analyze by traversing all data objects in the data store.

StatusCode DataSvc::traverseTree ( IDataStoreAgent pAgent)
virtual

IDataManagerSvc: Analyze by traversing all data objects in the data store.

IDataManagerSvc: Analyse by traversing all data objects in the data store.

Definition at line 145 of file DataSvc.cpp.

{
if ( !checkRoot() ) return INVALID_ROOT;
return m_root->traverseTree(pAgent);
}
virtual StatusCode DataSvc::unlinkObject ( IRegistry from,
const std::string &  objPath 
)
virtual

Remove a link to another object.

StatusCode DataSvc::unlinkObject ( IRegistry from,
const std::string &  objPath 
)
virtual

Remove a link to another object.

Definition at line 1075 of file DataSvc.cpp.

{
if ( checkRoot() ) {
try {
RegEntry* from_entry = CAST_REGENTRY(RegEntry*,from);
if ( from_entry ) {
std::string::size_type sep = objPath.rfind(SEPARATOR);
if ( sep > 0 && sep != std::string::npos ) { // in case the objPath is a sub-directory itself
DataObject* pO = nullptr;
StatusCode sc = findObject(from, objPath.substr(0,sep), pO);
if ( sc.isSuccess() ) {
sc = unlinkObject(pO->registry(), objPath.substr(sep));
}
return sc;
}
StatusCode status = from_entry->remove( objPath );
if ( status.isSuccess() ) {
return status;
}
return INVALID_OBJ_PATH;
}
}
catch (...) {
}
return INVALID_PARENT;
}
return INVALID_ROOT;
}
virtual StatusCode DataSvc::unlinkObject ( const std::string &  fromPath,
const std::string &  objPath 
)
virtual

Remove a link to another object.

StatusCode DataSvc::unlinkObject ( const std::string &  fromPath,
const std::string &  objPath 
)
virtual

Remove a link to another object.

Definition at line 1117 of file DataSvc.cpp.

{
DataObject* pObject = nullptr;
StatusCode status = findObject(from, pObject);
if ( status.isSuccess() ) {
status = unlinkObject(pObject->registry(), objPath);
}
return status;
}
virtual StatusCode DataSvc::unlinkObject ( DataObject fromObj,
const std::string &  objPath 
)
virtual

Remove a link to another object.

StatusCode DataSvc::unlinkObject ( DataObject fromObj,
const std::string &  objPath 
)
virtual

Remove a link to another object.

Definition at line 1128 of file DataSvc.cpp.

{
if ( checkRoot() ) {
IRegistry* from_entry = m_root->findLeaf(from);
return unlinkObject(from_entry, objPath);
}
return INVALID_ROOT;
}
virtual StatusCode DataSvc::unlinkObject ( const std::string &  fullPath)
virtual

Remove a link to another object.

StatusCode DataSvc::unlinkObject ( const std::string &  fullPath)
virtual

Remove a link to another object.

Definition at line 1105 of file DataSvc.cpp.

{
if ( !fullPath.empty() ) {
if ( fullPath.front() != SEPARATOR ) {
return unlinkObject(m_rootName, fullPath);
}
auto sep = fullPath.rfind(SEPARATOR);
return unlinkObject(fullPath.substr(0,sep), fullPath.substr(sep));
}
return INVALID_OBJ_PATH;
}
virtual StatusCode DataSvc::unregisterAddress ( const std::string &  fullPath)
virtual

IDataManagerSvc: Unregister object address from the data store.

StatusCode DataSvc::unregisterAddress ( const std::string &  fullPath)
virtual

IDataManagerSvc: Unregister object address from the data store.

Definition at line 312 of file DataSvc.cpp.

{
if ( fullPath.empty() ) return INVALID_OBJ_PATH;
return unregisterAddress( fullPath.front() != SEPARATOR ? m_root : nullptr,
fullPath );
}
virtual StatusCode DataSvc::unregisterAddress ( DataObject pParent,
const std::string &  objPath 
)
virtual

IDataManagerSvc: Unregister object address from the data store.

StatusCode DataSvc::unregisterAddress ( DataObject pParent,
const std::string &  objPath 
)
virtual

IDataManagerSvc: Unregister object address from the data store.

Definition at line 319 of file DataSvc.cpp.

{
return unregisterAddress( pParent ? pParent->registry() : nullptr,
objPath);
}
StatusCode DataSvc::unregisterAddress ( IRegistry pParent,
const std::string &  objPath 
)
virtual

IDataManagerSvc: Unregister object address from the data store.

Definition at line 326 of file DataSvc.cpp.

{
if ( !checkRoot() ) return INVALID_ROOT;
if ( objPath.empty() ) return INVALID_OBJ_PATH;
if ( !pParent ) {
if ( objPath.front() != SEPARATOR ) {
return unregisterAddress(m_root, objPath);
}
std::string::size_type sep = objPath.find(SEPARATOR,1);
if ( sep != std::string::npos &&
objPath.compare( 0, sep, m_rootName) == 0 ) {
return unregisterAddress(m_root, objPath.substr(sep));
}
return INVALID_PARENT;
}
if ( objPath.front() != SEPARATOR ) {
return unregisterAddress(pParent, char(SEPARATOR)+objPath);
}
RegEntry* node_entry = CAST_REGENTRY(RegEntry*,pParent);
if ( node_entry ) {
RegEntry* leaf_entry = node_entry->findLeaf(objPath);
if ( leaf_entry ) {
std::string::size_type sep = objPath.rfind(SEPARATOR);
if ( sep > 0 && sep != std::string::npos ) {
return unregisterAddress(leaf_entry->parent(), objPath.substr(sep));
}
StatusCode status = node_entry->remove(objPath);
if ( status.isSuccess() ) return status;
}
}
return INVALID_PARENT;
}
virtual StatusCode DataSvc::unregisterAddress ( IRegistry pParent,
const std::string &  objPath 
)
virtual

IDataManagerSvc: Unregister object address from the data store.

virtual StatusCode DataSvc::unregisterObject ( const std::string &  fullPath)
virtual

Unregister object from the data store.

StatusCode DataSvc::unregisterObject ( const std::string &  fullPath)
virtual

Unregister object from the data store.

Definition at line 483 of file DataSvc.cpp.

{
DataObject* pObject = nullptr;
StatusCode status = findObject(fullPath, pObject);
if ( status.isFailure() ) return status;
RegEntry* pEntry = CAST_REGENTRY(RegEntry*,pObject->registry());
if ( !pEntry ) return INVALID_ROOT;
if ( !pEntry->isEmpty() ) return DIR_NOT_EMPTY;
RegEntry* pParent = pEntry->parentEntry();
if ( !pParent ) return INVALID_PARENT;
if ( pObject ) pObject->addRef();
pParent->remove(pEntry);
}
StatusCode DataSvc::unregisterObject ( const std::string &  parentPath,
const std::string &  objectPath 
)
virtual

Unregister object from the data store.

Definition at line 501 of file DataSvc.cpp.

{
DataObject* pO = nullptr;
StatusCode status = findObject(parentPath, pO);
if ( status.isFailure() ) return status;
return unregisterObject(pO, objPath);
}
virtual StatusCode DataSvc::unregisterObject ( const std::string &  parentPath,
const std::string &  objectPath 
)
virtual

Unregister object from the data store.

virtual StatusCode DataSvc::unregisterObject ( const std::string &  parentPath,
int  item 
)
virtual

Unregister object from the data store.

StatusCode DataSvc::unregisterObject ( const std::string &  parentPath,
int  item 
)
virtual

Unregister object from the data store.

Definition at line 510 of file DataSvc.cpp.

{
return unregisterObject(parentPath, itemToPath(item));
}
virtual StatusCode DataSvc::unregisterObject ( DataObject pObject)
virtual

Unregister object from the data store.

StatusCode DataSvc::unregisterObject ( DataObject pObject)
virtual

Unregister object from the data store.

Definition at line 515 of file DataSvc.cpp.

{
if ( !checkRoot() ) return INVALID_ROOT;
RegEntry* entry = m_root->findLeaf(pObject);
if ( !entry ) return INVALID_OBJECT;
RegEntry* parent = entry->parentEntry();
if ( !parent ) return INVALID_PARENT;
if ( !entry->isEmpty() ) return DIR_NOT_EMPTY;
if ( entry->object() ) entry->object()->addRef();
if ( parent ) parent->remove(entry);
return SUCCESS;
}
StatusCode DataSvc::unregisterObject ( DataObject pObject,
const std::string &  objectPath 
)
virtual

Unregister object from the data store.

Definition at line 528 of file DataSvc.cpp.

{
if ( checkRoot() ) {
try {
RegEntry* parent = CAST_REGENTRY(RegEntry*,pParentObj->registry());
if ( parent ) {
RegEntry* entry = parent->findLeaf(objectPath);
if ( entry ) {
if ( entry->isEmpty() ) {
if ( entry->object() ) {
entry->object()->addRef();
}
parent->remove(entry);
return SUCCESS;
}
return DIR_NOT_EMPTY;
}
return INVALID_OBJECT;
}
}
catch(...) {
}
return INVALID_PARENT;
}
return INVALID_ROOT;
}
virtual StatusCode DataSvc::unregisterObject ( DataObject pObject,
const std::string &  objectPath 
)
virtual

Unregister object from the data store.

virtual StatusCode DataSvc::unregisterObject ( DataObject pObject,
int  item 
)
virtual

Unregister object from the data store.

StatusCode DataSvc::unregisterObject ( DataObject pObject,
int  item 
)
virtual

Unregister object from the data store.

Definition at line 556 of file DataSvc.cpp.

{
return unregisterObject(pParentObj, itemToPath(item));
}
virtual StatusCode DataSvc::updateObject ( IRegistry pDirectory)
virtual

Update object identified by its directory entry.

StatusCode DataSvc::updateObject ( IRegistry pDirectory)
virtual

Update object identified by its directory entry.

Update object.

Definition at line 915 of file DataSvc.cpp.

{
if ( !pRegistry ) { // Precondition:
return INVALID_OBJ_ADDR; // Addres must be valid
}
DataObject* toUpdate = pRegistry->object();
if ( !toUpdate ) { // Try first to load
return loadObject(pRegistry);
}
return updateObject(toUpdate);
}
virtual StatusCode DataSvc::updateObject ( const std::string &  updatePath)
virtual

Update object.

StatusCode DataSvc::updateObject ( const std::string &  updatePath)
virtual

Update object.

Definition at line 905 of file DataSvc.cpp.

{
DataObject* pO = nullptr;
StatusCode status = findObject(updatePath, pO);
if ( status.isSuccess() ) {
return updateObject(pO);
}
return retrieveObject(updatePath, pO);
}
StatusCode DataSvc::updateObject ( DataObject toUpdate)
virtual

Update object.

Reimplemented in DetDataSvc.

Definition at line 927 of file DataSvc.cpp.

{
StatusCode status = INVALID_OBJ_ADDR;
if ( !toUpdate ) { // Precondition:
return INVALID_OBJECT; // Address must be valid
}
IRegistry* pRegistry = toUpdate->registry(); // Precondition:
if ( !pRegistry ) { // Need valid registry
return INVALID_OBJECT;
}
IOpaqueAddress* pAddress = pRegistry->address(); // Precondition:
if ( !pAddress ) { // Need valid address
return INVALID_OBJ_ADDR;
}
IConversionSvc* pLoader = getDataLoader(pRegistry);
if ( !pLoader ) { // Precondition:
return NO_DATA_LOADER; // Data loader must be present
}
if ( !m_inhibitPathes.empty() ) {
auto inhibit = std::find( m_inhibitPathes.begin(), m_inhibitPathes.end(),
pRegistry->identifier());
if ( inhibit != m_inhibitPathes.end() ) {
return NO_ACCESS;
}
}
try {
status = pLoader->updateObj(pAddress, toUpdate); // Call data loader
if ( status.isSuccess() ) {
status = pLoader->updateObjRefs(pAddress, toUpdate);
}
}
catch( const GaudiException& exc ) {
throw GaudiException("GaudiException in updateObject() " +
pRegistry->name(),
name(),
}
catch( const std::exception& x) {
throw GaudiException("std::exception in updateObject() " +
pRegistry->name() + ": " +
System::typeinfoName(typeid(x)) + ", " +
x.what(),
}
catch(...) {
throw GaudiException("UNKN exception in updateObject() " +
pRegistry->name(),
}
return status;
}
virtual StatusCode DataSvc::updateObject ( DataObject toUpdate)
virtual

Update object.

Reimplemented in DetDataSvc.

virtual StatusCode DataSvc::updateObject ( const std::string &  parentPath,
const std::string &  updatePath 
)
virtual

Update object.

StatusCode DataSvc::updateObject ( const std::string &  parentPath,
const std::string &  updatePath 
)
virtual

Update object.

Definition at line 979 of file DataSvc.cpp.

{
DataObject* pParent = nullptr;
StatusCode status = findObject(parentPath, pParent);
if ( status.isSuccess() ) {
status = updateObject( pParent, updatePath);
}
return status;
}
virtual StatusCode DataSvc::updateObject ( DataObject pParent,
const std::string &  updatePath 
)
virtual

Update object.

StatusCode DataSvc::updateObject ( DataObject pParent,
const std::string &  updatePath 
)
virtual

Update object.

Definition at line 990 of file DataSvc.cpp.

{
DataObject* pObject = nullptr;
StatusCode status = findObject(parent, updatePath, pObject);
if ( status.isSuccess() ) {
status = updateObject(pObject);
}
return status;
}

Member Data Documentation

std::string DataSvc::m_accessName
protected

Name of the data access incident.

Definition at line 70 of file DataSvc.h.

IConversionSvc * DataSvc::m_dataLoader
protected

Pointer to data loader service.

Definition at line 52 of file DataSvc.h.

bool DataSvc::m_enableAccessHdlr
protected

Flag to enable interrupts on data access requests.

Definition at line 60 of file DataSvc.h.

bool DataSvc::m_enableFaultHdlr
protected

Flag to enable interrupts on data creation requests.

Definition at line 62 of file DataSvc.h.

std::string DataSvc::m_faultName
protected

Name of the data fault incident.

Definition at line 72 of file DataSvc.h.

bool DataSvc::m_forceLeaves
protected

Allow forced creation of default leaves on registerObject.

Definition at line 58 of file DataSvc.h.

IIncidentSvc * DataSvc::m_incidentSvc
protected

Pointer to incident service.

Definition at line 54 of file DataSvc.h.

DataSvcHelpers::InhibitMap * DataSvc::m_inhibitMap
protected

Map with object paths to be inhibited from loading.

Definition at line 66 of file DataSvc.h.

std::vector< std::string > DataSvc::m_inhibitPathes
protected

Property for the inhibited leaves.

Definition at line 68 of file DataSvc.h.

LoadItems DataSvc::m_preLoads
protected

Items to be pre-loaded.

Definition at line 56 of file DataSvc.h.

DataSvcHelpers::RegistryEntry * DataSvc::m_root
protected

Pointer to root entry.

Definition at line 64 of file DataSvc.h.

CLID DataSvc::m_rootCLID
protected

Integer Property corresponding to CLID of root entry.

Definition at line 48 of file DataSvc.h.

std::string DataSvc::m_rootName
protected

Name of root event.

Definition at line 50 of file DataSvc.h.


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