11 #ifndef GAUDIKERNEL_IDATAPROVIDERSVC_H 12 #define GAUDIKERNEL_IDATAPROVIDERSVC_H 19 #include <string_view> 73 return registerObject(
nullptr, fullPath, pObject );
84 virtual StatusCode registerObject( std::string_view parentPath, std::string_view objectPath,
96 return registerObject( parentPath, itemToPath( item ), pObject );
118 return registerObject( parentObj, itemToPath( item ), pObject );
134 virtual StatusCode unregisterObject( std::string_view fullPath ) = 0;
152 StatusCode status = findObject( parentPath, pO );
153 return status.
isSuccess() ? unregisterObject( pO, objPath ) : status;
171 return unregisterObject( parentPath, itemToPath( item ) );
220 return unregisterObject( pParent, itemToPath( item ) );
244 return retrieveObject( static_cast<IRegistry*>(
nullptr ), fullPath, pObject );
260 return status.
isSuccess() ? retrieveObject(
parent, objectPath, pObject ) : status;
274 return retrieveObject( parentPath, itemToPath( item ), pObject );
288 return retrieveObject( parentObj ? parentObj->
registry() :
nullptr, objectPath, pObject );
302 return retrieveObject( parentObj, itemToPath( item ), pObject );
337 return status.
isSuccess() ? findObject(
parent, objectPath, pObject ) : status;
349 return findObject( parentPath, itemToPath( item ), pObject );
362 return findObject( parentObj ? parentObj->
registry() :
nullptr, objectPath, pObject );
374 return findObject( parentObj, itemToPath( item ), pObject );
392 StatusCode status = findObject( fullPath, pO );
393 return status.
isSuccess() ? updateObject( pO ) : retrieveObject( fullPath, pO );
414 StatusCode status = findObject( parentPath, pParent );
415 return status.
isSuccess() ? updateObject( pParent, updatePath ) : status;
428 StatusCode status = findObject( pParent, updatePath, pObject );
429 return status.
isSuccess() ? updateObject( pObject ) : status;
491 StatusCode status = retrieveObject( fromPath, pO );
492 return status.
isSuccess() ? linkObject( pO->
registry(), objPath, toObj ) : status;
534 StatusCode status = findObject( fromPath, pObject );
535 return status.
isSuccess() ? unlinkObject( pObject->
registry(), objPath ) : status;
555 virtual StatusCode unlinkObject( std::string_view fullPath ) = 0;
560 IDataProviderSvc_NO_ERROR = 1,
592 IRegistry* from_entry = fromObj->registry();
593 if ( from_entry )
return linkObject( from_entry, objPath, toObj );
595 return Status::INVALID_PARENT;
598 #endif // GAUDIKERNEL_IDATAPROVIDERSVC_H StatusCode retrieveObject(std::string_view parentPath, int item, DataObject *&pObject)
Retrieve object from data store.
IRegistry * registry() const
Get pointer to Registry.
StatusCode findObject(DataObject *parentObj, int item, DataObject *&pObject)
Find object identified by its parent object and an integer identifier in the data store.
StatusCode registerObject(DataObject *parentObj, int item, DataObject *pObject)
Register object with the data store.
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
StatusCode updateObject(DataObject *pParent, std::string_view updatePath)
Update object identified by its parent's pointer and the path relative to the parent.
StatusCode unlinkObject(std::string_view fromPath, std::string_view objPath)
Remove a link to another object.
Status
Status code definitions.
Data provider interface definition.
StatusCode registerObject(std::string_view parentPath, int item, DataObject *pObject)
Register object with the data store.
Description of the DataStoreItem class.
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.
#define STATUSCODE_ENUM_DECL(ENUM)
Declare an enum to be used as StatusCode value.
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
StatusCode addPreLoadItem(std::string itemPath)
Add an item to the preload list.
StatusCode retrieveObject(std::string_view parentPath, std::string_view objectPath, DataObject *&pObject)
Retrieve object from 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 updateObject(std::string_view fullPath)
Update object identified by its full path in the data store.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
StatusCode linkObject(std::string_view fromPath, std::string_view objPath, DataObject *toObj)
Add a link to another object.
StatusCode unregisterObject(std::string_view parentPath, int item)
Unregister object from the data store.
StatusCode unregisterObject(std::string_view parentPath, std::string_view objPath)
Unregister object from the data store.
StatusCode retrieveObject(DataObject *parentObj, int item, DataObject *&pObject)
Retrieve object from data store.
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
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(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 retrieveObject(DataObject *parentObj, std::string_view objectPath, DataObject *&pObject)
Retrieve object from data store.
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.
const Gaudi::Algorithm & parent
StatusCode retrieveObject(std::string_view fullPath, DataObject *&pObject)
Retrieve object identified by its full path from the data store.
StatusCode unregisterObject(DataObject *pParent, int item)
Unregister object from the data store.
Opaque address interface definition.
A DataObject is the base class of any identifiable object on any data store.
StatusCode removePreLoadItem(std::string itemPath)
Remove an item from the preload list.
unsigned long code_t
type of StatusCode value