Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

DataSvc Class Reference

Data service base class. More...

#include <GaudiKernel/DataSvc.h>

Inheritance diagram for DataSvc:

Service IDataProviderSvc IDataManagerSvc IService IProperty IInterface IInterface IInterface IInterface List of all members.

Public Types

typedef std::vector<DataStoreItemLoadItems
 Define set of load items. More...


Public Methods

virtual CLID rootEventCLID () const
 Accessor for root event CLID. More...

virtual std::string rootEventName () const
 Name for root Event. More...

virtual StatusCode clearSubTree ( const std::string& sub_tree_path )
 Remove all data objects below the sub tree identified by its full path name. More...

virtual StatusCode clearSubTree ( DataObject* pObject )
 Remove all data objects below the sub tree identified by the object. More...

virtual StatusCode clearStore ()
 Remove all data objects in the data store. More...

virtual StatusCode traverseSubTree ( const std::string& sub_tree_path, IDataStoreAgent* pAgent )
 Analyse by traversing all data objects below the sub tree identified by its full path name. More...

virtual StatusCode traverseSubTree ( DataObject* pObject, IDataStoreAgent* pAgent )
 Analyse by traversing all data objects below the sub tree. More...

virtual StatusCode traverseTree ( IDataStoreAgent* pAgent )
 Analyse by traversing all data objects in the data store. More...

virtual StatusCode setRoot ( const std::string& root_name, DataObject* pRootObj )
 Initialize data store for new event by giving new event path and root object. More...

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. More...

virtual StatusCode setDataLoader ( IConversionSvc* svc )
 Pass a default data loader to the service. More...

virtual StatusCode addPreLoadItem ( const DataStoreItem& item )
 Add an item to the preload list. More...

virtual StatusCode addPreLoadItem ( const std::string& itemPath )
 Add an item to the preload list. More...

virtual StatusCode removePreLoadItem ( const DataStoreItem& item )
 Remove an item from the preload list. More...

virtual StatusCode removePreLoadItem ( const std::string& itemPath )
 Add an item to the preload list. More...

virtual StatusCode resetPreLoad ()
 Clear the preload list. More...

virtual StatusCode preLoad ( int depth, int load_depth, DataObject* pObject )
 Execute one level of preloading and recursively load until the final level is reached. More...

virtual StatusCode preLoad ()
 load all preload items of the list. More...

virtual StatusCode registerObject ( const std::string& fullPath, DataObject* pObject )
 Register object with the data store. More...

virtual StatusCode registerObject ( const std::string& parentPath, const std::string& objPath, DataObject* pObject )
 Register object with the data store. More...

virtual StatusCode registerObject ( const std::string& parentPath, int item, DataObject* pObject )
 Register object with the data store. More...

virtual StatusCode registerObject ( DataObject* parentObj, const std::string& objPath, DataObject* pObject )
 Register object with the data store. More...

virtual StatusCode registerObject ( DataObject* parentObj, int item, DataObject* pObject )
 Register object with the data store. More...

virtual StatusCode unregisterObject ( const std::string& fullPath )
 Unregister object from the data store. More...

virtual StatusCode unregisterObject ( const std::string& parentPath, const std::string& objectPath )
 Unregister object from the data store. More...

virtual StatusCode unregisterObject ( const std::string& parentPath, int item )
 Unregister object from the data store. More...

virtual StatusCode unregisterObject ( DataObject* pObject )
 Unregister object from the data store. More...

virtual StatusCode unregisterObject ( DataObject* pObject, const std::string& objectPath )
 Unregister object from the data store. More...

virtual StatusCode unregisterObject ( DataObject* pObject, int item )
 Unregister object from the data store. More...

virtual StatusCode retrieveObject ( IDataDirectory* pDirectory, const std::string& path, DataObject*& pObject )
 Retrieve object from data store. More...

virtual StatusCode retrieveObject ( const std::string& fullPath, DataObject*& pObject )
 Retrieve object identified by its full path from the data store. More...

virtual StatusCode retrieveObject ( const std::string& parentPath, const std::string& objPath, DataObject*& pObject )
 Retrieve object from data store. More...

virtual StatusCode retrieveObject ( const std::string& parentPath, int item, DataObject*& pObject )
 Retrieve object from data store. More...

virtual StatusCode retrieveObject ( DataObject* parentObj, const std::string& objPath, DataObject*& pObject )
 Retrieve object from data store. More...

virtual StatusCode retrieveObject ( DataObject* parentObj, int item, DataObject*& pObject )
 Retrieve object from data store. More...

virtual StatusCode findObject ( const std::string& fullPath, DataObject*& pObject )
 Find object identified by its full path in the data store. More...

virtual StatusCode findObject ( IDataDirectory* pDirectory, const std::string& path, DataObject*& pObject )
 Find object identified by its full path in the data store. More...

virtual StatusCode findObject ( const std::string& parentPath, const std::string& objPath, DataObject*& pObject )
 Find object in the data store. More...

virtual StatusCode findObject ( const std::string& parentPath, int item, DataObject*& pObject )
 Find object in the data store. More...

virtual StatusCode findObject ( DataObject* parentObj, const std::string& objPath, DataObject*& pObject )
 Find object in the data store. More...

virtual StatusCode findObject ( DataObject* parentObj, int item, DataObject*& pObject )
 Find object in the data store. More...

virtual StatusCode updateRegistryEntry ( IOpaqueAddress* pAddress, DataObject* pObj )
 Update existing registry entry. More...

virtual StatusCode linkObject ( IDataDirectory* from, const std::string& objPath, DataObject* to )
 Add a link to another object. More...

virtual StatusCode linkObject ( const std::string& fromPath, const std::string& objPath, DataObject* to )
 Add a link to another object. More...

virtual StatusCode linkObject ( DataObject* from, const std::string& objPath, DataObject* to )
 Add a link to another object. More...

virtual StatusCode linkObject ( const std::string& fullPath, DataObject* to )
 Add a link to another object. More...

virtual StatusCode unlinkObject ( IDataDirectory* from, const std::string& objPath )
 Remove a link to another object. More...

virtual StatusCode unlinkObject ( const std::string& fromPath, const std::string& objPath )
 Remove a link to another object. More...

virtual StatusCode unlinkObject ( DataObject* fromObj, const std::string& objPath )
 Remove a link to another object. More...

virtual StatusCode unlinkObject ( const std::string& fullPath )
 Remove a link to another object. More...

virtual StatusCode updateObject (IDataDirectory* pDirectory )
 Update object identified by its directory entry. More...

virtual StatusCode updateObject ( const std::string& updatePath )
 Update object. More...

virtual StatusCode updateObject ( DataObject* toUpdate )
 Update object. More...

virtual StatusCode updateObject ( const std::string& parentPath, const std::string& updatePath )
 Update object. More...

virtual StatusCode updateObject ( DataObject* pParent, const std::string& updatePath )
 Update object. More...

virtual StatusCode queryInterface ( const IID& riid, void** ppvUnknown )
 Query interface. More...

virtual StatusCode initialize ()
 Service initialisation. More...

virtual StatusCode finalize ()
 Service initialisation. More...


Protected Methods

 DataSvc ( const std::string& name, ISvcLocator* svc )
 Standard Constructor. More...

virtual ~DataSvc ()
 Standard Destructor. More...

bool checkRoot ()
 Check if root path is valid. More...

StatusCode retrieveEntry ( RegistryEntry* pNode,const std::string& path, RegistryEntry*& pEntry )
 Retrieve registry entry from store. More...

virtual StatusCode loadObject ( IDataDirectory* pNode )
 Invoke Persistency service to create transient object from its persistent representation. More...


Protected Attributes

TransientStore m_root
 Pointer to root entry. More...

int m_rootEventCLID
 Integer Property corresponding to CLID of root entry. More...

std::string m_rootEventName
 Name of root event. More...

IConversionSvcm_dataLoader
 Pointer to data loader service. More...

LoadItems m_preLoads
 Items to be pre - loaded. More...


Friends

class  SvcFactory< DataSvc >

Detailed Description

Data service base class.

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

Author(s):
Markus Frank
Version:
1.0

Definition at line 32 of file DataSvc.h.


Member Typedef Documentation

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

Define set of load items.

Definition at line 40 of file DataSvc.h.


Constructor & Destructor Documentation

DataSvc::DataSvc ( const std::string & name,
ISvcLocator * svc ) [protected]
 

Standard Constructor.

Definition at line 923 of file DataSvc.cpp.

DataSvc::~DataSvc ( ) [protected, virtual]
 

Standard Destructor.

Definition at line 934 of file DataSvc.cpp.


Member Function Documentation

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

Add an item to the preload list.

Reimplemented from IDataProviderSvc.

Definition at line 827 of file DataSvc.cpp.

StatusCode DataSvc::addPreLoadItem ( const DataStoreItem & item ) [virtual]
 

Add an item to the preload list.

Reimplemented from IDataProviderSvc.

Definition at line 818 of file DataSvc.cpp.

Referenced by addPreLoadItem().

bool DataSvc::checkRoot ( ) [inline, protected]
 

Check if root path is valid.

Definition at line 239 of file DataSvc.h.

Referenced by clearStore(), clearSubTree(), findObject(), linkObject(), registerObject(), retrieveObject(), traverseSubTree(), traverseTree(), unlinkObject(), unregisterObject(), and updateObject().

StatusCode DataSvc::clearStore ( ) [virtual]
 

Remove all data objects in the data store.

Reimplemented from IDataManagerSvc.

Definition at line 83 of file DataSvc.cpp.

Referenced by finalize(), setRoot(), and ~DataSvc().

StatusCode DataSvc::clearSubTree ( DataObject * pObject ) [virtual]
 

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

Reimplemented from IDataManagerSvc.

Definition at line 66 of file DataSvc.cpp.

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

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

Reimplemented from IDataManagerSvc.

Definition at line 49 of file DataSvc.cpp.

StatusCode DataSvc::finalize ( ) [virtual]
 

Service initialisation.

Reimplemented from Service.

Definition at line 904 of file DataSvc.cpp.

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

Find object in the data store.

Reimplemented from IDataProviderSvc.

Definition at line 584 of file DataSvc.cpp.

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

Find object in the data store.

Reimplemented from IDataProviderSvc.

Definition at line 591 of file DataSvc.cpp.

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

Find object in the data store.

Reimplemented from IDataProviderSvc.

Definition at line 574 of file DataSvc.cpp.

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

Find object in the data store.

Reimplemented from IDataProviderSvc.

Definition at line 564 of file DataSvc.cpp.

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

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

Reimplemented from IDataProviderSvc.

Definition at line 536 of file DataSvc.cpp.

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

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

Reimplemented from IDataProviderSvc.

Definition at line 550 of file DataSvc.cpp.

Referenced by findObject(), and updateObject().

StatusCode DataSvc::initialize ( ) [virtual]
 

Service initialisation.

Reimplemented from Service.

Definition at line 898 of file DataSvc.cpp.

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

Add a link to another object.

Reimplemented from IDataProviderSvc.

Definition at line 711 of file DataSvc.cpp.

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

Add a link to another object.

Reimplemented from IDataProviderSvc.

Definition at line 731 of file DataSvc.cpp.

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

Add a link to another object.

Reimplemented from IDataProviderSvc.

Definition at line 722 of file DataSvc.cpp.

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

Add a link to another object.

Reimplemented from IDataProviderSvc.

Definition at line 689 of file DataSvc.cpp.

Referenced by linkObject().

StatusCode DataSvc::loadObject ( IDataDirectory * pDirectory ) [protected, virtual]
 

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

Definition at line 393 of file DataSvc.cpp.

Referenced by retrieveEntry(), retrieveObject(), and updateObject().

StatusCode DataSvc::preLoad ( ) [virtual]
 

load all preload items of the list.

Reimplemented from IDataProviderSvc.

Definition at line 870 of file DataSvc.cpp.

Referenced by preLoad(), and setRoot().

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:
depth   current level of loading from requested parent
load_depth   maximum level of object loading
pObject   pointer to next level root object
Returns:
Status code indicating success or failure.

Definition at line 852 of file DataSvc.cpp.

StatusCode DataSvc::queryInterface ( const IID & riid,
void ** ppvInterface ) [virtual]
 

Query interface.

Reimplemented from Service.

Definition at line 883 of file DataSvc.cpp.

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

Register object with the data store.

Reimplemented from IDataProviderSvc.

Definition at line 227 of file DataSvc.cpp.

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

Register object with the data store.

Reimplemented from IDataProviderSvc.

Definition at line 199 of file DataSvc.cpp.

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

Register object with the data store.

Reimplemented from IDataProviderSvc.

Definition at line 184 of file DataSvc.cpp.

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

Register object with the data store.

Reimplemented from IDataProviderSvc.

Definition at line 171 of file DataSvc.cpp.

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

Register object with the data store.

Reimplemented from IDataProviderSvc.

Definition at line 155 of file DataSvc.cpp.

Referenced by registerObject().

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

Add an item to the preload list.

Reimplemented from IDataProviderSvc.

Definition at line 841 of file DataSvc.cpp.

StatusCode DataSvc::removePreLoadItem ( const DataStoreItem & item ) [virtual]
 

Remove an item from the preload list.

Reimplemented from IDataProviderSvc.

Definition at line 832 of file DataSvc.cpp.

Referenced by removePreLoadItem().

StatusCode DataSvc::resetPreLoad ( ) [virtual]
 

Clear the preload list.

Reimplemented from IDataProviderSvc.

Definition at line 846 of file DataSvc.cpp.

Referenced by finalize(), and ~DataSvc().

StatusCode DataSvc::retrieveEntry ( RegistryEntry * parentObj,
const std::string & path,
RegistryEntry *& pEntry ) [protected]
 

Retrieve registry entry from store.

Definition at line 427 of file DataSvc.cpp.

Referenced by retrieveObject().

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

Retrieve object from data store.

Reimplemented from IDataProviderSvc.

Definition at line 529 of file DataSvc.cpp.

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

Retrieve object from data store.

Reimplemented from IDataProviderSvc.

Definition at line 509 of file DataSvc.cpp.

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

Retrieve object from data store.

Reimplemented from IDataProviderSvc.

Definition at line 499 of file DataSvc.cpp.

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

Retrieve object from data store.

Reimplemented from IDataProviderSvc.

Definition at line 489 of file DataSvc.cpp.

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

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

Reimplemented from IDataProviderSvc.

Definition at line 483 of file DataSvc.cpp.

StatusCode DataSvc::retrieveObject ( IDataDirectory * pDirectory,
const std::string & path,
DataObject *& pObject ) [virtual]
 

Retrieve object from data store.

Reimplemented from IDataProviderSvc.

Definition at line 459 of file DataSvc.cpp.

Referenced by preLoad(), and retrieveObject().

CLID DataSvc::rootEventCLID ( ) const [virtual]
 

Accessor for root event CLID.

Reimplemented from IDataManagerSvc.

Definition at line 913 of file DataSvc.cpp.

std::string DataSvc::rootEventName ( ) const [virtual]
 

Name for root Event.

Reimplemented from IDataManagerSvc.

Definition at line 918 of file DataSvc.cpp.

StatusCode DataSvc::setDataLoader ( IConversionSvc * pDataLoader ) [virtual]
 

Pass a default data loader to the service.

Reimplemented from IDataManagerSvc.

Definition at line 147 of file DataSvc.cpp.

Referenced by finalize(), and ~DataSvc().

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.

Reimplemented from IDataManagerSvc.

Definition at line 136 of file DataSvc.cpp.

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.

Reimplemented from IDataManagerSvc.

Definition at line 125 of file DataSvc.cpp.

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

Analyse by traversing all data objects below the sub tree.

Reimplemented from IDataManagerSvc.

Definition at line 105 of file DataSvc.cpp.

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

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

Reimplemented from IDataManagerSvc.

Definition at line 93 of file DataSvc.cpp.

StatusCode DataSvc::traverseTree ( IDataStoreAgent * pAgent ) [virtual]
 

Analyse by traversing all data objects in the data store.

Reimplemented from IDataManagerSvc.

Definition at line 117 of file DataSvc.cpp.

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

Remove a link to another object.

Reimplemented from IDataProviderSvc.

Definition at line 753 of file DataSvc.cpp.

StatusCode DataSvc::unlinkObject ( DataObject * from,
const std::string & objPath ) [virtual]
 

Remove a link to another object.

Reimplemented from IDataProviderSvc.

Definition at line 777 of file DataSvc.cpp.

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

Remove a link to another object.

Reimplemented from IDataProviderSvc.

Definition at line 768 of file DataSvc.cpp.

StatusCode DataSvc::unlinkObject ( IDataDirectory * from,
const std::string & objPath ) [virtual]
 

Remove a link to another object.

Reimplemented from IDataProviderSvc.

Definition at line 740 of file DataSvc.cpp.

Referenced by unlinkObject().

StatusCode DataSvc::unregisterObject ( DataObject * pParentObj,
int item ) [virtual]
 

Unregister object from the data store.

Reimplemented from IDataProviderSvc.

Definition at line 365 of file DataSvc.cpp.

StatusCode DataSvc::unregisterObject ( DataObject * pParentObj,
const std::string & objectPath ) [virtual]
 

Unregister object from the data store.

Reimplemented from IDataProviderSvc.

Definition at line 338 of file DataSvc.cpp.

StatusCode DataSvc::unregisterObject ( DataObject * pObject ) [virtual]
 

Unregister object from the data store.

Reimplemented from IDataProviderSvc.

Definition at line 315 of file DataSvc.cpp.

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

Unregister object from the data store.

Reimplemented from IDataProviderSvc.

Definition at line 290 of file DataSvc.cpp.

StatusCode DataSvc::unregisterObject ( const std::string & parentPath,
const std::string & objPath ) [virtual]
 

Unregister object from the data store.

Reimplemented from IDataProviderSvc.

Definition at line 267 of file DataSvc.cpp.

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

Unregister object from the data store.

Reimplemented from IDataProviderSvc.

Definition at line 242 of file DataSvc.cpp.

StatusCode DataSvc::updateObject ( DataObject * parent,
const std::string & updatePath ) [virtual]
 

Update object.

Reimplemented from IDataProviderSvc.

Definition at line 679 of file DataSvc.cpp.

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

Update object.

Reimplemented from IDataProviderSvc.

Definition at line 669 of file DataSvc.cpp.

StatusCode DataSvc::updateObject ( DataObject * toUpdate ) [virtual]
 

Update object.

Reimplemented from IDataProviderSvc.

Definition at line 638 of file DataSvc.cpp.

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

Update object.

Reimplemented from IDataProviderSvc.

Definition at line 611 of file DataSvc.cpp.

StatusCode DataSvc::updateObject ( IDataDirectory * pDirectory ) [virtual]
 

Update object identified by its directory entry.

Reimplemented from IDataProviderSvc.

Definition at line 626 of file DataSvc.cpp.

Referenced by updateObject().

StatusCode DataSvc::updateRegistryEntry ( IOpaqueAddress * pAddress,
DataObject * pObj ) [virtual]
 

Update existing registry entry.

Reimplemented from IDataProviderSvc.

Definition at line 786 of file DataSvc.cpp.


Friends And Related Function Documentation

class SvcFactory [friend]
 

The class creator is of course a friend!

Definition at line 36 of file DataSvc.h.


Member Data Documentation

IConversionSvc * DataSvc::m_dataLoader [protected]
 

Pointer to data loader service.

Definition at line 54 of file DataSvc.h.

LoadItems DataSvc::m_preLoads [protected]
 

Items to be pre - loaded.

Definition at line 56 of file DataSvc.h.

TransientStore DataSvc::m_root [protected]
 

Pointer to root entry.

Definition at line 48 of file DataSvc.h.

int DataSvc::m_rootEventCLID [protected]
 

Integer Property corresponding to CLID of root entry.

Definition at line 50 of file DataSvc.h.

std::string DataSvc::m_rootEventName [protected]
 

Name of root event.

Definition at line 52 of file DataSvc.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:22:09 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000