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

Data service base class. More...

#include <GaudiKernel/DataSvc.h>

Inheritance diagram for DataSvc:
Collaboration diagram for DataSvc:

Public Types

typedef std::vector
< DataStoreItem
LoadItems
 Define set of load items. More...
 
- Public Types inherited from extends2< Service, IDataProviderSvc, IDataManagerSvc >
typedef extends2 base_class
 Typedef to this class. More...
 
typedef extend_interfaces2
< IDataProviderSvc,
IDataManagerSvc
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from Service
typedef
Gaudi::PluginService::Factory
< IService *, const
std::string &, ISvcLocator * > 
Factory
 
- Public Types inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
typedef CommonMessaging base_class
 
- Public Types inherited from implements3< IService, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class. More...
 
typedef extend_interfaces3
< IService, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces3< IService, IProperty, IStateful >
typedef mpl::fold< typename
IService::iid::iids::type,
typename mpl::fold< typename
IProperty::iid::iids::type,
typename
IStateful::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 
typedef Gaudi::InterfaceId
< IInterface, 0, 0 > 
iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
- Public Types inherited from extend_interfaces2< IDataProviderSvc, IDataManagerSvc >
typedef mpl::fold< typename
IDataProviderSvc::iid::iids::type,
typename
IDataManagerSvc::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IDataProviderSvc
enum  { SEPARATOR = '/' }
 
enum  Status {
  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 Member Functions

virtual CLID rootCLID () const
 IDataManagerSvc: Accessor for root event CLID. More...
 
virtual std::string rootName () const
 IDataManagerSvc: Accessor for root event name. More...
 
virtual StatusCode registerAddress (const std::string &fullPath, IOpaqueAddress *pAddress)
 IDataManagerSvc: Register object address with the data store. More...
 
virtual StatusCode registerAddress (DataObject *parentObj, const std::string &objectPath, IOpaqueAddress *pAddress)
 IDataManagerSvc: Register object address with the data store. More...
 
virtual StatusCode registerAddress (IRegistry *parentObj, const std::string &objectPath, IOpaqueAddress *pAddress)
 IDataManagerSvc: Register object address with the data store. More...
 
virtual StatusCode unregisterAddress (const std::string &fullPath)
 IDataManagerSvc: Unregister object address from the data store. More...
 
virtual StatusCode unregisterAddress (DataObject *pParent, const std::string &objPath)
 IDataManagerSvc: Unregister object address from the data store. More...
 
virtual StatusCode unregisterAddress (IRegistry *pParent, const std::string &objPath)
 IDataManagerSvc: Unregister object address from the data store. More...
 
virtual StatusCode objectLeaves (const DataObject *pObject, std::vector< IRegistry * > &refLeaves)
 IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object. More...
 
virtual StatusCode objectLeaves (const IRegistry *pRegistry, std::vector< IRegistry * > &refLeaves)
 IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object. More...
 
virtual StatusCode objectParent (const DataObject *pObject, IRegistry *&refpParent)
 IDataManagerSvc: Explore the object store: retrieve the object's parent. More...
 
virtual StatusCode objectParent (const IRegistry *pRegistry, IRegistry *&refpParent)
 IDataManagerSvc: Explore the object store: retrieve the object's parent. More...
 
virtual StatusCode clearSubTree (const std::string &sub_tree_path)
 IDataManagerSvc: Remove all data objects below the sub tree identified by its full path name. More...
 
virtual StatusCode clearSubTree (DataObject *pObject)
 IDataManagerSvc: Remove all data objects below the sub tree identified by the object. More...
 
virtual StatusCode clearStore ()
 IDataManagerSvc: Remove all data objects in the data store. More...
 
virtual StatusCode traverseSubTree (const std::string &sub_tree_path, IDataStoreAgent *pAgent)
 IDataManagerSvc: Analyze by traversing all data objects below the sub tree identified by its full path name. More...
 
virtual StatusCode traverseSubTree (DataObject *pObject, IDataStoreAgent *pAgent)
 IDataManagerSvc: Analyze by traversing all data objects below the sub tree. More...
 
virtual StatusCode traverseTree (IDataStoreAgent *pAgent)
 IDataManagerSvc: Analyze 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 i_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 i_setRoot (const std::string &root_path, IOpaqueAddress *pRootAddr)
 Initialize data store for new event by giving new event path and address of root object. More...
 
virtual StatusCode setDataLoader (IConversionSvc *svc)
 IDataManagerSvc: IDataManagerSvc: 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 (IRegistry *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 (IRegistry *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 linkObject (IRegistry *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 (IRegistry *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 (IRegistry *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 initialize ()
 Service initialization. More...
 
virtual StatusCode reinitialize ()
 Service initialization. More...
 
virtual StatusCode finalize ()
 Service initialization. More...
 
 DataSvc (const std::string &name, ISvcLocator *svc)
 Standard Constructor. More...
 
virtual ~DataSvc ()
 Standard Destructor. More...
 
- Public Member Functions inherited from extends2< Service, IDataProviderSvc, IDataManagerSvc >
 extends2 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
 extends2 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
 extends2 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends2 ()
 Default constructor. More...
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface. More...
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames. More...
 
virtual ~extends2 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from Service
virtual unsigned long release ()
 Release Interface instance. More...
 
virtual const std::string & name () const
 Retrieve name of the service. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual StatusCode sysInitialize ()
 Initialize Service. More...
 
virtual StatusCode sysStart ()
 Initialize Service. More...
 
virtual StatusCode sysStop ()
 Initialize Service. More...
 
virtual StatusCode sysFinalize ()
 Finalize Service. More...
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service. More...
 
virtual StatusCode sysRestart ()
 Re-initialize the Service. More...
 
virtual StatusCode setProperty (const Property &p)
 Set the property by property. More...
 
virtual StatusCode setProperty (const std::string &s)
 Set the property by string. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string. More...
 
virtual StatusCode getProperty (Property *p) const
 Get the property by property. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string. More...
 
virtual const std::vector
< Property * > & 
getProperties () const
 Get list of properties. More...
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const
 Retrieve pointer to service locator. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job. More...
 
template<class T >
StatusCode service (const std::string &name, const T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments. More...
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments. More...
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument. More...
 
 CommonMessaging ()
 Default constructor. More...
 
virtual ~CommonMessaging ()
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
- Public Member Functions inherited from extend_interfaces3< IService, IProperty, IStateful >
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IService
 DeclareInterfaceID (IService, 3, 0)
 InterfaceID. More...
 
virtual ~IService ()
 virtual destructor More...
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
- Public Member Functions inherited from IInterface
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IProperty
 DeclareInterfaceID (IProperty, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 
- Public Member Functions inherited from extend_interfaces2< IDataProviderSvc, IDataManagerSvc >
virtual ~extend_interfaces2 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IDataProviderSvc
 DeclareInterfaceID (IDataProviderSvc, 3, 0)
 InterfaceID. More...
 
virtual ~IDataProviderSvc ()
 virtual destructor More...
 
- Public Member Functions inherited from IDataManagerSvc
 DeclareInterfaceID (IDataManagerSvc, 2, 0)
 InterfaceID. More...
 

Protected Member Functions

bool checkRoot ()
 Check if root path is valid. More...
 
virtual IConversionSvcgetDataLoader (IRegistry *pReg)
 Retrieve customizable data loader according to registry entry to be retrieved. More...
 
virtual DataObjectcreateDefaultObject () const
 Create default objects in case forced creation of leaves is requested. More...
 
virtual StatusCode loadObject (IRegistry *pNode)
 Invoke Persistency service to create transient object from its persistent representation. More...
 
virtual StatusCode loadObject (IConversionSvc *pLoader, IRegistry *pNode)
 Invoke Persistency service to create transient object from its persistent representation. More...
 
StatusCode retrieveEntry (DataSvcHelpers::RegistryEntry *pNode, const std::string &path, DataSvcHelpers::RegistryEntry *&pEntry)
 Retrieve registry entry from store. More...
 
DataObjecthandleDataFault (IRegistry *pReg, const std::string &path="")
 Invoke data fault handling if enabled. More...
 
- Protected Member Functions inherited from Service
virtual ~Service ()
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Protected Attributes

CLID m_rootCLID
 Integer Property corresponding to CLID of root entry. More...
 
std::string m_rootName
 Name of root event. More...
 
IConversionSvcm_dataLoader
 Pointer to data loader service. More...
 
IIncidentSvcm_incidentSvc
 Pointer to incident service. More...
 
LoadItems m_preLoads
 Items to be pre-loaded. More...
 
bool m_forceLeaves
 Allow forced creation of default leaves on registerObject. More...
 
bool m_enableAccessHdlr
 Flag to enable interrupts on data access requests. More...
 
bool m_enableFaultHdlr
 Flag to enable interrupts on data creation requests. More...
 
DataSvcHelpers::RegistryEntrym_root
 Pointer to root entry. More...
 
DataSvcHelpers::InhibitMap * m_inhibitMap
 Map with object paths to be inhibited from loading. More...
 
std::vector< std::string > m_inhibitPathes
 Property for the inhibited leaves. More...
 
std::string m_accessName
 Name of the data access incident. More...
 
std::string m_faultName
 Name of the data fault incident. More...
 
- Protected Attributes inherited from Service
IntegerProperty m_outputLevel
 Service output level. More...
 
Gaudi::StateMachine::State m_state
 Service state. More...
 
Gaudi::StateMachine::State m_targetState
 Service state. More...
 
- Protected Attributes inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
SmartIF< IMessageSvcm_msgsvc
 Pointer to the message service;. More...
 
std::auto_ptr< MsgStreamm_msgStream
 The predefined message stream. More...
 
bool m_streamWithService
 Flag to create a new MsgStream if it was created without the message service. More...
 

Private Member Functions

 DataSvc (const DataSvc &)
 Fake copy constructor (never implemented). More...
 
DataSvcoperator= (const DataSvc &)
 Fake assignment operator (never implemented). More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 

Detailed Description

Data service base class.

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

Author
Markus Frank
Sebastien Ponce
Version
1.0

Definition at line 39 of file DataSvc.h.

Member Typedef Documentation

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

Define set of load items.

Definition at line 43 of file DataSvc.h.

Constructor & Destructor Documentation

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

Standard Constructor.

Definition at line 1371 of file DataSvc.cpp.

1372 : base_class(name,svc), m_rootCLID( /*CLID_Event*/ 110),
1373  m_rootName( "/Event"), m_root(0)
1374 {
1375  m_dataLoader = 0;
1376  m_inhibitMap = 0;
1377  m_incidentSvc = 0;
1378  m_forceLeaves = false;
1379  m_enableFaultHdlr = false;
1380  m_enableAccessHdlr = false;
1381  m_faultName = "DataFault";
1382  m_accessName = "DataAccess";
1383  declareProperty("RootCLID", m_rootCLID);
1384  declareProperty("RootName", m_rootName);
1385  declareProperty("ForceLeaves", m_forceLeaves);
1386  declareProperty("InhibitPathes", m_inhibitPathes);
1387  declareProperty("DataFaultName", m_faultName);
1388  declareProperty("DataAccessName", m_accessName);
1389  declareProperty("EnableFaultHandler", m_enableFaultHdlr);
1390  declareProperty("EnableAccessHandler", m_enableAccessHdlr);
1391 }
bool m_enableAccessHdlr
Flag to enable interrupts on data access requests.
Definition: DataSvc.h:59
bool m_enableFaultHdlr
Flag to enable interrupts on data creation requests.
Definition: DataSvc.h:61
extends2 base_class
Typedef to this class.
Definition: extends.h:77
std::string m_rootName
Name of root event.
Definition: DataSvc.h:49
std::string m_accessName
Name of the data access incident.
Definition: DataSvc.h:69
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
IIncidentSvc * m_incidentSvc
Pointer to incident service.
Definition: DataSvc.h:53
IConversionSvc * m_dataLoader
Pointer to data loader service.
Definition: DataSvc.h:51
DataSvcHelpers::InhibitMap * m_inhibitMap
Map with object paths to be inhibited from loading.
Definition: DataSvc.h:65
bool m_forceLeaves
Allow forced creation of default leaves on registerObject.
Definition: DataSvc.h:57
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
std::string m_faultName
Name of the data fault incident.
Definition: DataSvc.h:71
std::vector< std::string > m_inhibitPathes
Property for the inhibited leaves.
Definition: DataSvc.h:67
CLID m_rootCLID
Integer Property corresponding to CLID of root entry.
Definition: DataSvc.h:47
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:211
DataSvc::~DataSvc ( )
virtual

Standard Destructor.

Definition at line 1394 of file DataSvc.cpp.

1394  {
1395  setDataLoader(0).ignore();
1396  resetPreLoad().ignore();
1397  clearStore().ignore();
1398 }
virtual StatusCode setDataLoader(IConversionSvc *svc)
IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service.
Definition: DataSvc.cpp:204
virtual StatusCode resetPreLoad()
Clear the preload list.
Definition: DataSvc.cpp:1258
virtual StatusCode clearStore()
IDataManagerSvc: Remove all data objects in the data store.
Definition: DataSvc.cpp:108
void ignore() const
Definition: StatusCode.h:94
DataSvc::DataSvc ( const DataSvc )
private

Fake copy constructor (never implemented).

Member Function Documentation

StatusCode DataSvc::addPreLoadItem ( const DataStoreItem item)
virtual

Add an item to the preload list.

Implements IDataProviderSvc.

Definition at line 1229 of file DataSvc.cpp.

1229  {
1230  LoadItems::iterator i = std::find(m_preLoads.begin(), m_preLoads.end(), item);
1231  if ( i == m_preLoads.end() ) {
1232  m_preLoads.push_back(item);
1233  }
1234  return StatusCode::SUCCESS;
1235 }
LoadItems m_preLoads
Items to be pre-loaded.
Definition: DataSvc.h:55
tuple item
print s1,s2
Definition: ana.py:146
list i
Definition: ana.py:128
StatusCode DataSvc::addPreLoadItem ( const std::string &  itemPath)
virtual

Add an item to the preload list.

Implements IDataProviderSvc.

Definition at line 1238 of file DataSvc.cpp.

1238  {
1239  return addPreLoadItem( DataStoreItem(itemPath,1) );
1240 }
Description of the DataStoreItem class.
Definition: DataStoreItem.h:18
virtual StatusCode addPreLoadItem(const DataStoreItem &item)
Add an item to the preload list.
Definition: DataSvc.cpp:1229
bool DataSvc::checkRoot ( )
inlineprotected

Check if root path is valid.

Definition at line 384 of file DataSvc.h.

384  {
385  return 0 != m_root;
386  }
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
StatusCode DataSvc::clearStore ( )
virtual

IDataManagerSvc: Remove all data objects in the data store.

Implements IDataManagerSvc.

Reimplemented in DetDataSvc.

Definition at line 108 of file DataSvc.cpp.

108  {
109  if ( checkRoot() ) {
110  m_root->release();
111  m_root = 0;
112  return SUCCESS;
113  }
114  return INVALID_ROOT;
115 }
Invalid root path object cannot be retrieved or stored.
Normal successful completion.
Definition: IInterface.h:219
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
virtual unsigned long release()
IInterface implementation: Reference the object.
StatusCode DataSvc::clearSubTree ( const std::string &  sub_tree_path)
virtual

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

Implements IDataManagerSvc.

Definition at line 70 of file DataSvc.cpp.

70  {
71  DataObject* pObject = 0;
72  StatusCode status = findObject(sub_tree_path, pObject);
73  if ( status.isSuccess() ) {
74  RegEntry* node_entry = CAST_REGENTRY(RegEntry*,pObject->registry());
75  if ( 0 != node_entry ) {
76  RegEntry* parent = node_entry->parentEntry();
77  if ( 0 != parent ) {
78  parent->remove(node_entry);
79  return StatusCode::SUCCESS;
80  }
81  return INVALID_PARENT;
82  }
83  return INVALID_OBJECT;
84  }
85  return status;
86 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual long remove(const std::string &name)
Remove an entry from the store.
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
virtual RegistryEntry * parentEntry()
Pointer to parent registry entry.
Definition: RegistryEntry.h:85
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
Pointer to parent object is not valid.
Object pointer is invalid.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::clearSubTree ( DataObject pObject)
virtual

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

Implements IDataManagerSvc.

Definition at line 91 of file DataSvc.cpp.

91  {
92  if ( checkRoot() ) {
93  RegEntry* entry = CAST_REGENTRY(RegEntry*,pObject->registry());
94  if ( 0 != entry ) {
95  RegEntry* parent = entry->parentEntry();
96  if ( 0 != parent ) {
97  parent->remove(entry);
98  return SUCCESS;
99  }
100  return INVALID_PARENT;
101  }
102  return INVALID_OBJECT;
103  }
104  return INVALID_ROOT;
105 }
Invalid root path object cannot be retrieved or stored.
Normal successful completion.
Definition: IInterface.h:219
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
virtual long remove(const std::string &name)
Remove an entry from the store.
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
virtual RegistryEntry * parentEntry()
Pointer to parent registry entry.
Definition: RegistryEntry.h:85
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
Pointer to parent object is not valid.
Object pointer is invalid.
DataObject * DataSvc::createDefaultObject ( ) const
protectedvirtual

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

Definition at line 1359 of file DataSvc.cpp.

1359  {
1360  return new DataObject();
1361 }
StatusCode DataSvc::finalize ( )
virtual

Service initialization.

Service initialisation.

Reimplemented from Service.

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

Definition at line 1336 of file DataSvc.cpp.

1336  {
1337  // Nothing to do: just call base class initialisation
1338  setDataLoader(0).ignore();
1339  resetPreLoad().ignore();
1340  clearStore().ignore();
1341  if ( m_incidentSvc ) {
1343  m_incidentSvc = 0;
1344  }
1345  return Service::finalize();
1346 }
virtual StatusCode setDataLoader(IConversionSvc *svc)
IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service.
Definition: DataSvc.cpp:204
virtual StatusCode resetPreLoad()
Clear the preload list.
Definition: DataSvc.cpp:1258
IIncidentSvc * m_incidentSvc
Pointer to incident service.
Definition: DataSvc.h:53
virtual unsigned long release()=0
Release Interface instance.
virtual StatusCode clearStore()
IDataManagerSvc: Remove all data objects in the data store.
Definition: DataSvc.cpp:108
void ignore() const
Definition: StatusCode.h:94
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
Definition: Service.cpp:199
StatusCode DataSvc::findObject ( const std::string &  fullPath,
DataObject *&  pObject 
)
virtual

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

Implements IDataProviderSvc.

Definition at line 937 of file DataSvc.cpp.

938  {
939  pObject = 0;
940  if ( checkRoot() ) {
941  if ( path.length() == 0 || path == m_rootName ) {
942  pObject = m_root->object();
943  return (0 == pObject) ? OBJ_NOT_LOADED : IDataProviderSvc_NO_ERROR;
944  }
945  else if ( path[0] != SEPARATOR ) {
946  return findObject(m_rootName, path, pObject);
947  }
948  return findObject((IRegistry*)0, path, pObject);
949  }
950  return INVALID_ROOT;
951 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
Invalid root path object cannot be retrieved or stored.
Sorry, the requested object is not loaded.
std::string m_rootName
Name of root event.
Definition: DataSvc.h:49
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
virtual DataObject * object() const
Retrive object behind the link.
StatusCode DataSvc::findObject ( IRegistry pDirectory,
const std::string &  path,
DataObject *&  pObject 
)
virtual

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

Retrieve object identified by its directory from the data store.

Implements IDataProviderSvc.

Definition at line 918 of file DataSvc.cpp.

920  {
921  pObject = 0;
922  IRegistry* pReg = (0==pRegistry) ? m_root : pRegistry;
923  RegEntry* root_entry = CAST_REGENTRY(RegEntry*, pReg);
924  if ( 0 != root_entry ) {
925  if ( path.length() > 0 ) {
926  pReg = root_entry->find(path);
927  }
928  if ( 0 == pReg ) {
929  return INVALID_OBJ_PATH;
930  }
931  pObject = pReg->object();
932  }
933  return (0 == pObject) ? OBJ_NOT_LOADED : IDataProviderSvc_NO_ERROR;
934 }
Sorry, the requested object is not loaded.
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
virtual DataObject * object() const =0
Retrieve object behind the link.
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
Invalid path from root to object request failed.
virtual IRegistry * find(const IRegistry *obj) const
Try to find an object identified by its pointer.
StatusCode DataSvc::findObject ( const std::string &  parentPath,
const std::string &  objPath,
DataObject *&  pObject 
)
virtual

Find object in the data store.

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

Implements IDataProviderSvc.

Definition at line 954 of file DataSvc.cpp.

956  {
957  DataObject* parent = 0;
958  StatusCode status = findObject(parentPath, parent);
959  if ( status.isSuccess() ) {
960  status = findObject (parent, objectPath, pObject);
961  }
962  return status;
963 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::findObject ( const std::string &  parentPath,
int  item,
DataObject *&  pObject 
)
virtual

Find object in the data store.

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

Implements IDataProviderSvc.

Definition at line 966 of file DataSvc.cpp.

967  {
968  return findObject(parentPath, itemToPath(item), pObject);
969 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
tuple item
print s1,s2
Definition: ana.py:146
StatusCode DataSvc::findObject ( DataObject parentObj,
const std::string &  objPath,
DataObject *&  pObject 
)
virtual

Find object in the data store.

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

Implements IDataProviderSvc.

Definition at line 979 of file DataSvc.cpp.

981  {
982  IRegistry* pDir = (0==parentObj) ? 0 : parentObj->registry();
983  return findObject(pDir, path, pObject);
984 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
StatusCode DataSvc::findObject ( DataObject parentObj,
int  item,
DataObject *&  pObject 
)
virtual

Find object in the data store.

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

Implements IDataProviderSvc.

Definition at line 972 of file DataSvc.cpp.

974  {
975  return findObject(parentObj, itemToPath(item), pObject);
976 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
tuple item
print s1,s2
Definition: ana.py:146
IConversionSvc * DataSvc::getDataLoader ( IRegistry pReg)
protectedvirtual

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

Reimplemented in NTupleSvc.

Definition at line 1366 of file DataSvc.cpp.

1366  {
1367  return m_dataLoader;
1368 }
IConversionSvc * m_dataLoader
Pointer to data loader service.
Definition: DataSvc.h:51
DataObject * DataSvc::handleDataFault ( IRegistry pReg,
const std::string &  path = "" 
)
protected

Invoke data fault handling if enabled.

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

Definition at line 641 of file DataSvc.cpp.

642 {
643  if ( m_enableFaultHdlr ) {
644  IRegistry* pLeaf = 0;
645  if ( pReg && path.length() == 0 ) {
646  DataIncident incident(name(), m_faultName, pReg->identifier());
647  m_incidentSvc->fireIncident(incident);
648  return pReg->object();
649  }
650  else if ( pReg ) {
651  std::string p = pReg->identifier();
652  if (path[0] != SEPARATOR ) p += SEPARATOR;
653  p += path;
654  DataIncident incident(name(), m_faultName, p);
655  m_incidentSvc->fireIncident(incident);
656  pLeaf = m_root->findLeaf(p);
657  }
658  else {
659  std::string p = m_root->identifier();
660  if (path[0] != SEPARATOR ) p += SEPARATOR;
661  p += path;
662  DataIncident incident(name(), m_faultName, p);
663  m_incidentSvc->fireIncident(incident);
664  pLeaf = m_root->findLeaf(p);
665  }
666  if ( pLeaf ) {
667  return pLeaf->object();
668  }
669  }
670  return 0;
671 }
RegistryEntry * findLeaf(const std::string &path) const
Find identified leaf in this registry node.
Definition: RegistryEntry.h:89
bool m_enableFaultHdlr
Flag to enable interrupts on data creation requests.
Definition: DataSvc.h:61
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
IIncidentSvc * m_incidentSvc
Pointer to incident service.
Definition: DataSvc.h:53
virtual void fireIncident(const Incident &incident)=0
Fire an Incident.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
virtual DataObject * object() const =0
Retrieve object behind the link.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
std::string m_faultName
Name of the data fault incident.
Definition: DataSvc.h:71
virtual const std::string & identifier() const
Full identifier (or key)
virtual const id_type & identifier() const =0
Full identifier (or key)
Data service incident class.
StatusCode DataSvc::i_setRoot ( const std::string &  root_path,
DataObject pRootObj 
)
virtual

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

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

Definition at line 166 of file DataSvc.cpp.

167  {
168  if ( 0 != pRootObj ) {
169  m_root = new RegEntry(root_path);
170  m_root->makeHard(pRootObj);
171  m_root->setDataSvc(this);
172  preLoad().ignore();
173  }
174  return SUCCESS;
175 }
Normal successful completion.
Definition: IInterface.h:219
virtual StatusCode preLoad()
load all preload items of the list
Definition: DataSvc.cpp:1282
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
void setDataSvc(IDataProviderSvc *s)
Set the transient data store.
Definition: RegistryEntry.h:81
void ignore() const
Definition: StatusCode.h:94
DataSvcHelpers::RegistryEntry RegEntry
Definition: DataSvc.cpp:59
void makeHard(DataObject *pObject)
Initialize link as hard link.
StatusCode DataSvc::i_setRoot ( const std::string &  root_path,
IOpaqueAddress pRootAddr 
)
virtual

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

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

Definition at line 192 of file DataSvc.cpp.

193  {
194  if ( 0 != pRootAddr ) {
195  m_root = new RegEntry(root_path);
196  m_root->makeHard(pRootAddr);
197  m_root->setDataSvc(this);
198  preLoad().ignore();
199  }
200  return SUCCESS;
201 }
Normal successful completion.
Definition: IInterface.h:219
virtual StatusCode preLoad()
load all preload items of the list
Definition: DataSvc.cpp:1282
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
void setDataSvc(IDataProviderSvc *s)
Set the transient data store.
Definition: RegistryEntry.h:81
void ignore() const
Definition: StatusCode.h:94
DataSvcHelpers::RegistryEntry RegEntry
Definition: DataSvc.cpp:59
void makeHard(DataObject *pObject)
Initialize link as hard link.
StatusCode DataSvc::initialize ( )
virtual

Service initialization.

Reimplemented from Service.

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

Definition at line 1295 of file DataSvc.cpp.

1295  {
1296  // Nothing to do: just call base class initialisation
1298  if ( !sc.isSuccess() ) {
1299  return sc;
1300  }
1301  sc = service("IncidentSvc", m_incidentSvc, true);
1302  if ( UNLIKELY(!sc.isSuccess()) ) {
1303  error() << "Failed to access incident service." << endmsg;
1304  }
1305  return sc;
1306 }
#define UNLIKELY(x)
Definition: Kernel.h:127
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
IIncidentSvc * m_incidentSvc
Pointer to incident service.
Definition: DataSvc.h:53
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
Definition: Service.cpp:74
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Service.h:142
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode DataSvc::linkObject ( IRegistry from,
const std::string &  objPath,
DataObject to 
)
virtual

Add a link to another object.

Implements IDataProviderSvc.

Definition at line 1084 of file DataSvc.cpp.

1085  {
1086  if ( checkRoot() ) {
1087  try {
1088  RegEntry* from_entry = CAST_REGENTRY(RegEntry*,from);
1089  if ( 0 != from_entry ) {
1090  // First check if both objects are already registered to the store
1091  RegEntry* to_entry = m_root->findLeaf(to);
1092  if ( 0 == to_entry ) {
1093  return INVALID_OBJECT;
1094  }
1095  else {
1096  std::string::size_type sep = objPath.rfind(SEPARATOR);
1097  if ( sep > 0 && sep != std::string::npos ) { // in case the objPath is a sub-directory itself
1098  DataObject* pO = 0;
1099  std::string fromPath(objPath, 0, sep);
1100  StatusCode sc = retrieveObject(from, fromPath, pO);
1101  if ( sc.isSuccess() ) {
1102  std::string toPath(objPath, sep, objPath.length());
1103  sc = linkObject(pO->registry(), toPath, to);
1104  }
1105  return sc;
1106  }
1107  // Now register the soft link
1108  StatusCode status = from_entry->add( objPath, to, true);
1109  return status.isSuccess() ?
1111  }
1112  }
1113  }
1114  catch (...) {
1115  }
1116  return INVALID_PARENT;
1117  }
1118  return INVALID_ROOT;
1119 }
RegistryEntry * findLeaf(const std::string &path) const
Find identified leaf in this registry node.
Definition: RegistryEntry.h:89
The path for this objects is already in use.
Invalid root path object cannot be retrieved or stored.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual long add(const std::string &name, DataObject *pObject, bool is_soft=false)
Add entry to data store.
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
Retrieve object from data store.
Definition: DataSvc.cpp:864
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
virtual StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *to)
Add a link to another object.
Definition: DataSvc.cpp:1084
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
Pointer to parent object is not valid.
Object pointer is invalid.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::linkObject ( const std::string &  fromPath,
const std::string &  objPath,
DataObject to 
)
virtual

Add a link to another object.

Implements IDataProviderSvc.

Definition at line 1137 of file DataSvc.cpp.

1139  {
1140  DataObject* pO = 0;
1141  StatusCode status = retrieveObject(from, pO);
1142  if ( status.isSuccess() ) {
1143  return linkObject(pO->registry(), objPath, to);
1144  }
1145  return status;
1146 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
Retrieve object from data store.
Definition: DataSvc.cpp:864
virtual StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *to)
Add a link to another object.
Definition: DataSvc.cpp:1084
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::linkObject ( DataObject from,
const std::string &  objPath,
DataObject to 
)
virtual

Add a link to another object.

Implements IDataProviderSvc.

Definition at line 1149 of file DataSvc.cpp.

1151  {
1152  if ( 0 != from ) {
1153  IRegistry* from_entry = from->registry();
1154  if ( 0 != from_entry ) {
1155  return linkObject( from_entry, objPath, to);
1156  }
1157  }
1158  return INVALID_PARENT;
1159 }
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
virtual StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *to)
Add a link to another object.
Definition: DataSvc.cpp:1084
Pointer to parent object is not valid.
StatusCode DataSvc::linkObject ( const std::string &  fullPath,
DataObject to 
)
virtual

Add a link to another object.

Implements IDataProviderSvc.

Definition at line 1122 of file DataSvc.cpp.

1123  {
1124  if ( fullPath.length() > 0 ) {
1125  if ( fullPath[0] != SEPARATOR ) {
1126  return linkObject(m_rootName, fullPath, to);
1127  }
1128  std::string::size_type sep = fullPath.rfind(SEPARATOR);
1129  std::string objPath(fullPath, sep, fullPath.length());
1130  std::string fromPath(fullPath, 0, sep);
1131  return linkObject( fromPath, objPath, to);
1132  }
1133  return INVALID_OBJ_PATH;
1134 }
std::string m_rootName
Name of root event.
Definition: DataSvc.h:49
virtual StatusCode linkObject(IRegistry *from, const std::string &objPath, DataObject *to)
Add a link to another object.
Definition: DataSvc.cpp:1084
Invalid path from root to object request failed.
StatusCode DataSvc::loadObject ( IRegistry pNode)
protectedvirtual

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

Definition at line 676 of file DataSvc.cpp.

676  {
677  IConversionSvc* pLoader = getDataLoader(pRegistry);
678  return loadObject(pLoader, pRegistry);
679 }
virtual StatusCode loadObject(IRegistry *pNode)
Invoke Persistency service to create transient object from its persistent representation.
Definition: DataSvc.cpp:676
virtual IConversionSvc * getDataLoader(IRegistry *pReg)
Retrieve customizable data loader according to registry entry to be retrieved.
Definition: DataSvc.cpp:1366
StatusCode DataSvc::loadObject ( IConversionSvc pLoader,
IRegistry pNode 
)
protectedvirtual

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

Definition at line 684 of file DataSvc.cpp.

684  {
685  StatusCode status = INVALID_OBJ_ADDR;
686  DataObject* pObject = 0;
687  if ( 0 == pLoader ) { // Precondition: Data loader must be present
688  if (handleDataFault(pRegistry) != 0) return SUCCESS;
689  else return NO_DATA_LOADER;
690  }
691  if ( 0 == pRegistry ) { // Precondition: Directory must be valid
692  if (handleDataFault(pRegistry) != 0) return SUCCESS;
693  else return INVALID_OBJ_ADDR;
694  }
695 
696  VERMSG << "Requested object " << pRegistry->identifier() << endmsg;
697 
698  if ( m_enableAccessHdlr ) {
699  // Fire data access incident
700  DataIncident incident(name(), m_accessName, pRegistry->identifier());
701  m_incidentSvc->fireIncident(incident);
702  }
703  if ( m_inhibitPathes.size() > 0 ) {
704  const std::string& ident = pRegistry->identifier();
705  std::vector<std::string>::iterator inhibit =
706  std::find(m_inhibitPathes.begin(), m_inhibitPathes.end(), ident);
707  if ( inhibit != m_inhibitPathes.end() ) {
708  return NO_ACCESS;
709  }
710  }
711  IOpaqueAddress* pAddress = pRegistry->address();
712  if ( 0 == pAddress ) { // Precondition:
713  return INVALID_OBJ_ADDR; // Address must be valid
714  }
715  try {
716  status = pLoader->createObj(pAddress, pObject); // Call data loader
717  if ( status.isSuccess() ) {
718 
719  VERMSG << "Object " << pRegistry->identifier() << " created" << endmsg;
720 
721  RegEntry *pEntry = CAST_REGENTRY(RegEntry*,pRegistry);
722  pEntry->setObject(pObject);
723 
724  VERMSG << "Filling object " << pRegistry->identifier() << endmsg;
725  status = pLoader->fillObjRefs(pAddress, pObject);
726  }
727  }
728  catch( const GaudiException& exc ) {
729  if ( handleDataFault(pRegistry) != 0 ) {
730  return SUCCESS;
731  }
732  throw GaudiException("GaudiException in loadObject() " + pRegistry->identifier(),
733  name(), StatusCode::FAILURE, exc);
734  }
735  catch( const std::exception& x) {
736  if ( handleDataFault(pRegistry) != 0 ) {
737  return SUCCESS;
738  }
739  throw GaudiException("std::exception in loadObject() " + pRegistry->identifier() +
740  ": " + System::typeinfoName(typeid(x)) + ", " + x.what(),
742  }
743  catch(...) {
744  if ( handleDataFault(pRegistry) != 0 ) {
745  return SUCCESS;
746  }
747  throw GaudiException("UNKN exception in loadObject() " + pRegistry->identifier(),
749  }
750  if ( !status.isSuccess() ) {
751  if ( handleDataFault(pRegistry) != 0 ) {
752  return StatusCode::SUCCESS;
753  }
754  }
755  ON_VERBOSE if ( status.isSuccess() ) {
756  verbose() << "Object " << pRegistry->identifier() << " successfully loaded" << endmsg;
757  }
758  return status;
759 }
#define VERMSG
Definition: DataSvc.cpp:65
bool m_enableAccessHdlr
Flag to enable interrupts on data access requests.
Definition: DataSvc.h:59
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
Define general base for Gaudi exception.
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject)=0
Create the transient representation of an object.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
Normal successful completion.
Definition: IInterface.h:219
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
No data loader available.
Access to the requested leaf is inhibited.
std::string m_accessName
Name of the data access incident.
Definition: DataSvc.h:69
IIncidentSvc * m_incidentSvc
Pointer to incident service.
Definition: DataSvc.h:53
virtual void fireIncident(const Incident &incident)=0
Fire an Incident.
void setObject(DataObject *obj)
Set/Update object address.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
DataObject * handleDataFault(IRegistry *pReg, const std::string &path="")
Invoke data fault handling if enabled.
Definition: DataSvc.cpp:641
virtual StatusCode fillObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the created transient object.
std::vector< std::string > m_inhibitPathes
Property for the inhibited leaves.
Definition: DataSvc.h:67
Data service incident class.
Opaque address interface definition.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
#define ON_VERBOSE
Definition: DataSvc.cpp:62
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode DataSvc::objectLeaves ( const DataObject pObject,
std::vector< IRegistry * > &  refLeaves 
)
virtual

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

IDataManagerSvc: Explore an object identified by its pointer.

Implements IDataManagerSvc.

Definition at line 237 of file DataSvc.cpp.

238  {
239  if ( pObject ) {
240  return objectLeaves(pObject->registry(), leaves);
241  }
242  return INVALID_OBJECT;
243 }
virtual StatusCode objectLeaves(const DataObject *pObject, std::vector< IRegistry * > &refLeaves)
IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object.
Definition: DataSvc.cpp:237
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
Object pointer is invalid.
StatusCode DataSvc::objectLeaves ( const IRegistry pRegistry,
std::vector< IRegistry * > &  refLeaves 
)
virtual

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

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

Implements IDataManagerSvc.

Definition at line 248 of file DataSvc.cpp.

249  {
250  if ( checkRoot() ) {
251  const RegEntry* node_entry = CAST_REGENTRY(const RegEntry*,pRegistry);
252  if ( node_entry ) {
253  leaves = node_entry->leaves();
254  return StatusCode::SUCCESS;
255  }
256  return INVALID_OBJECT;
257  }
258  return INVALID_ROOT;
259 }
Invalid root path object cannot be retrieved or stored.
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
const Store & leaves() const
Access the leaves of the object.
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
Object pointer is invalid.
StatusCode DataSvc::objectParent ( const DataObject pObject,
IRegistry *&  refpParent 
)
virtual

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

Implements IDataManagerSvc.

Definition at line 215 of file DataSvc.cpp.

216  {
217  if ( pObject ) {
218  return objectParent(pObject->registry(), refpParent);
219  }
220  return INVALID_OBJECT;
221 }
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
virtual StatusCode objectParent(const DataObject *pObject, IRegistry *&refpParent)
IDataManagerSvc: Explore the object store: retrieve the object's parent.
Definition: DataSvc.cpp:215
Object pointer is invalid.
StatusCode DataSvc::objectParent ( const IRegistry pRegistry,
IRegistry *&  refpParent 
)
virtual

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

Implements IDataManagerSvc.

Definition at line 223 of file DataSvc.cpp.

224  {
225  if ( checkRoot() ) {
226  const RegEntry* node_entry = CAST_REGENTRY(const RegEntry*,pRegistry);
227  if ( node_entry ) {
228  refpParent = node_entry->parent();
229  return StatusCode::SUCCESS;
230  }
231  return INVALID_OBJECT;
232  }
233  return INVALID_ROOT;
234 }
Invalid root path object cannot be retrieved or stored.
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
virtual IRegistry * parent() const
Pointer to parent directory entry.
Object pointer is invalid.
DataSvc& DataSvc::operator= ( const DataSvc )
private

Fake assignment operator (never implemented).

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

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

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

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

Definition at line 1264 of file DataSvc.cpp.

1264  {
1265  //unused: StatusCode sc = StatusCode::FAILURE;
1266  if ( 0 != pObject && depth++ < load_depth ) {
1267  RegEntry* dir = CAST_REGENTRY(RegEntry*,pObject->registry());
1268  if ( 0 != dir ) {
1269  for (RegEntry::Iterator i = dir->begin(); i != dir->end(); i++ ) {
1270  DataObject *pObj = 0;
1271  StatusCode status = retrieveObject(pObject, (*i)->name(), pObj);
1272  if ( status.isSuccess() && depth < load_depth ) {
1273  preLoad(depth, load_depth, pObj).ignore();
1274  }
1275  }
1276  }
1277  }
1278  return StatusCode::SUCCESS;
1279 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual StatusCode preLoad()
load all preload items of the list
Definition: DataSvc.cpp:1282
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
virtual Iterator begin() const
Return starting point for container iteration.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
Retrieve object from data store.
Definition: DataSvc.cpp:864
Store::const_iterator Iterator
Iterator definition.
Definition: RegistryEntry.h:41
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Definition: DataObject.cpp:68
void ignore() const
Definition: StatusCode.h:94
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
list i
Definition: ana.py:128
virtual Iterator end() const
Return end elemtn if the container.
StatusCode DataSvc::preLoad ( )
virtual

load all preload items of the list

Implements IDataProviderSvc.

Definition at line 1282 of file DataSvc.cpp.

1282  {
1283  DataObject* pObj = 0;
1284  for (LoadItems::iterator i = m_preLoads.begin(); i != m_preLoads.end(); i++) {
1285  StatusCode sc = retrieveObject( (*i).path(), pObj);
1286  int load_depth = (*i).depth();
1287  if ( sc.isSuccess() && load_depth > 1 ) {
1288  preLoad(1, load_depth, pObj).ignore();
1289  }
1290  }
1291  return StatusCode::SUCCESS;
1292 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
LoadItems m_preLoads
Items to be pre-loaded.
Definition: DataSvc.h:55
virtual StatusCode preLoad()
load all preload items of the list
Definition: DataSvc.cpp:1282
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
Retrieve object from data store.
Definition: DataSvc.cpp:864
void ignore() const
Definition: StatusCode.h:94
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
list i
Definition: ana.py:128
StatusCode DataSvc::registerAddress ( const std::string &  fullPath,
IOpaqueAddress pAddress 
)
virtual

IDataManagerSvc: Register object address with the data store.

Implements IDataManagerSvc.

Definition at line 262 of file DataSvc.cpp.

263  {
264  if ( fullPath.length() > 0 ) {
265  if ( fullPath[0] != SEPARATOR ) {
266  return registerAddress(m_root, fullPath, pAddress);
267  }
268  IRegistry* pRegistry = 0;
269  return registerAddress(pRegistry, fullPath, pAddress);
270  }
271  return INVALID_OBJ_PATH;
272 }
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
virtual StatusCode registerAddress(const std::string &fullPath, IOpaqueAddress *pAddress)
IDataManagerSvc: Register object address with the data store.
Definition: DataSvc.cpp:262
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
Invalid path from root to object request failed.
StatusCode DataSvc::registerAddress ( DataObject parentObj,
const std::string &  objectPath,
IOpaqueAddress pAddress 
)
virtual

IDataManagerSvc: Register object address with the data store.

Implements IDataManagerSvc.

Definition at line 275 of file DataSvc.cpp.

277  {
278  IRegistry* pRegistry = (0 == parentObj) ? 0 : parentObj->registry();
279  return registerAddress(pRegistry, objectPath, pAddress);
280 }
virtual StatusCode registerAddress(const std::string &fullPath, IOpaqueAddress *pAddress)
IDataManagerSvc: Register object address with the data store.
Definition: DataSvc.cpp:262
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
StatusCode DataSvc::registerAddress ( IRegistry parentObj,
const std::string &  objectPath,
IOpaqueAddress pAddress 
)
virtual

IDataManagerSvc: Register object address with the data store.

Implements IDataManagerSvc.

Definition at line 283 of file DataSvc.cpp.

285  {
286  if ( checkRoot() ) {
287  if ( objPath.length() > 0 ) {
288  if ( 0 == parentObj ) {
289  if ( objPath[0] != SEPARATOR ) {
290  return registerAddress(m_root, objPath, pAddress);
291  }
292  std::string::size_type sep = objPath.find(SEPARATOR,1);
293  if ( sep != std::string::npos ) {
294  std::string p_path (objPath, 0, sep);
295  if ( p_path == m_rootName ) {
296  std::string o_path (objPath, sep, objPath.length());
297  return registerAddress(m_root, o_path, pAddress);
298  }
299  }
300  return INVALID_PARENT;
301  }
302  if ( objPath[0] != SEPARATOR ) {
303  std::string path;
304  path = SEPARATOR;
305  path += objPath;
306  return registerAddress(parentObj, path, pAddress);
307  }
308  RegEntry* par_entry = CAST_REGENTRY(RegEntry*,parentObj);
309  if ( 0 != par_entry ) {
310  std::string::size_type sep = objPath.rfind(SEPARATOR);
311  if ( sep > 0 && sep != std::string::npos ) {
312  std::string p_path (objPath, 0, sep);
313  std::string o_path (objPath, sep, objPath.length());
314  RegEntry* p_entry = par_entry->findLeaf(p_path);
315  // Create default object leafs if the
316  // intermediate nodes are not present
317  if ( 0 == p_entry && m_forceLeaves ) {
318  DataObject *pLeaf = createDefaultObject();
319  StatusCode sc = registerObject(par_entry->identifier(),
320  p_path,
321  pLeaf);
322  if ( ! sc.isSuccess() ) {
323  delete pLeaf;
324  }
325  p_entry = par_entry->findLeaf(p_path);
326  }
327  if ( 0 != p_entry ) {
328  return registerAddress(p_entry, o_path, pAddress);
329  }
330  return INVALID_PARENT;
331  }
332  StatusCode status = par_entry->add(objPath, pAddress);
333  if ( status.isSuccess() ) {
334  return status;
335  }
336  return DOUBL_OBJ_PATH;
337  }
338  return INVALID_PARENT;
339  }
340  return INVALID_OBJ_PATH;
341  }
342  return INVALID_ROOT;
343 }
RegistryEntry * findLeaf(const std::string &path) const
Find identified leaf in this registry node.
Definition: RegistryEntry.h:89
The path for this objects is already in use.
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)
Register object with the data store.
Definition: DataSvc.cpp:412
Invalid root path object cannot be retrieved or stored.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual long add(const std::string &name, DataObject *pObject, bool is_soft=false)
Add entry to data store.
std::string m_rootName
Name of root event.
Definition: DataSvc.h:49
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
virtual StatusCode registerAddress(const std::string &fullPath, IOpaqueAddress *pAddress)
IDataManagerSvc: Register object address with the data store.
Definition: DataSvc.cpp:262
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
bool m_forceLeaves
Allow forced creation of default leaves on registerObject.
Definition: DataSvc.h:57
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
virtual const std::string & identifier() const
Full identifier (or key)
Pointer to parent object is not valid.
Invalid path from root to object request failed.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
virtual DataObject * createDefaultObject() const
Create default objects in case forced creation of leaves is requested.
Definition: DataSvc.cpp:1359
StatusCode DataSvc::registerObject ( const std::string &  fullPath,
DataObject pObject 
)
virtual

Register object with the data store.

Implements IDataProviderSvc.

Definition at line 412 of file DataSvc.cpp.

413  {
414  return registerObject(0, fullPath, pObject);
415 }
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)
Register object with the data store.
Definition: DataSvc.cpp:412
StatusCode DataSvc::registerObject ( const std::string &  parentPath,
const std::string &  objPath,
DataObject pObject 
)
virtual

Register object with the data store.

Implements IDataProviderSvc.

Definition at line 419 of file DataSvc.cpp.

421  {
422  DataObject* pO = 0;
423  StatusCode status = retrieveObject(parentPath, pO);
424  if ( !status.isSuccess() && m_forceLeaves ) {
425  pO = createDefaultObject();
426  status = registerObject(parentPath, pO);
427  if ( !status.isSuccess() ) {
428  pO->release();
429  }
430  }
431  if ( status.isSuccess() ) {
432  status = registerObject(pO, objPath, pObject);
433  }
434  return status;
435 }
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)
Register object with the data store.
Definition: DataSvc.cpp:412
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
Retrieve object from data store.
Definition: DataSvc.cpp:864
bool m_forceLeaves
Allow forced creation of default leaves on registerObject.
Definition: DataSvc.h:57
virtual unsigned long release()
release reference to object
Definition: DataObject.cpp:44
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
virtual DataObject * createDefaultObject() const
Create default objects in case forced creation of leaves is requested.
Definition: DataSvc.cpp:1359
StatusCode DataSvc::registerObject ( const std::string &  parentPath,
int  item,
DataObject pObject 
)
virtual

Register object with the data store.

Implements IDataProviderSvc.

Definition at line 438 of file DataSvc.cpp.

440  {
441  return registerObject(parentPath, itemToPath(item), pObject);
442 }
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)
Register object with the data store.
Definition: DataSvc.cpp:412
tuple item
print s1,s2
Definition: ana.py:146
StatusCode DataSvc::registerObject ( DataObject parentObj,
const std::string &  objPath,
DataObject pObject 
)
virtual

Register object with the data store.

Implements IDataProviderSvc.

Definition at line 452 of file DataSvc.cpp.

454  {
455  if ( checkRoot() ) {
456  if ( 0 == parentObj ) {
457  if ( objPath.length() > 0 ) {
458  if ( objPath[0] == SEPARATOR ) {
459  std::string::size_type sep = objPath.find(SEPARATOR,1);
460  if ( sep != std::string::npos ) {
461  std::string p_path (objPath, 0, sep);
462  std::string o_path (objPath, sep, objPath.length());
463  return registerObject(p_path, o_path, pObject);
464  }
465  }
466  else {
467  return registerObject(m_rootName, objPath, pObject);
468  }
469  }
470  return INVALID_OBJ_PATH;
471  }
472  RegEntry* node_entry = CAST_REGENTRY(RegEntry*,parentObj->registry());
473  if ( 0 != node_entry ) {
474  StatusCode status = INVALID_PARENT;
475  std::string::size_type sep = objPath.find(SEPARATOR,1);
476  if ( sep != std::string::npos ) {
477  std::string p_path (objPath, 0, sep);
478  std::string o_path (objPath, sep, objPath.length());
479  RegEntry* par_entry = node_entry->findLeaf(p_path);
480  // Create default object leafs if the
481  // intermediate nodes are not present
482  if ( 0 == par_entry && m_forceLeaves ) {
483  DataObject *pLeaf = createDefaultObject();
484  StatusCode sc = registerObject(parentObj, p_path, pLeaf);
485  if ( ! sc.isSuccess() ) {
486  delete pLeaf;
487  }
488  par_entry = node_entry->findLeaf(p_path);
489  }
490  else if ( 0 != par_entry && par_entry->object() == 0 ) {
491  status = retrieveEntry( node_entry, p_path, par_entry);
492  if ( !status.isSuccess() && !par_entry->address() && m_forceLeaves ) {
493  DataObject *pLeaf = createDefaultObject();
494  StatusCode sc = registerObject(parentObj, p_path, pLeaf);
495  if ( ! sc.isSuccess() ) {
496  delete pLeaf;
497  }
498  par_entry = node_entry->findLeaf(p_path);
499  }
500  }
501  node_entry = par_entry;
502  if ( 0 != node_entry ) {
503  DataObject* obj = node_entry->object();
504  if ( 0 != obj ) {
505  status = registerObject( obj, o_path, pObject );
506  }
507  }
508  }
509  else {
510  RegEntry* leaf = node_entry->findLeaf(objPath);
511  if ( 0 == leaf ) {
512  status = node_entry->add( objPath, pObject );
513  }
514  else {
515  DataObject* obj = leaf->object();
516  if ( 0 == obj ) {
517  if (0 == pObject) {
518  error() << "registerObject: trying to register null DataObject" << endmsg;
519  return StatusCode::FAILURE;
520  }
521  else {
522  pObject->setRegistry(leaf);
523  }
524  leaf->setAddress(0);
525  leaf->setObject(pObject);
526  status = StatusCode::SUCCESS;
527  }
528  else {
529  status = DOUBL_OBJ_PATH;
530  }
531  }
532  }
533  return status;
534  }
535  return INVALID_PARENT;
536  }
537  return INVALID_ROOT;
538 }
RegistryEntry * findLeaf(const std::string &path) const
Find identified leaf in this registry node.
Definition: RegistryEntry.h:89
The path for this objects is already in use.
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)
Register object with the data store.
Definition: DataSvc.cpp:412
Invalid root path object cannot be retrieved or stored.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual long add(const std::string &name, DataObject *pObject, bool is_soft=false)
Add entry to data store.
std::string m_rootName
Name of root event.
Definition: DataSvc.h:49
void setRegistry(IRegistry *pRegistry)
Set pointer to Registry.
Definition: DataObject.h:65
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
void setObject(DataObject *obj)
Set/Update object address.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
StatusCode retrieveEntry(DataSvcHelpers::RegistryEntry *pNode, const std::string &path, DataSvcHelpers::RegistryEntry *&pEntry)
Retrieve registry entry from store.
Definition: DataSvc.cpp:762
bool m_forceLeaves
Allow forced creation of default leaves on registerObject.
Definition: DataSvc.h:57
void setAddress(IOpaqueAddress *pAddress)
Set/Update Opaque address.
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
Pointer to parent object is not valid.
Invalid path from root to object request failed.
virtual DataObject * object() const
Retrive object behind the link.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual DataObject * createDefaultObject() const
Create default objects in case forced creation of leaves is requested.
Definition: DataSvc.cpp:1359
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode DataSvc::registerObject ( DataObject parentObj,
int  item,
DataObject pObject 
)
virtual

Register object with the data store.

Implements IDataProviderSvc.

Definition at line 445 of file DataSvc.cpp.

447  {
448  return registerObject(parentObj, itemToPath(item), pObject);
449 }
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)
Register object with the data store.
Definition: DataSvc.cpp:412
tuple item
print s1,s2
Definition: ana.py:146
StatusCode DataSvc::reinitialize ( )
virtual

Service initialization.

Service reinitialization.

Reimplemented from Service.

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

Definition at line 1309 of file DataSvc.cpp.

1309  {
1310  StatusCode sc;
1311  // the finalize part is copied here
1312  setDataLoader(0).ignore();
1313  resetPreLoad().ignore();
1314  clearStore().ignore();
1315  if ( m_incidentSvc ) {
1317  m_incidentSvc = 0;
1318  }
1319  // re-initialize the base class
1320  sc = Service::reinitialize();
1321  if ( UNLIKELY(!sc.isSuccess()) ) {
1322  error() << "Unable to reinitialize base class" << endmsg;
1323  return sc;
1324  }
1325  // the initialize part is copied here
1326  sc = service("IncidentSvc", m_incidentSvc, true);
1327  if ( UNLIKELY(!sc.isSuccess()) ) {
1328  error() << "Failed to access incident service." << endmsg;
1329  return sc;
1330  }
1331  // return
1332  return StatusCode::SUCCESS;
1333 }
virtual StatusCode setDataLoader(IConversionSvc *svc)
IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service.
Definition: DataSvc.cpp:204
#define UNLIKELY(x)
Definition: Kernel.h:127
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual StatusCode resetPreLoad()
Clear the preload list.
Definition: DataSvc.cpp:1258
IIncidentSvc * m_incidentSvc
Pointer to incident service.
Definition: DataSvc.h:53
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode reinitialize()
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
Definition: Service.cpp:294
virtual unsigned long release()=0
Release Interface instance.
virtual StatusCode clearStore()
IDataManagerSvc: Remove all data objects in the data store.
Definition: DataSvc.cpp:108
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Service.h:142
void ignore() const
Definition: StatusCode.h:94
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode DataSvc::removePreLoadItem ( const DataStoreItem item)
virtual

Remove an item from the preload list.

Implements IDataProviderSvc.

Definition at line 1243 of file DataSvc.cpp.

1243  {
1244  LoadItems::iterator i =
1245  std::remove(m_preLoads.begin(), m_preLoads.end(), item);
1246  if ( i != m_preLoads.end() ) {
1247  m_preLoads.erase(i, m_preLoads.end());
1248  }
1249  return StatusCode::SUCCESS;
1250 }
LoadItems m_preLoads
Items to be pre-loaded.
Definition: DataSvc.h:55
def remove
Definition: install.py:153
tuple item
print s1,s2
Definition: ana.py:146
list i
Definition: ana.py:128
StatusCode DataSvc::removePreLoadItem ( const std::string &  itemPath)
virtual

Add an item to the preload list.

Implements IDataProviderSvc.

Definition at line 1253 of file DataSvc.cpp.

1253  {
1254  return removePreLoadItem( DataStoreItem(itemPath,1) );
1255 }
virtual StatusCode removePreLoadItem(const DataStoreItem &item)
Remove an item from the preload list.
Definition: DataSvc.cpp:1243
Description of the DataStoreItem class.
Definition: DataStoreItem.h:18
StatusCode DataSvc::resetPreLoad ( )
virtual

Clear the preload list.

Implements IDataProviderSvc.

Definition at line 1258 of file DataSvc.cpp.

1258  {
1259  m_preLoads.erase(m_preLoads.begin(), m_preLoads.end());
1260  return StatusCode::SUCCESS;
1261 }
LoadItems m_preLoads
Items to be pre-loaded.
Definition: DataSvc.h:55
StatusCode DataSvc::retrieveEntry ( DataSvcHelpers::RegistryEntry pNode,
const std::string &  path,
DataSvcHelpers::RegistryEntry *&  pEntry 
)
protected

Retrieve registry entry from store.

Definition at line 762 of file DataSvc.cpp.

764  {
765  std::string::size_type sep = path.find(SEPARATOR,1);
766  StatusCode status = StatusCode(INVALID_ROOT,true);
767  pEntry = 0;
768  // A.Valassi 16.08.2001 avoid core dump if store is empty
769  if ( checkRoot() ) {
770  if ( 0 == parentObj ) {
771  if ( path.length() == 0 || path == m_rootName ) {
772  return retrieveEntry(m_root, "", pEntry);
773  }
774  else if ( path[0] != SEPARATOR ) {
775  return retrieveEntry(m_root, path, pEntry);
776  }
777  else if ( sep != std::string::npos ) {
778  if ( m_root->object() == 0 ) {
779  RegEntry* r = 0;
780  status = retrieveEntry(m_root, "", r);
781  if ( !status.isSuccess() ) {
782  return status;
783  }
784  }
785  std::string o_path (path, sep, path.length());
786  return retrieveEntry(m_root, o_path, pEntry);
787  }
788  return INVALID_OBJ_PATH;
789  }
790  if ( sep != std::string::npos ) { // the string contains a separator (after pos 0)
791  std::string p_path (path,0,sep);
792  std::string o_path (path,sep,path.length());
793  if (!parentObj->object()) { // if the parent object has not been loaded yet, load it now
794  status = loadObject(parentObj);
795  if ( !status.isSuccess() ) {
796  return status;
797  }
798  }
799  RegEntry* root_entry = parentObj->findLeaf(p_path);
800  if ( !root_entry && m_enableFaultHdlr ) {
801  // If not even the parent is there, an incident
802  // to load the parent must be fired...
803  handleDataFault(parentObj, p_path);
804  root_entry = parentObj->findLeaf(p_path);
805  }
806  if ( root_entry ) {
807  DataObject* pO = root_entry->object();
808  if ( 0 == pO ) {
809  // Object is not loaded: load the object if at all possible
810  status = loadObject(root_entry);
811  if ( !status.isSuccess() ) {
812  return status;
813  }
814  }
815  if ( root_entry->isSoft() ) {
816  root_entry = CAST_REGENTRY(RegEntry*,pO->registry());
817  }
818  return retrieveEntry (root_entry, o_path, pEntry);
819  }
820  return status;
821  }
822  else if ( path.length() == 0 ) {
823  pEntry = parentObj;
824  }
825  else {
826  if (!parentObj->object()) { // if the parent object has not been loaded yet, load it now
827  status = loadObject(parentObj);
828  if ( !status.isSuccess() ) {
829  return status;
830  }
831  }
832  // last leave in search: find leaf and load
833  pEntry = parentObj->findLeaf(path);
834  // If no registry entry was found, trigger incident for action-on-demand
835  if ( !pEntry && m_enableFaultHdlr ) {
836  handleDataFault(parentObj, path);
837  pEntry = (0==path.length()) ? parentObj : parentObj->findLeaf(path);
838  }
839  }
840  // Check results and return
841  if ( 0 == pEntry ) {
842  status = INVALID_OBJ_PATH;
843  }
844  else if ( 0 == pEntry->object() ) {
845  status = loadObject(pEntry);
846  }
847  else if ( m_enableAccessHdlr ) {
848  // Fire data access incident
849  // I do not know if this is a good idea....
850  // This fires too often!
851  //
852  //DataIncident incident(name(), m_accessName, pEntry->identifier());
853  //m_incidentSvc->fireIncident(incident);
854  status = SUCCESS;
855  }
856  else {
857  status = SUCCESS;
858  }
859  }
860  return status;
861 }
RegistryEntry * findLeaf(const std::string &path) const
Find identified leaf in this registry node.
Definition: RegistryEntry.h:89
bool m_enableAccessHdlr
Flag to enable interrupts on data access requests.
Definition: DataSvc.h:59
bool m_enableFaultHdlr
Flag to enable interrupts on data creation requests.
Definition: DataSvc.h:61
Invalid root path object cannot be retrieved or stored.
Normal successful completion.
Definition: IInterface.h:219
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
std::string m_rootName
Name of root event.
Definition: DataSvc.h:49
virtual StatusCode loadObject(IRegistry *pNode)
Invoke Persistency service to create transient object from its persistent representation.
Definition: DataSvc.cpp:676
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
virtual bool isSoft() const
Is the link soft or hard.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
StatusCode retrieveEntry(DataSvcHelpers::RegistryEntry *pNode, const std::string &path, DataSvcHelpers::RegistryEntry *&pEntry)
Retrieve registry entry from store.
Definition: DataSvc.cpp:762
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
DataObject * handleDataFault(IRegistry *pReg, const std::string &path="")
Invoke data fault handling if enabled.
Definition: DataSvc.cpp:641
Invalid path from root to object request failed.
virtual DataObject * object() const
Retrive object behind the link.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::retrieveObject ( IRegistry pDirectory,
const std::string &  path,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

Retrieve object identified by its directory from the data store.

Implements IDataProviderSvc.

Definition at line 864 of file DataSvc.cpp.

866  {
867  pObject = 0;
868  RegEntry *result = 0, *parent = CAST_REGENTRY(RegEntry*,pRegistry);
869  StatusCode status = retrieveEntry(parent, path, result);
870  if ( status.isSuccess() ) {
871  pObject = result->object();
872  }
873  return status;
874 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
StatusCode retrieveEntry(DataSvcHelpers::RegistryEntry *pNode, const std::string &path, DataSvcHelpers::RegistryEntry *&pEntry)
Retrieve registry entry from store.
Definition: DataSvc.cpp:762
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
virtual DataObject * object() const
Retrive object behind the link.
StatusCode DataSvc::retrieveObject ( const std::string &  fullPath,
DataObject *&  pObject 
)
virtual

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

Implements IDataProviderSvc.

Definition at line 877 of file DataSvc.cpp.

878  {
879  IRegistry* nullDir = 0;
880  return retrieveObject(nullDir, fullPath, pObject);
881 }
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
Retrieve object from data store.
Definition: DataSvc.cpp:864
StatusCode DataSvc::retrieveObject ( const std::string &  parentPath,
const std::string &  objPath,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

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

Implements IDataProviderSvc.

Definition at line 884 of file DataSvc.cpp.

886  {
887  DataObject* parent = 0;
888  StatusCode status = retrieveObject(parentPath, parent);
889  if ( status.isSuccess() ) {
890  status = retrieveObject (parent, objectPath, pObject);
891  }
892  return status;
893 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
Retrieve object from data store.
Definition: DataSvc.cpp:864
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::retrieveObject ( const std::string &  parentPath,
int  item,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

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

Implements IDataProviderSvc.

Definition at line 896 of file DataSvc.cpp.

898  {
899  return retrieveObject(parentPath, itemToPath(item), pObject);
900 }
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
Retrieve object from data store.
Definition: DataSvc.cpp:864
tuple item
print s1,s2
Definition: ana.py:146
StatusCode DataSvc::retrieveObject ( DataObject parentObj,
const std::string &  objPath,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

Implements IDataProviderSvc.

Definition at line 903 of file DataSvc.cpp.

905  {
906  IRegistry* pRegistry = (0==parentObj) ? 0 : parentObj->registry();
907  return retrieveObject(pRegistry, path, pObject);
908 }
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
Retrieve object from data store.
Definition: DataSvc.cpp:864
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
StatusCode DataSvc::retrieveObject ( DataObject parentObj,
int  item,
DataObject *&  pObject 
)
virtual

Retrieve object from data store.

Retrieve registry entry from store.

Implements IDataProviderSvc.

Definition at line 911 of file DataSvc.cpp.

913  {
914  return retrieveObject(parentObj, itemToPath(item), pObject);
915 }
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
Retrieve object from data store.
Definition: DataSvc.cpp:864
tuple item
print s1,s2
Definition: ana.py:146
CLID DataSvc::rootCLID ( ) const
virtual

IDataManagerSvc: Accessor for root event CLID.

CLID for root Event.

Implements IDataManagerSvc.

Definition at line 1349 of file DataSvc.cpp.

1349  {
1350  return( (CLID)m_rootCLID );
1351 }
unsigned int CLID
Class ID definition.
Definition: ClassID.h:9
CLID m_rootCLID
Integer Property corresponding to CLID of root entry.
Definition: DataSvc.h:47
std::string DataSvc::rootName ( ) const
virtual

IDataManagerSvc: Accessor for root event name.

Name for root Event.

Implements IDataManagerSvc.

Definition at line 1354 of file DataSvc.cpp.

1354  {
1355  return( m_rootName );
1356 }
std::string m_rootName
Name of root event.
Definition: DataSvc.h:49
StatusCode DataSvc::setDataLoader ( IConversionSvc svc)
virtual

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

IDataManagerSvc: Pass a default data loader to the service.

Implements IDataManagerSvc.

Definition at line 204 of file DataSvc.cpp.

204  {
205  if ( 0 != pDataLoader ) pDataLoader->addRef();
206  if ( 0 != m_dataLoader ) m_dataLoader->release();
207  if ( 0 != pDataLoader ) {
208  pDataLoader->setDataProvider(this).ignore();
209  }
210  m_dataLoader = pDataLoader;
211  return SUCCESS;
212 }
Normal successful completion.
Definition: IInterface.h:219
IConversionSvc * m_dataLoader
Pointer to data loader service.
Definition: DataSvc.h:51
virtual unsigned long release()=0
Release Interface instance.
StatusCode DataSvc::setRoot ( const std::string &  root_path,
DataObject pRootObj 
)
virtual

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

Takes care to clear the store before reinitializing it

Implements IDataManagerSvc.

Definition at line 155 of file DataSvc.cpp.

156  {
157  clearStore().ignore();
158  return i_setRoot (root_path, pRootObj);
159 }
virtual StatusCode i_setRoot(const std::string &root_name, DataObject *pRootObj)
Initialize data store for new event by giving new event path and root object.
Definition: DataSvc.cpp:166
virtual StatusCode clearStore()
IDataManagerSvc: Remove all data objects in the data store.
Definition: DataSvc.cpp:108
void ignore() const
Definition: StatusCode.h:94
StatusCode DataSvc::setRoot ( const std::string &  root_path,
IOpaqueAddress pRootAddr 
)
virtual

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

Takes care to clear the store before reinitializing it

Implements IDataManagerSvc.

Definition at line 181 of file DataSvc.cpp.

182  {
183  clearStore().ignore();
184  return i_setRoot (root_path, pRootAddr);
185 }
virtual StatusCode i_setRoot(const std::string &root_name, DataObject *pRootObj)
Initialize data store for new event by giving new event path and root object.
Definition: DataSvc.cpp:166
virtual StatusCode clearStore()
IDataManagerSvc: Remove all data objects in the data store.
Definition: DataSvc.cpp:108
void ignore() const
Definition: StatusCode.h:94
StatusCode DataSvc::traverseSubTree ( const std::string &  sub_tree_path,
IDataStoreAgent pAgent 
)
virtual

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

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

Implements IDataManagerSvc.

Definition at line 120 of file DataSvc.cpp.

121  {
122  DataObject* pO = 0;
123  StatusCode status = findObject(sub_tree_path, pO);
124  if ( status.isSuccess() ) {
125  status = traverseSubTree(pO, pAgent);
126  }
127  return status;
128 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode traverseSubTree(const std::string &sub_tree_path, IDataStoreAgent *pAgent)
IDataManagerSvc: Analyze by traversing all data objects below the sub tree identified by its full pat...
Definition: DataSvc.cpp:120
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::traverseSubTree ( DataObject pObject,
IDataStoreAgent pAgent 
)
virtual

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

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

Implements IDataManagerSvc.

Definition at line 131 of file DataSvc.cpp.

132  {
133  if ( checkRoot() ) {
134  RegEntry* entry = CAST_REGENTRY(RegEntry*,pObject->registry());
135  if ( 0 != entry ) {
136  return entry->traverseTree(pAgent);
137  }
138  return INVALID_OBJECT;
139  }
140  return INVALID_ROOT;
141 }
Invalid root path object cannot be retrieved or stored.
virtual long traverseTree(IDataStoreAgent *pAgent, int level=0)
traverse data tree
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
Object pointer is invalid.
StatusCode DataSvc::traverseTree ( IDataStoreAgent pAgent)
virtual

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

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

Implements IDataManagerSvc.

Definition at line 144 of file DataSvc.cpp.

144  {
145  if ( checkRoot() ) {
146  return m_root->traverseTree(pAgent);
147  }
148  return INVALID_ROOT;
149 }
Invalid root path object cannot be retrieved or stored.
virtual long traverseTree(IDataStoreAgent *pAgent, int level=0)
traverse data tree
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
StatusCode DataSvc::unlinkObject ( IRegistry from,
const std::string &  objPath 
)
virtual

Remove a link to another object.

Implements IDataProviderSvc.

Definition at line 1162 of file DataSvc.cpp.

1163  {
1164  if ( checkRoot() ) {
1165  try {
1166  RegEntry* from_entry = CAST_REGENTRY(RegEntry*,from);
1167  if ( 0 != from_entry ) {
1168  std::string::size_type sep = objPath.rfind(SEPARATOR);
1169  if ( sep > 0 && sep != std::string::npos ) { // in case the objPath is a sub-directory itself
1170  DataObject* pO = 0;
1171  std::string fromPath(objPath, 0, sep);
1172  StatusCode sc = findObject(from, fromPath, pO);
1173  if ( sc.isSuccess() ) {
1174  std::string toPath(objPath, sep, objPath.length());
1175  sc = unlinkObject(pO->registry(), toPath);
1176  }
1177  return sc;
1178  }
1179  StatusCode status = from_entry->remove( objPath );
1180  if ( status.isSuccess() ) {
1181  return status;
1182  }
1183  return INVALID_OBJ_PATH;
1184  }
1185  }
1186  catch (...) {
1187  }
1188  return INVALID_PARENT;
1189  }
1190  return INVALID_ROOT;
1191 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
Invalid root path object cannot be retrieved or stored.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
virtual long remove(const std::string &name)
Remove an entry from the store.
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
Pointer to parent object is not valid.
virtual StatusCode unlinkObject(IRegistry *from, const std::string &objPath)
Remove a link to another object.
Definition: DataSvc.cpp:1162
Invalid path from root to object request failed.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::unlinkObject ( const std::string &  fromPath,
const std::string &  objPath 
)
virtual

Remove a link to another object.

Implements IDataProviderSvc.

Definition at line 1208 of file DataSvc.cpp.

1209  {
1210  DataObject* pObject = 0;
1211  StatusCode status = findObject(from, pObject);
1212  if ( status.isSuccess() ) {
1213  status = unlinkObject(pObject->registry(), objPath);
1214  }
1215  return status;
1216 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode unlinkObject(IRegistry *from, const std::string &objPath)
Remove a link to another object.
Definition: DataSvc.cpp:1162
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::unlinkObject ( DataObject fromObj,
const std::string &  objPath 
)
virtual

Remove a link to another object.

Implements IDataProviderSvc.

Definition at line 1219 of file DataSvc.cpp.

1220  {
1221  if ( checkRoot() ) {
1222  IRegistry* from_entry = m_root->findLeaf(from);
1223  return unlinkObject(from_entry, objPath);
1224  }
1225  return INVALID_ROOT;
1226 }
RegistryEntry * findLeaf(const std::string &path) const
Find identified leaf in this registry node.
Definition: RegistryEntry.h:89
Invalid root path object cannot be retrieved or stored.
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
virtual StatusCode unlinkObject(IRegistry *from, const std::string &objPath)
Remove a link to another object.
Definition: DataSvc.cpp:1162
StatusCode DataSvc::unlinkObject ( const std::string &  fullPath)
virtual

Remove a link to another object.

Implements IDataProviderSvc.

Definition at line 1194 of file DataSvc.cpp.

1194  {
1195  if ( fullPath.length() > 0 ) {
1196  if ( fullPath[0] != SEPARATOR ) {
1197  return unlinkObject(m_rootName, fullPath);
1198  }
1199  std::string::size_type sep = fullPath.rfind(SEPARATOR);
1200  std::string objPath(fullPath, sep, fullPath.length());
1201  std::string fromPath(fullPath, 0, sep);
1202  return unlinkObject(fromPath, objPath);
1203  }
1204  return INVALID_OBJ_PATH;
1205 }
std::string m_rootName
Name of root event.
Definition: DataSvc.h:49
virtual StatusCode unlinkObject(IRegistry *from, const std::string &objPath)
Remove a link to another object.
Definition: DataSvc.cpp:1162
Invalid path from root to object request failed.
StatusCode DataSvc::unregisterAddress ( const std::string &  fullPath)
virtual

IDataManagerSvc: Unregister object address from the data store.

Implements IDataManagerSvc.

Definition at line 346 of file DataSvc.cpp.

346  {
347  if ( fullPath.length() > 0 ) {
348  IRegistry* pRegistry = 0;
349  if ( fullPath[0] != SEPARATOR ) {
350  return unregisterAddress(m_root, fullPath);
351  }
352  return unregisterAddress(pRegistry, fullPath);
353  }
354  return INVALID_OBJ_PATH;
355 }
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
virtual StatusCode unregisterAddress(const std::string &fullPath)
IDataManagerSvc: Unregister object address from the data store.
Definition: DataSvc.cpp:346
Invalid path from root to object request failed.
StatusCode DataSvc::unregisterAddress ( DataObject pParent,
const std::string &  objPath 
)
virtual

IDataManagerSvc: Unregister object address from the data store.

Implements IDataManagerSvc.

Definition at line 358 of file DataSvc.cpp.

359  {
360  IRegistry* pRegistry = (0 == pParent) ? 0 : pParent->registry();
361  return unregisterAddress(pRegistry, objPath);
362 }
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
virtual StatusCode unregisterAddress(const std::string &fullPath)
IDataManagerSvc: Unregister object address from the data store.
Definition: DataSvc.cpp:346
StatusCode DataSvc::unregisterAddress ( IRegistry pParent,
const std::string &  objPath 
)
virtual

IDataManagerSvc: Unregister object address from the data store.

Implements IDataManagerSvc.

Definition at line 365 of file DataSvc.cpp.

366  {
367  if ( checkRoot() ) {
368  if ( objPath.length() > 0 ) {
369  if ( 0 == pParent ) {
370  if ( objPath[0] != SEPARATOR ) {
371  return unregisterAddress(m_root, objPath);
372  }
373  std::string::size_type sep = objPath.find(SEPARATOR,1);
374  if ( sep != std::string::npos ) {
375  std::string p_path (objPath, 0, sep);
376  if ( p_path == m_rootName ) {
377  std::string o_path (objPath, sep, objPath.length());
378  return unregisterAddress(m_root, o_path);
379  }
380  }
381  return INVALID_PARENT;
382  }
383  if ( objPath[0] != SEPARATOR ) {
384  std::string path;
385  path = SEPARATOR;
386  path += objPath;
387  return unregisterAddress(pParent, path);
388  }
389  RegEntry* node_entry = CAST_REGENTRY(RegEntry*,pParent);
390  if ( 0 != node_entry ) {
391  RegEntry* leaf_entry = node_entry->findLeaf(objPath);
392  if ( 0 != leaf_entry ) {
393  std::string::size_type sep = objPath.rfind(SEPARATOR);
394  if ( sep > 0 && sep != std::string::npos ) {
395  std::string path = objPath.substr(sep);
396  return unregisterAddress(leaf_entry->parent(), path);
397  }
398  StatusCode status = node_entry->remove(objPath);
399  if ( status.isSuccess() ) {
400  return status;
401  }
402  }
403  }
404  return INVALID_PARENT;
405  }
406  return INVALID_OBJ_PATH;
407  }
408  return INVALID_ROOT;
409 }
RegistryEntry * findLeaf(const std::string &path) const
Find identified leaf in this registry node.
Definition: RegistryEntry.h:89
Invalid root path object cannot be retrieved or stored.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
std::string m_rootName
Name of root event.
Definition: DataSvc.h:49
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
virtual long remove(const std::string &name)
Remove an entry from the store.
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
Pointer to parent object is not valid.
virtual IRegistry * parent() const
Pointer to parent directory entry.
virtual StatusCode unregisterAddress(const std::string &fullPath)
IDataManagerSvc: Unregister object address from the data store.
Definition: DataSvc.cpp:346
Invalid path from root to object request failed.
StatusCode DataSvc::unregisterObject ( const std::string &  fullPath)
virtual

Unregister object from the data store.

Implements IDataProviderSvc.

Definition at line 541 of file DataSvc.cpp.

541  {
542  DataObject* pObject = 0;
543  StatusCode status = findObject(fullPath, pObject);
544  if ( status.isSuccess() ) {
545  RegEntry* pEntry = CAST_REGENTRY(RegEntry*,pObject->registry());
546  if ( 0 != pEntry ) {
547  if ( pEntry->isEmpty() ) {
548  RegEntry* pParent = pEntry->parentEntry();
549  if ( 0 != pParent ) {
550  if ( 0 != pObject ) {
551  pObject->addRef();
552  }
553  pParent->remove(pEntry);
554  return StatusCode::SUCCESS;
555  }
556  return INVALID_PARENT;
557  }
558  return DIR_NOT_EMPTY;
559  }
560  return INVALID_ROOT;
561  }
562  return status;
563 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
Invalid root path object cannot be retrieved or stored.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual long remove(const std::string &name)
Remove an entry from the store.
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
virtual RegistryEntry * parentEntry()
Pointer to parent registry entry.
Definition: RegistryEntry.h:85
Directory entry is NOT empty.
virtual unsigned long addRef()
Add reference to object.
Definition: DataObject.cpp:53
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual bool isEmpty() const
Simple check if the Container is empty.
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
Pointer to parent object is not valid.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::unregisterObject ( const std::string &  parentPath,
const std::string &  objectPath 
)
virtual

Unregister object from the data store.

Implements IDataProviderSvc.

Definition at line 566 of file DataSvc.cpp.

567  {
568  DataObject* pO = 0;
569  StatusCode status = findObject(parentPath, pO);
570  if ( status.isSuccess() ) {
571  status = unregisterObject(pO, objPath);
572  }
573  return status;
574 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode unregisterObject(const std::string &fullPath)
Unregister object from the data store.
Definition: DataSvc.cpp:541
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::unregisterObject ( const std::string &  parentPath,
int  item 
)
virtual

Unregister object from the data store.

Implements IDataProviderSvc.

Definition at line 577 of file DataSvc.cpp.

577  {
578  return unregisterObject(parentPath, itemToPath(item));
579 }
virtual StatusCode unregisterObject(const std::string &fullPath)
Unregister object from the data store.
Definition: DataSvc.cpp:541
tuple item
print s1,s2
Definition: ana.py:146
StatusCode DataSvc::unregisterObject ( DataObject pObject)
virtual

Unregister object from the data store.

Implements IDataProviderSvc.

Definition at line 582 of file DataSvc.cpp.

582  {
583  if ( checkRoot() ) {
584  RegEntry* entry = m_root->findLeaf(pObject);
585  if ( 0 != entry ) {
586  RegEntry* parent = entry->parentEntry();
587  if ( 0 != parent ) {
588  if ( entry->isEmpty() ) {
589  if ( 0 != entry->object() ) {
590  entry->object()->addRef();
591  }
592  if ( 0 != parent ) {
593  parent->remove(entry);
594  }
595  return SUCCESS;
596  }
597  return INVALID_PARENT;
598  }
599  return DIR_NOT_EMPTY;
600  }
601  return INVALID_OBJECT;
602  }
603  return INVALID_ROOT;
604 }
RegistryEntry * findLeaf(const std::string &path) const
Find identified leaf in this registry node.
Definition: RegistryEntry.h:89
Invalid root path object cannot be retrieved or stored.
Normal successful completion.
Definition: IInterface.h:219
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
virtual long remove(const std::string &name)
Remove an entry from the store.
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:63
virtual RegistryEntry * parentEntry()
Pointer to parent registry entry.
Definition: RegistryEntry.h:85
Directory entry is NOT empty.
virtual unsigned long addRef()
Add reference to object.
Definition: DataObject.cpp:53
virtual bool isEmpty() const
Simple check if the Container is empty.
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
Pointer to parent object is not valid.
Object pointer is invalid.
virtual DataObject * object() const
Retrive object behind the link.
StatusCode DataSvc::unregisterObject ( DataObject pObject,
const std::string &  objectPath 
)
virtual

Unregister object from the data store.

Implements IDataProviderSvc.

Definition at line 607 of file DataSvc.cpp.

608  {
609  if ( checkRoot() ) {
610  try {
611  RegEntry* parent = CAST_REGENTRY(RegEntry*,pParentObj->registry());
612  if ( 0 != parent ) {
613  RegEntry* entry = parent->findLeaf(objectPath);
614  if ( 0 != entry ) {
615  if ( entry->isEmpty() ) {
616  if ( 0 != entry->object() ) {
617  entry->object()->addRef();
618  }
619  parent->remove(entry);
620  return SUCCESS;
621  }
622  return DIR_NOT_EMPTY;
623  }
624  return INVALID_OBJECT;
625  }
626  }
627  catch(...) {
628  }
629  return INVALID_PARENT;
630  }
631  return INVALID_ROOT;
632 }
RegistryEntry * findLeaf(const std::string &path) const
Find identified leaf in this registry node.
Definition: RegistryEntry.h:89
Invalid root path object cannot be retrieved or stored.
Normal successful completion.
Definition: IInterface.h:219
bool checkRoot()
Check if root path is valid.
Definition: DataSvc.h:384
virtual long remove(const std::string &name)
Remove an entry from the store.
Directory entry is NOT empty.
virtual unsigned long addRef()
Add reference to object.
Definition: DataObject.cpp:53
virtual bool isEmpty() const
Simple check if the Container is empty.
#define CAST_REGENTRY(x, y)
Definition: DataSvc.cpp:57
Definition of an entry in the transient data store.
Definition: RegistryEntry.h:34
Pointer to parent object is not valid.
Object pointer is invalid.
virtual DataObject * object() const
Retrive object behind the link.
StatusCode DataSvc::unregisterObject ( DataObject pObject,
int  item 
)
virtual

Unregister object from the data store.

Implements IDataProviderSvc.

Definition at line 635 of file DataSvc.cpp.

635  {
636  return unregisterObject(pParentObj, itemToPath(item));
637 }
virtual StatusCode unregisterObject(const std::string &fullPath)
Unregister object from the data store.
Definition: DataSvc.cpp:541
tuple item
print s1,s2
Definition: ana.py:146
StatusCode DataSvc::updateObject ( IRegistry pDirectory)
virtual

Update object identified by its directory entry.

Update object.

Implements IDataProviderSvc.

Definition at line 997 of file DataSvc.cpp.

997  {
998  if ( 0 == pRegistry ) { // Precondition:
999  return INVALID_OBJ_ADDR; // Addres must be valid
1000  }
1001  DataObject* toUpdate = pRegistry->object();
1002  if ( 0 == toUpdate ) { // Try first to load
1003  return loadObject(pRegistry);
1004  }
1005  return updateObject(toUpdate);
1006 }
virtual StatusCode updateObject(IRegistry *pDirectory)
Update object identified by its directory entry.
Definition: DataSvc.cpp:997
virtual StatusCode loadObject(IRegistry *pNode)
Invoke Persistency service to create transient object from its persistent representation.
Definition: DataSvc.cpp:676
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::updateObject ( const std::string &  updatePath)
virtual

Update object.

Implements IDataProviderSvc.

Definition at line 987 of file DataSvc.cpp.

987  {
988  DataObject* pO = 0;
989  StatusCode status = findObject(updatePath, pO);
990  if ( status.isSuccess() ) {
991  return updateObject(pO);
992  }
993  return retrieveObject(updatePath, pO);
994 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual StatusCode updateObject(IRegistry *pDirectory)
Update object identified by its directory entry.
Definition: DataSvc.cpp:997
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
Retrieve object from data store.
Definition: DataSvc.cpp:864
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::updateObject ( DataObject toUpdate)
virtual

Update object.

Implements IDataProviderSvc.

Reimplemented in DetDataSvc.

Definition at line 1009 of file DataSvc.cpp.

1009  {
1010  StatusCode status = INVALID_OBJ_ADDR;
1011  if ( 0 == toUpdate ) { // Precondition:
1012  return INVALID_OBJECT; // Address must be valid
1013  }
1014  IRegistry* pRegistry = toUpdate->registry(); // Precondition:
1015  if ( 0 == pRegistry ) { // Need valid registry
1016  return INVALID_OBJECT;
1017  }
1018  IOpaqueAddress* pAddress = pRegistry->address(); // Precondition:
1019  if ( 0 == pAddress ) { // Need valid address
1020  return INVALID_OBJ_ADDR;
1021  }
1022  IConversionSvc* pLoader = getDataLoader(pRegistry);
1023  if ( 0 == pLoader ) { // Precondition:
1024  return NO_DATA_LOADER; // Data loader must be present
1025  }
1026  if ( m_inhibitPathes.size() > 0 ) {
1027  const std::string& ident = pRegistry->identifier();
1028  std::vector<std::string>::iterator inhibit =
1029  std::find(m_inhibitPathes.begin(), m_inhibitPathes.end(), ident);
1030  if ( inhibit != m_inhibitPathes.end() ) {
1031  return NO_ACCESS;
1032  }
1033  }
1034  try {
1035  status = pLoader->updateObj(pAddress, toUpdate); // Call data loader
1036  if ( status.isSuccess() ) {
1037  status = pLoader->updateObjRefs(pAddress, toUpdate);
1038  }
1039  }
1040  catch( const GaudiException& exc ) {
1041  throw GaudiException("GaudiException in updateObject() " +
1042  pRegistry->name(),
1043  name(),
1044  StatusCode::FAILURE, exc);
1045  }
1046  catch( const std::exception& x) {
1047  throw GaudiException("std::exception in updateObject() " +
1048  pRegistry->name() + ": " +
1049  System::typeinfoName(typeid(x)) + ", " +
1050  x.what(),
1052  }
1053  catch(...) {
1054  throw GaudiException("UNKN exception in updateObject() " +
1055  pRegistry->name(),
1057  }
1058  return status;
1059 }
Define general base for Gaudi exception.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
No data loader available.
Access to the requested leaf is inhibited.
virtual const name_type & name() const =0
Name of the directory (or key)
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
virtual StatusCode updateObj(IOpaqueAddress *pAddress, DataObject *refpObject)=0
Update the transient object from the other representation.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode updateObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the references of an updated transient object.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
Object pointer is invalid.
std::vector< std::string > m_inhibitPathes
Property for the inhibited leaves.
Definition: DataSvc.h:67
virtual const id_type & identifier() const =0
Full identifier (or key)
Opaque address interface definition.
virtual IConversionSvc * getDataLoader(IRegistry *pReg)
Retrieve customizable data loader according to registry entry to be retrieved.
Definition: DataSvc.cpp:1366
StatusCode DataSvc::updateObject ( const std::string &  parentPath,
const std::string &  updatePath 
)
virtual

Update object.

Implements IDataProviderSvc.

Definition at line 1062 of file DataSvc.cpp.

1063  {
1064  DataObject* pParent = 0;
1065  StatusCode status = findObject(parentPath, pParent);
1066  if ( status.isSuccess() ) {
1067  status = updateObject( pParent, updatePath);
1068  }
1069  return status;
1070 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual StatusCode updateObject(IRegistry *pDirectory)
Update object identified by its directory entry.
Definition: DataSvc.cpp:997
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
StatusCode DataSvc::updateObject ( DataObject pParent,
const std::string &  updatePath 
)
virtual

Update object.

Implements IDataProviderSvc.

Definition at line 1073 of file DataSvc.cpp.

1074  {
1075  DataObject* pObject = 0;
1076  StatusCode status = findObject(parent, updatePath, pObject);
1077  if ( status.isSuccess() ) {
1078  status = updateObject(pObject);
1079  }
1080  return status;
1081 }
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:937
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual StatusCode updateObject(IRegistry *pDirectory)
Update object identified by its directory entry.
Definition: DataSvc.cpp:997
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31

Member Data Documentation

std::string DataSvc::m_accessName
protected

Name of the data access incident.

Definition at line 69 of file DataSvc.h.

IConversionSvc* DataSvc::m_dataLoader
protected

Pointer to data loader service.

Definition at line 51 of file DataSvc.h.

bool DataSvc::m_enableAccessHdlr
protected

Flag to enable interrupts on data access requests.

Definition at line 59 of file DataSvc.h.

bool DataSvc::m_enableFaultHdlr
protected

Flag to enable interrupts on data creation requests.

Definition at line 61 of file DataSvc.h.

std::string DataSvc::m_faultName
protected

Name of the data fault incident.

Definition at line 71 of file DataSvc.h.

bool DataSvc::m_forceLeaves
protected

Allow forced creation of default leaves on registerObject.

Definition at line 57 of file DataSvc.h.

IIncidentSvc* DataSvc::m_incidentSvc
protected

Pointer to incident service.

Definition at line 53 of file DataSvc.h.

DataSvcHelpers::InhibitMap* DataSvc::m_inhibitMap
protected

Map with object paths to be inhibited from loading.

Definition at line 65 of file DataSvc.h.

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

Property for the inhibited leaves.

Definition at line 67 of file DataSvc.h.

LoadItems DataSvc::m_preLoads
protected

Items to be pre-loaded.

Definition at line 55 of file DataSvc.h.

DataSvcHelpers::RegistryEntry* DataSvc::m_root
protected

Pointer to root entry.

Definition at line 63 of file DataSvc.h.

CLID DataSvc::m_rootCLID
protected

Integer Property corresponding to CLID of root entry.

Definition at line 47 of file DataSvc.h.

std::string DataSvc::m_rootName
protected

Name of root event.

Definition at line 49 of file DataSvc.h.


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