| The Gaudi Framework v32r1 (f65d50dc)

Public Types | Public Member Functions | Static Private Member Functions | List of all members
IDataProviderSvc Class Referenceabstract

Data provider interface definition. More...

`#include <GaudiKernel/IDataProviderSvc.h>`

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

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

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

## Static Private Member Functions
static std::string | itemToPath (int item)
| Helper function to convert item numbers to path strings. More...

## Additional Inherited Members
Static Public Member Functions inherited from IInterface
static const InterfaceID & | interfaceID ()
| Return an instance of InterfaceID identifying the interface. More...

## 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 ont he 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 43 of file IDataProviderSvc.h.

## Member Enumeration Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
SEPARATOR |

Definition at line 53 of file IDataProviderSvc.h.

53 { SEPARATOR = '/' };
IDataProviderSvc::SEPARATOR
Definition: IDataProviderSvc.h:53

## ◆ Status

enum IDataProviderSvc::Status : StatusCode::code_t
| strong

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 548 of file IDataProviderSvc.h.

548 : StatusCode::code_t {
550 IDataProviderSvc_NO_ERROR = 1,
552 DOUBL_OBJ_PATH,
554 INVALID_OBJ_PATH,
556 INVALID_ROOT,
558 INVALID_OBJECT,
560 INVALID_PARENT,
562 OBJ_NOT_LOADED,
564 NO_DATA_LOADER,
566 INVALID_OBJ_ADDR,
568 DIR_NOT_EMPTY,
570 NO_MORE_LEVELS,
572 NO_ACCESS,
574 LAST
575 };
StatusCode::code_t
unsigned long code_t
type of StatusCode value
Definition: StatusCode.h:52

## Member Function Documentation

## ◆ addPreLoadItem() [1/2]

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

Add an item to the preload list.

Parameters

  item | Specs 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

  itemPath | Path to the item to be preloaded.

Returns
  Status code indicating success or failure.

Definition at line 433 of file IDataProviderSvc.h.

433 {
434 return addPreLoadItem( DataStoreItem( std::move( itemPath ), 1 ) );
435 }
IDataProviderSvc::addPreLoadItem
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
DataStoreItem
Description of the DataStoreItem class.
Definition: DataStoreItem.h:17
std::move
T move(T... args)

## ◆ DeclareInterfaceID()

IDataProviderSvc::DeclareInterfaceID | ( | IDataProviderSvc | ,
|  | 4 | ,
|  | 0 |
| ) |  |

InterfaceID.

## ◆ findObject() [1/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

  pDirectory | Pointer to the object.
  path | String with relative path to directory. Ideally ""!
  pObject | Reference to the pointer of the object to be returned.

Returns
  Status code indicating success or failure.

## ◆ findObject() [2/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

  fullPath | Path name of the object.
  pObject | Pointer to the object to be connected.

Returns
  Status code indicating success or failure.

## ◆ findObject() [3/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

  parentPath | Path to parent node of the object.
  objectPath | Relative path name of the object.
  pObject | Reference to the pointer of the object to be returned.

Returns
  Status code indicating success or failure.

Definition at line 324 of file IDataProviderSvc.h.

324 {
325 DataObject* parent = nullptr;
326 StatusCode status = findObject( parentPath, parent );
327 return status.isSuccess() ? findObject( parent, objectPath, pObject ) : status;
328 }
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

## ◆ findObject() [4/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

  parentPath | Path to parent node of the object.
  item | Item identifier.
  pObject | Reference to the pointer of the object to be returned.

Returns
  Status code indicating success or failure.

Definition at line 338 of file IDataProviderSvc.h.

338 {
339 return findObject( parentPath, itemToPath( item ), pObject );
340 }
IDataProviderSvc::itemToPath
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
Definition: IDataProviderSvc.h:47
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.

## ◆ findObject() [5/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

  parentObj | Pointer to parent node of the object.
  objectPath | Relative path name of the object.
  pObject | Reference to the pointer of the object to be returned.

Returns
  Status code indicating success or failure.

Definition at line 351 of file IDataProviderSvc.h.

351 {
352 return findObject( parentObj ? parentObj->registry() : nullptr, objectPath, pObject );
353 }
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.

## ◆ findObject() [6/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

  parentObj | Pointer to parent node of the object.
  item | Item identifier.
  pObject | Reference to the pointer of the object to be returned.

Returns
  Status code indicating success or failure.

Definition at line 363 of file IDataProviderSvc.h.

363 {
364 return findObject( parentObj, itemToPath( item ), pObject );
365 }
IDataProviderSvc::itemToPath
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
Definition: IDataProviderSvc.h:47
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.

## ◆ itemToPath()

static std::string IDataProviderSvc::itemToPath | ( | int | item | ) |
| inline static private

Helper function to convert item numbers to path strings.

Definition at line 47 of file IDataProviderSvc.h.

47 { return '/' + std::to_string( item ); }
std::to_string
T to_string(T... args)

## ◆ linkObject() [1/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

  from | Pointer to data directory the link originates.
  objPath | Path of the entry to be linked relative to from.
  toObj | Pointer to the object the link points to.

Returns
  Status code indicating success or failure.

## ◆ linkObject() [2/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

  fromPath | Path to the object the link originates.
  objPath | Path of the entry to be linked relative to from.
  toObj | Pointer to the object the link points to.

Returns
  Status code indicating success or failure.

Definition at line 479 of file IDataProviderSvc.h.

479 {
480 DataObject* pO = nullptr;
481 StatusCode status = retrieveObject( fromPath, pO );
482 return status.isSuccess() ? linkObject( pO->registry(), objPath, toObj ) : status;
483 }
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
IDataProviderSvc::linkObject
virtual StatusCode linkObject(IRegistry *from, std::string_view objPath, DataObject *toObj)=0
Add a link to another object.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

## ◆ linkObject() [3/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

  fromObj | Pointer to the object the link originates.
  objPath | Path of the entry to be linked relative to from.
  toObj | Pointer to the object the link points to.

Returns
  Status code indicating success or failure.

Definition at line 580 of file IDataProviderSvc.h.

580 {
581 if ( fromObj ) {
582 IRegistry* from_entry = fromObj->registry();
583 if ( from_entry ) return linkObject( from_entry, objPath, toObj );
584 }
585 return Status::INVALID_PARENT;
586 }
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
IDataProviderSvc::linkObject
virtual StatusCode linkObject(IRegistry *from, std::string_view objPath, DataObject *toObj)=0
Add a link to another object.
IRegistry
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
IDataProviderSvc::Status::INVALID_PARENT
Pointer to parent object is not valid.

## ◆ 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

  fullPath | Full path of the entry to be linked.
  toObj | Pointer 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 | ( | 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

  fullPath | Path to parent node of the object.
  pObject | Pointer to the object to be registered.

Returns
  Status code indicating success or failure.

Definition at line 62 of file IDataProviderSvc.h.

62 {
63 return registerObject( nullptr, fullPath, pObject );
64 }
IDataProviderSvc::registerObject
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.
Definition: IDataProviderSvc.h:62

## ◆ registerObject() [2/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

  parentPath | Path to parent node of the object.
  objectPath | Path of the object relative to the parent node
  pObject | Pointer to the object to be registered.

Returns
  Status code indicating success or failure.

## ◆ registerObject() [3/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

  parentPath | Path to parent node of the object.
  item | item number of the object linked to the parent
  pObject | Pointer to the object to be registered.

Returns
  Status code indicating success or failure.

Definition at line 85 of file IDataProviderSvc.h.

85 {
86 return registerObject( parentPath, itemToPath( item ), pObject );
87 }
IDataProviderSvc::itemToPath
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
Definition: IDataProviderSvc.h:47
IDataProviderSvc::registerObject
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.
Definition: IDataProviderSvc.h:62

## ◆ registerObject() [4/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

  parentObj | Pointer to parent object.
  objectPath | Path of the object relative to the parent node
  pObject | Pointer to the object to be connected.

Returns
  Status code indicating success or failure.

## ◆ registerObject() [5/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

  parentObj | Pointer to parent object.
  item | item number of the object linked to the parent
  pObject | Pointer to the object to be connected.

Returns
  Status code indicating success or failure.

Definition at line 107 of file IDataProviderSvc.h.

107 {
108 return registerObject( parentObj, itemToPath( item ), pObject );
109 }
IDataProviderSvc::itemToPath
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
Definition: IDataProviderSvc.h:47
IDataProviderSvc::registerObject
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.
Definition: IDataProviderSvc.h:62

## ◆ removePreLoadItem() [1/2]

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

Remove an item from the preload list.

Parameters

  item | Specs 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

  itemPath | Path to the item to be preloaded.

Returns
  Status code indicating success or failure.

Definition at line 447 of file IDataProviderSvc.h.

447 {
448 return removePreLoadItem( DataStoreItem( std::move( itemPath ), 1 ) );
449 }
DataStoreItem
Description of the DataStoreItem class.
Definition: DataStoreItem.h:17
IDataProviderSvc::removePreLoadItem
virtual StatusCode removePreLoadItem(const DataStoreItem &item)=0
Remove an item from the preload list.
std::move
T move(T... args)

## ◆ resetPreLoad()

virtual StatusCode IDataProviderSvc::resetPreLoad | ( |  | ) |
| pure virtual

Clear the preload list.

Returns
  Status code indicating success or failure.

## ◆ retrieveObject() [1/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

  pDirectory | Pointer to the object.
  path | String with relative path to directory. Ideally ""!
  pObject | Reference to the pointer of the object to be returned.

Returns
  Status code indicating success or failure.

## ◆ retrieveObject() [2/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

  fullPath | Path name of the object.
  pObject | Reference to the pointer of the object to be returned.

Returns
  Status code indicating success or failure.

Definition at line 233 of file IDataProviderSvc.h.

233 {
234 return retrieveObject( static_cast<IRegistry*>( nullptr ), fullPath, pObject );
235 }
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

## ◆ retrieveObject() [3/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

  parentPath | Path to parent node of the object.
  objectPath | Path of the object relative to the parent.
  pObject | Reference to the pointer of the object to be returned.

Returns
  Status code indicating success or failure.

Definition at line 247 of file IDataProviderSvc.h.

247 {
248 DataObject* parent = nullptr;
249 StatusCode status = retrieveObject( parentPath, parent );
250 return status.isSuccess() ? retrieveObject( parent, objectPath, pObject ) : status;
251 }
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

## ◆ retrieveObject() [4/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

  parentPath | Path to parent node of the object.
  item | Item identifier.
  pObject | Reference to the pointer of the object to be returned.

Returns
  Status code indicating success or failure.

Definition at line 263 of file IDataProviderSvc.h.

263 {
264 return retrieveObject( parentPath, itemToPath( item ), pObject );
265 }
IDataProviderSvc::itemToPath
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
Definition: IDataProviderSvc.h:47
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

## ◆ retrieveObject() [5/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

  parentObj | Pointer to parent node of the object.
  objectPath | Path of the object relative to the parent.
  pObject | Reference to the pointer of the object to be returned.

Returns
  Status code indicating success or failure.

Definition at line 277 of file IDataProviderSvc.h.

277 {
278 return retrieveObject( parentObj ? parentObj->registry() : nullptr, objectPath, pObject );
279 }
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

## ◆ retrieveObject() [6/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

  parentObj | Pointer to parent node of the object.
  item | Item identifier.
  pObject | Reference to the pointer of the object to be returned.

Returns
  Status code indicating success or failure.

Definition at line 291 of file IDataProviderSvc.h.

291 {
292 return retrieveObject( parentObj, itemToPath( item ), pObject );
293 }
IDataProviderSvc::itemToPath
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
Definition: IDataProviderSvc.h:47
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.

## ◆ unlinkObject() [1/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

  from | Pointer to data directory the link originates.
  objPath | Path of the entry to be linked relative to from.

Returns
  Status code indicating success or failure.

## ◆ unlinkObject() [2/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

  fromPath | Path to the object the link originates.
  objPath | Path of the entry to be linked relative to from.

Returns
  Status code indicating success or failure.

Definition at line 522 of file IDataProviderSvc.h.

522 {
523 DataObject* pObject = nullptr;
524 StatusCode status = findObject( fromPath, pObject );
525 return status.isSuccess() ? unlinkObject( pObject->registry(), objPath ) : status;
526 }
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.
IDataProviderSvc::unlinkObject
virtual StatusCode unlinkObject(IRegistry *from, std::string_view objPath)=0
Remove a link to another object.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

## ◆ unlinkObject() [3/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

  fromObj | Pointer to the object the link originates.
  objPath | Path of the entry to be linked relative to from.

Returns
  Status code indicating success or failure.

## ◆ 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

  fullPath | Full path of the entry to be linked.

Returns
  Status code indicating success or failure.

## ◆ unregisterObject() [1/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

  fullPath | Path name of the object.

Returns
  Status code indicating success or failure.

## ◆ unregisterObject() [2/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

  parentPath | Path name of the parent object.
  objPath | Path name of the object relative to the parent.

Returns
  Status code indicating success or failure.

Definition at line 140 of file IDataProviderSvc.h.

140 {
141 DataObject* pO = nullptr;
142 StatusCode status = findObject( parentPath, pO );
143 return status.isSuccess() ? unregisterObject( pO, objPath ) : status;
144 }
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.
IDataProviderSvc::unregisterObject
virtual StatusCode unregisterObject(std::string_view fullPath)=0
Unregister object from the data store.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

## ◆ unregisterObject() [3/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

  parentPath | Path name of the parent object.
  item | Integer identifier of the object item.

Returns
  Status code indicating success or failure.

Definition at line 160 of file IDataProviderSvc.h.

160 {
161 return unregisterObject( parentPath, itemToPath( item ) );
162 }
IDataProviderSvc::itemToPath
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
Definition: IDataProviderSvc.h:47
IDataProviderSvc::unregisterObject
virtual StatusCode unregisterObject(std::string_view fullPath)=0
Unregister object from the data store.

## ◆ unregisterObject() [4/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

  pObject | Pointer to the object.

Returns
  Status code indicating success or failure.

## ◆ unregisterObject() [5/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

  pParent | Pointer to parent object.
  objPath | Path name of the object relative to the parent.

Returns
  Status code indicating success or failure.

## ◆ unregisterObject() [6/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

  pParent | Pointer to parent object.
  item | Integer identifier of the object item.

Returns
  Status code indicating success or failure.

Definition at line 209 of file IDataProviderSvc.h.

209 {
210 return unregisterObject( pParent, itemToPath( item ) );
211 }
IDataProviderSvc::itemToPath
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
Definition: IDataProviderSvc.h:47
IDataProviderSvc::unregisterObject
virtual StatusCode unregisterObject(std::string_view fullPath)=0
Unregister object from the data store.

## ◆ updateObject() [1/5]

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

Update object identified by its directory entry.

** FASTEST ACCESS TO THE DATA STORE **

Parameters

  pDirectory | Pointer to the directory entry.

Returns
  Status code indicating success or failure.

## ◆ updateObject() [2/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

  fullPath | Path name of the object.

Returns
  Status code indicating success or failure.

Definition at line 380 of file IDataProviderSvc.h.

380 {
381 DataObject* pO = nullptr;
382 StatusCode status = findObject( fullPath, pO );
383 return status.isSuccess() ? updateObject( pO ) : retrieveObject( fullPath, pO );
384 }
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IDataProviderSvc::updateObject
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

## ◆ updateObject() [3/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

  toUpdate | Pointer to the object.

Returns
  Status code indicating success or failure.

## ◆ updateObject() [4/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

  parentPath | Path name of the parent object.
  updatePath | Path to the object relative to the parent.

Returns
  Status code indicating success or failure.

Definition at line 402 of file IDataProviderSvc.h.

402 {
403 DataObject* pParent = nullptr;
404 StatusCode status = findObject( parentPath, pParent );
405 return status.isSuccess() ? updateObject( pParent, updatePath ) : status;
406 }
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IDataProviderSvc::updateObject
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

## ◆ updateObject() [5/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

  pParent | Pointer to the parent object.
  updatePath | Path to the object relative to the parent.

Returns
  Status code indicating success or failure.

Definition at line 416 of file IDataProviderSvc.h.

416 {
417 DataObject* pObject = nullptr;
418 StatusCode status = findObject( pParent, updatePath, pObject );
419 return status.isSuccess() ? updateObject( pObject ) : status;
420 }
IDataProviderSvc::findObject
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IDataProviderSvc::updateObject
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

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

- GaudiKernel/GaudiKernel/IDataProviderSvc.h