The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
IDataProviderSvc Class Referenceabstract

Data provider interface definition. More...

#include <GaudiKernel/IDataProviderSvc.h>

Inheritance diagram for IDataProviderSvc:
Collaboration diagram for IDataProviderSvc:

Public Types

enum  { SEPARATOR = '/' }
 
enum class  Status : StatusCode::code_t {
  IDataProviderSvc_NO_ERROR = 1 , DOUBL_OBJ_PATH , INVALID_OBJ_PATH , INVALID_ROOT ,
  INVALID_OBJECT , INVALID_PARENT , OBJ_NOT_LOADED , NO_DATA_LOADER ,
  INVALID_OBJ_ADDR , DIR_NOT_EMPTY , NO_MORE_LEVELS , NO_ACCESS ,
  LAST
}
 Status code definitions. More...
 
- Public Types inherited from IInterface
enum class  Status : StatusCode::code_t {
  FAILURE = 0 , SUCCESS = 1 , NO_INTERFACE , VERSMISMATCH ,
  LAST_ERROR
}
 Return status. More...
 
using iid = Gaudi::InterfaceId<IInterface, 0, 0>
 Interface ID.
 
using ext_iids = Gaudi::interface_list<iid>
 Extra interfaces.
 

Public Member Functions

 DeclareInterfaceID (IDataProviderSvc, 4, 0)
 InterfaceID.
 
StatusCode registerObject (std::string_view fullPath, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode registerObject (std::string_view parentPath, std::string_view objectPath, DataObject *pObject)=0
 Register object with the data store.
 
StatusCode registerObject (std::string_view parentPath, int item, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode registerObject (DataObject *parentObj, std::string_view objectPath, DataObject *pObject)=0
 Register object with the data store.
 
StatusCode registerObject (DataObject *parentObj, int item, DataObject *pObject)
 Register object with the data store.
 
virtual StatusCode unregisterObject (std::string_view fullPath)=0
 Unregister object from the data store.
 
StatusCode unregisterObject (std::string_view parentPath, std::string_view objPath)
 Unregister object from the data store.
 
StatusCode unregisterObject (std::string_view parentPath, int item)
 Unregister object from the data store.
 
virtual StatusCode unregisterObject (DataObject *pObject)=0
 Unregister object from the data store.
 
virtual StatusCode unregisterObject (DataObject *pParent, std::string_view objPath)=0
 Unregister object from the data store.
 
StatusCode unregisterObject (DataObject *pParent, int item)
 Unregister object from the data store.
 
virtual StatusCode retrieveObject (IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
 Retrieve object identified by its directory entry.
 
StatusCode retrieveObject (std::string_view fullPath, DataObject *&pObject)
 Retrieve object identified by its full path from the data store.
 
StatusCode retrieveObject (std::string_view parentPath, std::string_view objectPath, DataObject *&pObject)
 Retrieve object from data store.
 
StatusCode retrieveObject (std::string_view parentPath, int item, DataObject *&pObject)
 Retrieve object from data store.
 
StatusCode retrieveObject (DataObject *parentObj, std::string_view objectPath, DataObject *&pObject)
 Retrieve object from data store.
 
StatusCode retrieveObject (DataObject *parentObj, int item, DataObject *&pObject)
 Retrieve object from data store.
 
virtual StatusCode findObject (IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
 Find object identified by its directory entry.
 
virtual StatusCode findObject (std::string_view fullPath, DataObject *&pObject)=0
 Find object identified by its full path in the data store.
 
StatusCode findObject (std::string_view parentPath, std::string_view objectPath, DataObject *&pObject)
 Find object identified by its parent object and the path to the object relative to the parent.
 
StatusCode findObject (std::string_view parentPath, int item, DataObject *&pObject)
 Find object identified by its parent object and an integer identifier in the data store.
 
StatusCode findObject (DataObject *parentObj, std::string_view objectPath, DataObject *&pObject)
 Find object identified by its parent object and the path to the object relative to the parent.
 
StatusCode findObject (DataObject *parentObj, int item, DataObject *&pObject)
 Find object identified by its parent object and an integer identifier in the data store.
 
virtual StatusCode updateObject (IRegistry *pDirectory)=0
 Update object identified by its directory entry.
 
StatusCode updateObject (std::string_view fullPath)
 Update object identified by its full path in the data store.
 
virtual StatusCode updateObject (DataObject *toUpdate)=0
 Update object identified by its pointer.
 
StatusCode updateObject (std::string_view parentPath, std::string_view updatePath)
 Update object identified by its parent's path and the path relative to the parent.
 
StatusCode updateObject (DataObject *pParent, std::string_view updatePath)
 Update object identified by its parent's pointer and the path relative to the parent.
 
virtual StatusCode addPreLoadItem (const DataStoreItem &item)=0
 Add an item to the preload list.
 
StatusCode addPreLoadItem (std::string itemPath)
 Add an item to the preload list.
 
virtual StatusCode removePreLoadItem (const DataStoreItem &item)=0
 Remove an item from the preload list.
 
StatusCode removePreLoadItem (std::string itemPath)
 Remove an item from the preload list.
 
virtual StatusCode resetPreLoad ()=0
 Clear the preload list.
 
virtual StatusCode preLoad ()=0
 Load all preload items of the list.
 
virtual StatusCode linkObject (IRegistry *from, std::string_view objPath, DataObject *toObj)=0
 Add a link to another object.
 
StatusCode linkObject (std::string_view fromPath, std::string_view objPath, DataObject *toObj)
 Add a link to another object.
 
StatusCode linkObject (DataObject *fromObj, std::string_view objPath, DataObject *toObj)
 Add a link to another object.
 
virtual StatusCode linkObject (std::string_view fullPath, DataObject *toObj)=0
 Add a link to another object.
 
virtual StatusCode unlinkObject (IRegistry *from, std::string_view objPath)=0
 Remove a link to another object.
 
StatusCode unlinkObject (std::string_view fromPath, std::string_view objPath)
 Remove a link to another object.
 
virtual StatusCode unlinkObject (DataObject *fromObj, std::string_view objPath)=0
 Remove a link to another object.
 
virtual StatusCode unlinkObject (std::string_view fullPath)=0
 Remove a link to another object.
 
- Public Member Functions inherited from IInterface
template<Gaudi::IsInterface TARGET>
TARGET * cast ()
 
template<Gaudi::IsInterface TARGET>
TARGET const * cast () const
 
template<typename TARGET>
requires ( !Gaudi::IsInterface<TARGET> )
TARGET * cast ()
 
template<typename TARGET>
requires ( !Gaudi::IsInterface<TARGET> )
TARGET const * cast () const
 
virtual std::vector< std::string > getInterfaceNames () const =0
 Returns a vector of strings containing the names of all the implemented interfaces.
 
virtual unsigned long addRef () const =0
 Increment the reference count of Interface instance.
 
virtual unsigned long release () const =0
 Release Interface instance.
 
virtual unsigned long refCount () const =0
 Current reference count.
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)=0
 Set the void** to the pointer to the requested interface of the instance.
 
virtual ~IInterface ()=default
 Virtual destructor.
 
virtual void const * i_cast (const InterfaceID &) const =0
 
void * i_cast (const InterfaceID &iid)
 

Static Private Member Functions

static std::string itemToPath (int item)
 Helper function to convert item numbers to path strings i.e.
 

Additional Inherited Members

- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface.
 
- Protected Member Functions inherited from IInterface
virtual unsigned long decRef () const =0
 Decrement reference count and return the new reference count.
 

Detailed Description

Data provider interface definition.

The data provider interface allows to:

  • Define lists of items to be loaded automatically when a new root node is assigned to the data store.
  • Register objects from the data store. Once objects are registered with the data store the client gives up ownership.
  • Unregister objects from the data store. Unregistering an object means to actually delete all entries hanging below, not the object itself - since the client claims back ownership. Note that this is a very delicate operation - any reference to the object will be invalid. Even worse: invalid references cannot be detected.
  • Retrieve objects to the data store. Depending on the availibility of the requested object in the data store the represented object will be loaded if possible.
  • Find objects beeing present in the store without actually creating the representation if the object is not present.
  • Create 'soft' links between objects in the transient store.
  • Request object updates.
Author
Markus Frank
Sebastien Ponce

Definition at line 48 of file IDataProviderSvc.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SEPARATOR 

Definition at line 58 of file IDataProviderSvc.h.

58{ SEPARATOR = '/' };

◆ Status

Status code definitions.

Enumerator
IDataProviderSvc_NO_ERROR 

Success.

DOUBL_OBJ_PATH 

The path for this objects is already in use.

INVALID_OBJ_PATH 

Invalid path from root to object request failed.

INVALID_ROOT 

Invalid root path object cannot be retrieved or stored.

INVALID_OBJECT 

Object pointer is invalid.

INVALID_PARENT 

Pointer to parent object is not valid.

OBJ_NOT_LOADED 

Sorry, the requested object is not loaded.

NO_DATA_LOADER 

No data loader available.

INVALID_OBJ_ADDR 

Invalid object address.

DIR_NOT_EMPTY 

Directory entry is NOT empty.

NO_MORE_LEVELS 

Automatic data loading had to stop: maximum depth.

NO_ACCESS 

Access to the requested leaf is inhibited.

LAST 

Terminator.

Definition at line 553 of file IDataProviderSvc.h.

555 IDataProviderSvc_NO_ERROR = 1,
557 DOUBL_OBJ_PATH,
559 INVALID_OBJ_PATH,
561 INVALID_ROOT,
563 INVALID_OBJECT,
565 INVALID_PARENT,
567 OBJ_NOT_LOADED,
569 NO_DATA_LOADER,
571 INVALID_OBJ_ADDR,
573 DIR_NOT_EMPTY,
575 NO_MORE_LEVELS,
577 NO_ACCESS,
579 LAST
580 };
unsigned long code_t
type of StatusCode value
Definition StatusCode.h:66

Member Function Documentation

◆ addPreLoadItem() [1/2]

virtual StatusCode IDataProviderSvc::addPreLoadItem ( const DataStoreItem & item)
pure virtual

Add an item to the preload list.

Parameters
itemSpecs of item to be preloaded
Returns
Status code indicating success or failure.

◆ addPreLoadItem() [2/2]

StatusCode IDataProviderSvc::addPreLoadItem ( std::string itemPath)
inline

Add an item to the preload list.

The item is identified by the path to the object.

Parameters
itemPathPath to the item to be preloaded.
Returns
Status code indicating success or failure.

Definition at line 438 of file IDataProviderSvc.h.

438 {
439 return addPreLoadItem( DataStoreItem( std::move( itemPath ), 1 ) );
440 }
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.

◆ DeclareInterfaceID()

IDataProviderSvc::DeclareInterfaceID ( IDataProviderSvc ,
4 ,
0  )

◆ findObject() [1/6]

StatusCode IDataProviderSvc::findObject ( DataObject * parentObj,
int item,
DataObject *& pObject )
inline

Find object identified by its parent object and an integer identifier in the data store.

In case the object is not present the pointer will be set to NULL.

Parameters
parentObjPointer to parent node of the object.
itemItem identifier.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 368 of file IDataProviderSvc.h.

368 {
369 return findObject( parentObj, itemToPath( item ), pObject );
370 }
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings i.e.
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.

◆ findObject() [2/6]

StatusCode IDataProviderSvc::findObject ( DataObject * parentObj,
std::string_view objectPath,
DataObject *& pObject )
inline

Find object identified by its parent object and the path to the object relative to the parent.

The result will be returned in the second argument. In case the object is not present the pointer will be set to NULL.

Parameters
parentObjPointer to parent node of the object.
objectPathRelative path name of the object.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 356 of file IDataProviderSvc.h.

356 {
357 return findObject( parentObj ? parentObj->registry() : nullptr, objectPath, pObject );
358 }
IRegistry * registry() const
Get pointer to Registry.
Definition DataObject.h:79

◆ findObject() [3/6]

virtual StatusCode IDataProviderSvc::findObject ( IRegistry * pDirectory,
std::string_view path,
DataObject *& pObject )
pure virtual

Find object identified by its directory entry.

The result will be returned in the second argument. In case the object is not present the pointer will be set to NULL. ** FASTEST ACCESS TO THE DATA STORE **

Parameters
pDirectoryPointer to the object.
pathString with relative path to directory. Ideally ""!
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Implemented in IAIDATupleSvc, and IHistogramSvc.

◆ findObject() [4/6]

virtual StatusCode IDataProviderSvc::findObject ( std::string_view fullPath,
DataObject *& pObject )
pure virtual

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

The result will be returned in the second argument. In case the object is not present the pointer will be set to NULL.

Parameters
fullPathPath name of the object.
pObjectPointer to the object to be connected.
Returns
Status code indicating success or failure.

Implemented in IAIDATupleSvc, and IHistogramSvc.

◆ findObject() [5/6]

StatusCode IDataProviderSvc::findObject ( std::string_view parentPath,
int item,
DataObject *& pObject )
inline

Find object identified by its parent object and an integer identifier in the data store.

In case the object is not present the pointer will be set to NULL.

Parameters
parentPathPath to parent node of the object.
itemItem identifier.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 343 of file IDataProviderSvc.h.

343 {
344 return findObject( parentPath, itemToPath( item ), pObject );
345 }

◆ findObject() [6/6]

StatusCode IDataProviderSvc::findObject ( std::string_view parentPath,
std::string_view objectPath,
DataObject *& pObject )
inline

Find object identified by its parent object and the path to the object relative to the parent.

The result will be returned in the second argument. In case the object is not present the pointer will be set to NULL.

Parameters
parentPathPath to parent node of the object.
objectPathRelative path name of the object.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 329 of file IDataProviderSvc.h.

329 {
330 DataObject* parent = nullptr;
331 StatusCode status = findObject( parentPath, parent );
332 return status.isSuccess() ? findObject( parent, objectPath, pObject ) : status;
333 }
bool isSuccess() const
Definition StatusCode.h:314

◆ itemToPath()

static std::string IDataProviderSvc::itemToPath ( int item)
inlinestaticprivate

Helper function to convert item numbers to path strings i.e.

int -> "/" + int

Definition at line 52 of file IDataProviderSvc.h.

52{ return '/' + std::to_string( item ); }

◆ linkObject() [1/4]

StatusCode IDataProviderSvc::linkObject ( DataObject * fromObj,
std::string_view objPath,
DataObject * toObj )
inline

Add a link to another object.

Both objects must already be registered with the data store. Once linked, the object can only be unregistered after unlinking.

Parameters
fromObjPointer to the object the link originates.
objPathPath of the entry to be linked relative to from.
toObjPointer to the object the link points to.
Returns
Status code indicating success or failure.

Definition at line 585 of file IDataProviderSvc.h.

585 {
586 if ( fromObj ) {
587 IRegistry* from_entry = fromObj->registry();
588 if ( from_entry ) return linkObject( from_entry, objPath, toObj );
589 }
591}
virtual StatusCode linkObject(IRegistry *from, std::string_view objPath, DataObject *toObj)=0
Add a link to another object.
@ INVALID_PARENT
Pointer to parent object is not valid.

◆ linkObject() [2/4]

virtual StatusCode IDataProviderSvc::linkObject ( IRegistry * from,
std::string_view objPath,
DataObject * toObj )
pure virtual

Add a link to another object.

Both objects must already be registered with the data store. Once linked, the object can only be unregistered after unlinking.

Parameters
fromPointer to data directory the link originates.
objPathPath of the entry to be linked relative to from.
toObjPointer to the object the link points to.
Returns
Status code indicating success or failure.

◆ linkObject() [3/4]

StatusCode IDataProviderSvc::linkObject ( std::string_view fromPath,
std::string_view objPath,
DataObject * toObj )
inline

Add a link to another object.

Both objects must already be registered with the data store. Once linked, the object can only be unregistered after unlinking.

Parameters
fromPathPath to the object the link originates.
objPathPath of the entry to be linked relative to from.
toObjPointer to the object the link points to.
Returns
Status code indicating success or failure.

Definition at line 484 of file IDataProviderSvc.h.

484 {
485 DataObject* pO = nullptr;
486 StatusCode status = retrieveObject( fromPath, pO );
487 return status.isSuccess() ? linkObject( pO->registry(), objPath, toObj ) : status;
488 }
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

◆ linkObject() [4/4]

virtual StatusCode IDataProviderSvc::linkObject ( std::string_view fullPath,
DataObject * toObj )
pure virtual

Add a link to another object.

Both objects must already be registered with the data store. Once linked, the object can only be unregistered after unlinking.

Parameters
fullPathFull path of the entry to be linked.
toObjPointer to the object the link points to.
Returns
Status code indicating success or failure.

◆ preLoad()

virtual StatusCode IDataProviderSvc::preLoad ( )
pure virtual

Load all preload items of the list.

Returns
Status code indicating success or failure.

◆ registerObject() [1/5]

StatusCode IDataProviderSvc::registerObject ( DataObject * parentObj,
int item,
DataObject * pObject )
inline

Register object with the data store.

Connect the object identified by its pointer to the node object identified by its pointer.

Parameters
parentObjPointer to parent object.
itemitem number of the object linked to the parent
pObjectPointer to the object to be connected.
Returns
Status code indicating success or failure.

Definition at line 112 of file IDataProviderSvc.h.

112 {
113 return registerObject( parentObj, itemToPath( item ), pObject );
114 }
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.

◆ registerObject() [2/5]

virtual StatusCode IDataProviderSvc::registerObject ( DataObject * parentObj,
std::string_view objectPath,
DataObject * pObject )
pure virtual

Register object with the data store.

Connect the object identified by its pointer to the parent object and the relative path of the object with respect to the parent.

Parameters
parentObjPointer to parent object.
objectPathPath of the object relative to the parent node
pObjectPointer to the object to be connected.
Returns
Status code indicating success or failure.

Implemented in IAIDATupleSvc, and IHistogramSvc.

◆ registerObject() [3/5]

StatusCode IDataProviderSvc::registerObject ( std::string_view fullPath,
DataObject * pObject )
inline

Register object with the data store.

Connect the object identified by its pointer to the node object identified by its path.

Parameters
fullPathPath to parent node of the object.
pObjectPointer to the object to be registered.
Returns
Status code indicating success or failure.

Definition at line 67 of file IDataProviderSvc.h.

67 {
68 return registerObject( nullptr, fullPath, pObject );
69 }

◆ registerObject() [4/5]

StatusCode IDataProviderSvc::registerObject ( std::string_view parentPath,
int item,
DataObject * pObject )
inline

Register object with the data store.

Connect the object identified by its pointer to the parent object and an integer identifier.

Parameters
parentPathPath to parent node of the object.
itemitem number of the object linked to the parent
pObjectPointer to the object to be registered.
Returns
Status code indicating success or failure.

Definition at line 90 of file IDataProviderSvc.h.

90 {
91 return registerObject( parentPath, itemToPath( item ), pObject );
92 }

◆ registerObject() [5/5]

virtual StatusCode IDataProviderSvc::registerObject ( std::string_view parentPath,
std::string_view objectPath,
DataObject * pObject )
pure virtual

Register object with the data store.

Connect the object identified by the path to the parent object and the path of the object itself relative to the specified parent.

Parameters
parentPathPath to parent node of the object.
objectPathPath of the object relative to the parent node
pObjectPointer to the object to be registered.
Returns
Status code indicating success or failure.

Implemented in IAIDATupleSvc, and IHistogramSvc.

◆ removePreLoadItem() [1/2]

virtual StatusCode IDataProviderSvc::removePreLoadItem ( const DataStoreItem & item)
pure virtual

Remove an item from the preload list.

Parameters
itemSpecs of item to be removed from the preload list
Returns
Status code indicating success or failure.

◆ removePreLoadItem() [2/2]

StatusCode IDataProviderSvc::removePreLoadItem ( std::string itemPath)
inline

Remove an item from the preload list.

Parameters
itemPathPath to the item to be preloaded.
Returns
Status code indicating success or failure.

Definition at line 452 of file IDataProviderSvc.h.

452 {
453 return removePreLoadItem( DataStoreItem( std::move( itemPath ), 1 ) );
454 }
virtual StatusCode removePreLoadItem(const DataStoreItem &item)=0
Remove an item from the preload list.

◆ resetPreLoad()

virtual StatusCode IDataProviderSvc::resetPreLoad ( )
pure virtual

Clear the preload list.

Returns
Status code indicating success or failure.

◆ retrieveObject() [1/6]

StatusCode IDataProviderSvc::retrieveObject ( DataObject * parentObj,
int item,
DataObject *& pObject )
inline

Retrieve object from data store.

The object to be retrieved is identified by the pointer to the parent object and an integer identifier. In case the object is not present it will be loaded and converted if possible.

Parameters
parentObjPointer to parent node of the object.
itemItem identifier.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 296 of file IDataProviderSvc.h.

296 {
297 return retrieveObject( parentObj, itemToPath( item ), pObject );
298 }

◆ retrieveObject() [2/6]

StatusCode IDataProviderSvc::retrieveObject ( DataObject * parentObj,
std::string_view objectPath,
DataObject *& pObject )
inline

Retrieve object from data store.

The object to be retrieved is identified by the pointer to the parent object and the relative path with respect to the node. In case the object is not present it will be loaded and converted if possible.

Parameters
parentObjPointer to parent node of the object.
objectPathPath of the object relative to the parent.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 282 of file IDataProviderSvc.h.

282 {
283 return retrieveObject( parentObj ? parentObj->registry() : nullptr, objectPath, pObject );
284 }

◆ retrieveObject() [3/6]

virtual StatusCode IDataProviderSvc::retrieveObject ( IRegistry * pDirectory,
std::string_view path,
DataObject *& pObject )
pure virtual

Retrieve object identified by its directory entry.

The result will be returned in the second argument. In case the object is not present it will be loaded and converted if possible. ** FASTEST ACCESS TO THE DATA STORE **

Parameters
pDirectoryPointer to the object.
pathString with relative path to directory. Ideally ""!
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Implemented in IAIDATupleSvc, and IHistogramSvc.

◆ retrieveObject() [4/6]

StatusCode IDataProviderSvc::retrieveObject ( std::string_view fullPath,
DataObject *& pObject )
inline

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

The result will be returned in the second argument. In case the object is not present it will be loaded and converted if possible.

Parameters
fullPathPath name of the object.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 238 of file IDataProviderSvc.h.

238 {
239 return retrieveObject( static_cast<IRegistry*>( nullptr ), fullPath, pObject );
240 }

◆ retrieveObject() [5/6]

StatusCode IDataProviderSvc::retrieveObject ( std::string_view parentPath,
int item,
DataObject *& pObject )
inline

Retrieve object from data store.

The object to be retrieved is identified by the path to the parent object and an integer identifier. In case the object is not present it will be loaded and converted if possible.

Parameters
parentPathPath to parent node of the object.
itemItem identifier.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 268 of file IDataProviderSvc.h.

268 {
269 return retrieveObject( parentPath, itemToPath( item ), pObject );
270 }

◆ retrieveObject() [6/6]

StatusCode IDataProviderSvc::retrieveObject ( std::string_view parentPath,
std::string_view objectPath,
DataObject *& pObject )
inline

Retrieve object from data store.

The object to be retrieved is identified by the path of the parent object and the relative path with respect to the node. In case the object is not present it will be loaded and converted if possible.

Parameters
parentPathPath to parent node of the object.
objectPathPath of the object relative to the parent.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 252 of file IDataProviderSvc.h.

252 {
253 DataObject* parent = nullptr;
254 StatusCode status = retrieveObject( parentPath, parent );
255 return status.isSuccess() ? retrieveObject( parent, objectPath, pObject ) : status;
256 }

◆ unlinkObject() [1/4]

virtual StatusCode IDataProviderSvc::unlinkObject ( DataObject * fromObj,
std::string_view objPath )
pure virtual

Remove a link to another object.

Both objects must be registered with the data store. This entry point can be used to unlink objects e.g. in order to unregister them.

Parameters
fromObjPointer to the object the link originates.
objPathPath of the entry to be linked relative to from.
Returns
Status code indicating success or failure.

◆ unlinkObject() [2/4]

virtual StatusCode IDataProviderSvc::unlinkObject ( IRegistry * from,
std::string_view objPath )
pure virtual

Remove a link to another object.

Both objects must be registered with the data store. This entry point can be used to unlink objects e.g. in order to unregister them.

Parameters
fromPointer to data directory the link originates.
objPathPath of the entry to be linked relative to from.
Returns
Status code indicating success or failure.

◆ unlinkObject() [3/4]

StatusCode IDataProviderSvc::unlinkObject ( std::string_view fromPath,
std::string_view objPath )
inline

Remove a link to another object.

Both objects must be registered with the data store. This entry point can be used to unlink objects e.g. in order to unregister them.

Parameters
fromPathPath to the object the link originates.
objPathPath of the entry to be linked relative to from.
Returns
Status code indicating success or failure.

Definition at line 527 of file IDataProviderSvc.h.

527 {
528 DataObject* pObject = nullptr;
529 StatusCode status = findObject( fromPath, pObject );
530 return status.isSuccess() ? unlinkObject( pObject->registry(), objPath ) : status;
531 }
virtual StatusCode unlinkObject(IRegistry *from, std::string_view objPath)=0
Remove a link to another object.

◆ unlinkObject() [4/4]

virtual StatusCode IDataProviderSvc::unlinkObject ( std::string_view fullPath)
pure virtual

Remove a link to another object.

Both objects must be registered with the data store. This entry point can be used to unlink objects e.g. in order to unregister them.

Parameters
fullPathFull path of the entry to be linked.
Returns
Status code indicating success or failure.

◆ unregisterObject() [1/6]

virtual StatusCode IDataProviderSvc::unregisterObject ( DataObject * pObject)
pure virtual

Unregister object from the data store.

On registration the client gives up ownership of the object and may no longer delete the object. unregistering the object is the opposite: ownership is claimed back by the user. But note:

  • All depending objects will be deleted, ie. all leaves "below" the entry in question; NOT the object itself, the object itself must be destroyed by the user.

The object is identified by its pointer. The object must previously have been registered with the data store.

Parameters
pObjectPointer to the object.
Returns
Status code indicating success or failure.

Implemented in IAIDATupleSvc, and IHistogramSvc.

◆ unregisterObject() [2/6]

StatusCode IDataProviderSvc::unregisterObject ( DataObject * pParent,
int item )
inline

Unregister object from the data store.

On registration the client gives up ownership of the object and may no longer delete the object. unregistering the object is the opposite: ownership is claimed back by the user. But note:

  • All depending objects will be deleted, ie. all leaves "below" the entry in question; NOT the object itself, the object itself must be destroyed by the user.

The object is identified by parent object and an integer identifier of the object itself.

Parameters
pParentPointer to parent object.
itemInteger identifier of the object item.
Returns
Status code indicating success or failure.

Definition at line 214 of file IDataProviderSvc.h.

214 {
215 return unregisterObject( pParent, itemToPath( item ) );
216 }
virtual StatusCode unregisterObject(std::string_view fullPath)=0
Unregister object from the data store.

◆ unregisterObject() [3/6]

virtual StatusCode IDataProviderSvc::unregisterObject ( DataObject * pParent,
std::string_view objPath )
pure virtual

Unregister object from the data store.

On registration the client gives up ownership of the object and may no longer delete the object. unregistering the object is the opposite: ownership is claimed back by the user. But note:

  • All depending objects will be deleted, ie. all leaves "below" the entry in question; NOT the object itself, the object itself must be destroyed by the user.

The object is identified by parent object and the path of the object relative to the parent.

Parameters
pParentPointer to parent object.
objPathPath name of the object relative to the parent.
Returns
Status code indicating success or failure.

Implemented in IAIDATupleSvc, and IHistogramSvc.

◆ unregisterObject() [4/6]

virtual StatusCode IDataProviderSvc::unregisterObject ( std::string_view fullPath)
pure virtual

Unregister object from the data store.

On registration the client gives up ownership of the object and may no longer delete the object. unregistering the object is the opposite: ownership is claimed back by the user. But note:

  • All depending objects will be deleted, ie. all leaves "below" the entry in question; NOT the object itself, the object itself must be destroyed by the user.

The object is identified by full path name.

Parameters
fullPathPath name of the object.
Returns
Status code indicating success or failure.

Implemented in IAIDATupleSvc, and IHistogramSvc.

◆ unregisterObject() [5/6]

StatusCode IDataProviderSvc::unregisterObject ( std::string_view parentPath,
int item )
inline

Unregister object from the data store.

On registration the client gives up ownership of the object and may no longer delete the object. unregistering the object is the opposite: ownership is claimed back by the user. But note:

  • All depending objects will be deleted, ie. all leaves "below" the entry in question; NOT the object itself, the object itself must be destroyed by the user.

The object is identified by parent path name and an integer identifier of the object itself.

Parameters
parentPathPath name of the parent object.
itemInteger identifier of the object item.
Returns
Status code indicating success or failure.

Definition at line 165 of file IDataProviderSvc.h.

165 {
166 return unregisterObject( parentPath, itemToPath( item ) );
167 }

◆ unregisterObject() [6/6]

StatusCode IDataProviderSvc::unregisterObject ( std::string_view parentPath,
std::string_view objPath )
inline

Unregister object from the data store.

On registration the client gives up ownership of the object and may no longer delete the object. unregistering the object is the opposite: ownership is claimed back by the user. But note:

  • All depending objects will be deleted, ie. all leaves "below" the entry in question; NOT the object itself, the object itself must be destroyed by the user.

The object is identified by parent path name and the path of the object relative to the parent.

Parameters
parentPathPath name of the parent object.
objPathPath name of the object relative to the parent.
Returns
Status code indicating success or failure.

Definition at line 145 of file IDataProviderSvc.h.

145 {
146 DataObject* pO = nullptr;
147 StatusCode status = findObject( parentPath, pO );
148 return status.isSuccess() ? unregisterObject( pO, objPath ) : status;
149 }

◆ updateObject() [1/5]

StatusCode IDataProviderSvc::updateObject ( DataObject * pParent,
std::string_view updatePath )
inline

Update object identified by its parent's pointer and the path relative to the parent.

If found, the object update will be initiated. In case the object is not present the entry point returns an error.

Parameters
pParentPointer to the parent object.
updatePathPath to the object relative to the parent.
Returns
Status code indicating success or failure.

Definition at line 421 of file IDataProviderSvc.h.

421 {
422 DataObject* pObject = nullptr;
423 StatusCode status = findObject( pParent, updatePath, pObject );
424 return status.isSuccess() ? updateObject( pObject ) : status;
425 }
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.

◆ updateObject() [2/5]

virtual StatusCode IDataProviderSvc::updateObject ( DataObject * toUpdate)
pure virtual

Update object identified by its pointer.

If found, the object update will be initiated. In case the object is not present the entry point returns an error.

Parameters
toUpdatePointer to the object.
Returns
Status code indicating success or failure.

◆ updateObject() [3/5]

virtual StatusCode IDataProviderSvc::updateObject ( IRegistry * pDirectory)
pure virtual

Update object identified by its directory entry.

** FASTEST ACCESS TO THE DATA STORE **

Parameters
pDirectoryPointer to the directory entry.
Returns
Status code indicating success or failure.

◆ updateObject() [4/5]

StatusCode IDataProviderSvc::updateObject ( std::string_view fullPath)
inline

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

If found, the object update will be initiated. In case the object is not present the entry point returns an error.

Parameters
fullPathPath name of the object.
Returns
Status code indicating success or failure.

Definition at line 385 of file IDataProviderSvc.h.

385 {
386 DataObject* pO = nullptr;
387 StatusCode status = findObject( fullPath, pO );
388 return status.isSuccess() ? updateObject( pO ) : retrieveObject( fullPath, pO );
389 }

◆ updateObject() [5/5]

StatusCode IDataProviderSvc::updateObject ( std::string_view parentPath,
std::string_view updatePath )
inline

Update object identified by its parent's path and the path relative to the parent.

If found, the object update will be initiated. In case the object is not present the entry point returns an error.

Parameters
parentPathPath name of the parent object.
updatePathPath to the object relative to the parent.
Returns
Status code indicating success or failure.

Definition at line 407 of file IDataProviderSvc.h.

407 {
408 DataObject* pParent = nullptr;
409 StatusCode status = findObject( parentPath, pParent );
410 return status.isSuccess() ? updateObject( pParent, updatePath ) : status;
411 }

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