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


More...

#include <DetectorDataSvc/DetDataSvc.h>

Inheritance diagram for DetDataSvc:
Collaboration diagram for DetDataSvc:

Public Member Functions

virtual StatusCode initialize ()
 Initialize the service. More...
 
virtual StatusCode reinitialize ()
 Initialize the service. More...
 
virtual StatusCode finalize ()
 Finalize the service. More...
 
virtual StatusCode clearStore ()
 Remove all data objects in the data store. More...
 
virtual StatusCode updateObject (DataObject *toUpdate)
 Update object. More...
 
 DetDataSvc (const std::string &name, ISvcLocator *svc)
 Standard Constructor. More...
 
virtual ~DetDataSvc ()
 Standard Destructor. More...
 
virtual bool validEventTime () const
 Check if the event time has been set. More...
 
virtual const Gaudi::TimeeventTime () const
 Get the event time. More...
 
virtual void setEventTime (const Gaudi::Time &time)
 Set the new event time. More...
 
virtual void handle (const Incident &)
 Inform that a new incident has occured. More...
 
- Public Member Functions inherited from extends2< DataSvc, IDetDataSvc, IIncidentListener >
 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 DataSvc
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 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 (const std::string &parentPath, const std::string &updatePath)
 Update object. More...
 
virtual StatusCode updateObject (DataObject *pParent, const std::string &updatePath)
 Update object. 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...
 
- 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...
 
- Public Member Functions inherited from extend_interfaces2< IDetDataSvc, IIncidentListener >
virtual ~extend_interfaces2 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IDetDataSvc
 DeclareInterfaceID (IDetDataSvc, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IIncidentListener
 DeclareInterfaceID (IIncidentListener, 2, 0)
 InterfaceID. More...
 

Private Member Functions

StatusCode setupDetectorDescription ()
 Deal with Detector Description initialization. More...
 

Private Attributes

int m_detStorageType
 Detector Data Persistency Storage type. More...
 
std::string m_detDbLocation
 Location of detector Db (filename,URL) More...
 
std::string m_detDbRootName
 Name of the root node of the detector. More...
 
std::string m_persistencySvcName
 Name of the persistency service. More...
 
bool m_usePersistency
 Flag to control if the persistency is required. More...
 
Gaudi::Time m_eventTime
 Current event time. More...
 
SmartIF< IAddressCreatorm_addrCreator
 Address Creator to be used. More...
 

Additional Inherited Members

- Public Types inherited from extends2< DataSvc, IDetDataSvc, IIncidentListener >
typedef extends2 base_class
 Typedef to this class. More...
 
typedef extend_interfaces2
< IDetDataSvc,
IIncidentListener
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 DataSvc
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 Types inherited from extend_interfaces2< IDetDataSvc, IIncidentListener >
typedef mpl::fold< typename
IDetDataSvc::iid::iids::type,
typename
IIncidentListener::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
- Protected Member Functions inherited from DataSvc
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 inherited from DataSvc
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...
 

Detailed Description


A DataSvc specialized in detector data.

Author
Marco Clemencic (previous author unknown)

Definition at line 24 of file DetDataSvc.h.

Constructor & Destructor Documentation

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

Standard Constructor.

Definition at line 185 of file DetDataSvc.cpp.

185  :
186  base_class(name,svc), m_eventTime(0) {
187  declareProperty("DetStorageType", m_detStorageType = XML_StorageType );
188  declareProperty("DetDbLocation", m_detDbLocation = "empty" );
189  declareProperty("DetDbRootName", m_detDbRootName = "dd" );
190  declareProperty("UsePersistency", m_usePersistency = false );
191  declareProperty("PersistencySvc", m_persistencySvcName = "DetectorPersistencySvc" );
192  m_rootName = "/dd";
193  m_rootCLID = CLID_Catalog;
194  m_addrCreator = 0;
195 }
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_persistencySvcName
Name of the persistency service.
Definition: DetDataSvc.h:92
SmartIF< IAddressCreator > m_addrCreator
Address Creator to be used.
Definition: DetDataSvc.h:101
int m_detStorageType
Detector Data Persistency Storage type.
Definition: DetDataSvc.h:83
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
const long XML_StorageType
Definition: ClassID.h:58
std::string m_detDbRootName
Name of the root node of the detector.
Definition: DetDataSvc.h:89
Gaudi::Time m_eventTime
Current event time.
Definition: DetDataSvc.h:98
std::string m_detDbLocation
Location of detector Db (filename,URL)
Definition: DetDataSvc.h:86
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
bool m_usePersistency
Flag to control if the persistency is required.
Definition: DetDataSvc.h:95
DetDataSvc::~DetDataSvc ( )
virtual

Standard Destructor.

Definition at line 198 of file DetDataSvc.cpp.

198  {
199 }

Member Function Documentation

StatusCode DetDataSvc::clearStore ( )
virtual

Remove all data objects in the data store.

Reimplemented from DataSvc.

Definition at line 151 of file DetDataSvc.cpp.

151  {
152 
153  MsgStream log(msgSvc(), name());
154 
156 
157  if( m_usePersistency ) {
158  // Create root address
159  unsigned long iargs[] = {0,0};
160  const std::string args[] = {m_detDbLocation, m_detDbRootName};
161  IOpaqueAddress* rootAddr;
162  StatusCode sc = m_addrCreator->createAddress (m_detStorageType,
163  CLID_Catalog,
164  args,
165  iargs,
166  rootAddr);
167  // Set detector data store root
168  if( sc.isSuccess() ) {
169  std::string dbrName = "/" + m_detDbRootName;
170  sc = i_setRoot( dbrName, rootAddr );
171  if( sc.isFailure() ) {
172  error() << "Unable to set detector data store root" << endmsg;
173  }
174  } else {
175  error() << "Unable to create address for /dd" << endmsg;
176  }
177  return sc;
178 
179  }
180  return StatusCode::SUCCESS;
181 
182 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
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
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
SmartIF< IAddressCreator > m_addrCreator
Address Creator to be used.
Definition: DetDataSvc.h:101
int m_detStorageType
Detector Data Persistency Storage type.
Definition: DetDataSvc.h:83
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
std::string m_detDbRootName
Name of the root node of the detector.
Definition: DetDataSvc.h:89
list args
Definition: gaudirun.py:254
virtual StatusCode clearStore()
IDataManagerSvc: Remove all data objects in the data store.
Definition: DataSvc.cpp:108
std::string m_detDbLocation
Location of detector Db (filename,URL)
Definition: DetDataSvc.h:86
Opaque address interface definition.
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
bool m_usePersistency
Flag to control if the persistency is required.
Definition: DetDataSvc.h:95
const Gaudi::Time & DetDataSvc::eventTime ( ) const
virtual

Get the event time.

Implements IDetDataSvc.

Definition at line 213 of file DetDataSvc.cpp.

213  {
214  return m_eventTime;
215 }
Gaudi::Time m_eventTime
Current event time.
Definition: DetDataSvc.h:98
StatusCode DetDataSvc::finalize ( )
virtual

Finalize the service.

Reimplemented from DataSvc.

Definition at line 132 of file DetDataSvc.cpp.

133 {
134  DEBMSG << "Finalizing" << endmsg;
135 
136  // clears the store
137  m_usePersistency = false; // avoid creation of an empty store when clearing
138  clearStore().ignore();
139 
140  // Releases the address creator
141  m_addrCreator = 0;
142 
143  // Releases the DataLoader
144  setDataLoader(0).ignore();
145 
146  // Finalize the base class
147  return DataSvc::finalize();
148 }
virtual StatusCode setDataLoader(IConversionSvc *svc)
IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service.
Definition: DataSvc.cpp:204
SmartIF< IAddressCreator > m_addrCreator
Address Creator to be used.
Definition: DetDataSvc.h:101
#define DEBMSG
Definition: DetDataSvc.cpp:19
virtual StatusCode clearStore()
Remove all data objects in the data store.
Definition: DetDataSvc.cpp:151
void ignore() const
Definition: StatusCode.h:94
virtual StatusCode finalize()
Service initialization.
Definition: DataSvc.cpp:1336
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool m_usePersistency
Flag to control if the persistency is required.
Definition: DetDataSvc.h:95
void DetDataSvc::handle ( const Incident inc)
virtual

Inform that a new incident has occured.

Inform that a new incident has occurred.

Implements IIncidentListener.

Definition at line 218 of file DetDataSvc.cpp.

218  {
219  ON_DEBUG {
220  debug() << "New incident received" << endmsg;
221  debug() << "Incident source: " << inc.source() << endmsg;
222  debug() << "Incident type: " << inc.type() << endmsg;
223  }
224  return;
225 }
const std::string & type() const
Access to the incident type.
Definition: Incident.h:34
const std::string & source() const
Access to the source of the incident.
Definition: Incident.h:40
#define ON_DEBUG
Definition: DetDataSvc.cpp:16
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode DetDataSvc::initialize ( )
virtual

Initialize the service.

Reimplemented from DataSvc.

Definition at line 27 of file DetDataSvc.cpp.

27  {
28  // Call base class initialization
30  if( UNLIKELY(sc.isFailure()) ) return sc;
31 
32  // Set Data Loader
34  if( UNLIKELY(!cnv_svc.isValid()) ) {
35  error() << "Unable to retrieve " << m_persistencySvcName << endmsg;
36  return StatusCode::FAILURE;
37  }
38 
39  sc = setDataLoader(cnv_svc);
40  if( UNLIKELY(sc.isFailure()) ) {
41  error() << "Unable to set DataLoader" << endmsg;
42  return sc;
43  }
44 
45  // Get address creator from the DetectorPersistencySvc
46  m_addrCreator = cnv_svc;
47  if ( UNLIKELY(!m_addrCreator.isValid()) ) {
48  error() << "Unable to get AddressCreator." << endmsg;
49  return StatusCode::FAILURE;
50  }
51 
52  return setupDetectorDescription();
53 }
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
std::string m_persistencySvcName
Name of the persistency service.
Definition: DetDataSvc.h:92
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
StatusCode setupDetectorDescription()
Deal with Detector Description initialization.
Definition: DetDataSvc.cpp:55
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
SmartIF< IAddressCreator > m_addrCreator
Address Creator to be used.
Definition: DetDataSvc.h:101
virtual StatusCode initialize()
Service initialization.
Definition: DataSvc.cpp:1295
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
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
Definition: Service.cpp:336
StatusCode DetDataSvc::reinitialize ( )
virtual

Initialize the service.

Reimplemented from DataSvc.

Definition at line 114 of file DetDataSvc.cpp.

114  {
115  // The DetectorDataSvc does not need to be re-initialized. If it is done
116  // all the Algorithms having references to DetectorElements will become
117  // invalid and crash the program. (Pere Mato)
118 
119  // Call base class reinitialization
120  //StatusCode sc = DataSvc::reinitialize();
121  //if( sc.isFailure() ) return sc;
122 
123  // Delete the associated event time
124  //if( 0 != m_eventTime ) delete m_eventTime;
125  //m_eventTimeDefined = false;
126 
127  //return setupDetectorDescription();
128  return StatusCode::SUCCESS;
129 }
void DetDataSvc::setEventTime ( const Gaudi::Time time)
virtual

Set the new event time.

Implements IDetDataSvc.

Definition at line 202 of file DetDataSvc.cpp.

202  {
203  m_eventTime = time;
204  DEBMSG << "Event Time set to " << eventTime() << endmsg;
205 }
virtual const Gaudi::Time & eventTime() const
Get the event time.
Definition: DetDataSvc.cpp:213
#define DEBMSG
Definition: DetDataSvc.cpp:19
Gaudi::Time m_eventTime
Current event time.
Definition: DetDataSvc.h:98
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode DetDataSvc::setupDetectorDescription ( )
private

Deal with Detector Description initialization.

Todo:
: remove references to obsolete package XMLDDDBROOT

Definition at line 55 of file DetDataSvc.cpp.

55  {
56  // Initialize the detector data transient store
57  ON_DEBUG {
58  debug() << "Storage type used is: " << m_detStorageType << endmsg;
59  debug() << "Setting DetectorDataSvc root node... " << endmsg;
60  }
61 
62  if( m_usePersistency ) {
63 
64  IOpaqueAddress* rootAddr;
65  if( m_detDbLocation.empty() || "empty" == m_detDbLocation ) {
66 
67  // if the name of DBlocation is not given - construct it!
68  // by retrieving the value of XMLDDBROOT
69 
71  if ( isEnvSet("XMLDDDBROOT") ) {
72  m_detDbLocation = getEnv("XMLDDDBROOT");
73  m_detDbLocation += "/DDDB/lhcb.xml";
74  }
75  }
76  if( m_detDbLocation.empty() || "empty" == m_detDbLocation ) {
77  error() << "Detector data location name not set. Detector data will "
78  "not be found." << endmsg;
79  return StatusCode::FAILURE;
80  }
81  else {
82  // Create address
83  unsigned long iargs[]={0,0};
84  const std::string args[] = {m_detDbLocation, m_detDbRootName};
85  StatusCode sc = m_addrCreator->createAddress (m_detStorageType,
86  CLID_Catalog,
87  args,
88  iargs,
89  rootAddr);
90  if( sc.isSuccess() ) {
91  std::string dbrName = "/" + m_detDbRootName;
92  sc = i_setRoot( dbrName, rootAddr );
93  if( sc.isFailure() ) {
94  error() << "Unable to set detector data store root" << endmsg;
95  return sc;
96  }
97  }
98  else {
99  error() << "Unable to create address for /dd" << endmsg;
100  return sc;
101  }
102  }
103  // Writing the description file in the output log file [bugs #2854]
104  always() << "Detector description database: " << m_detDbLocation << endmsg;
105  }
106  else {
107  info() << "Detector description not requested to be loaded" << endmsg;
108  }
109 
110  return StatusCode::SUCCESS;
111 }
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
Definition: System.cpp:608
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
MsgStream & always() const
shortcut for the method msgStream(MSG::ALWAYS)
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
#define ON_DEBUG
Definition: DetDataSvc.cpp:16
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
SmartIF< IAddressCreator > m_addrCreator
Address Creator to be used.
Definition: DetDataSvc.h:101
int m_detStorageType
Detector Data Persistency Storage type.
Definition: DetDataSvc.h:83
GAUDI_API bool isEnvSet(const char *var)
Check if an environment variable is set or not.
Definition: System.cpp:628
std::string m_detDbRootName
Name of the root node of the detector.
Definition: DetDataSvc.h:89
list args
Definition: gaudirun.py:254
std::string m_detDbLocation
Location of detector Db (filename,URL)
Definition: DetDataSvc.h:86
Opaque address interface definition.
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
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
bool m_usePersistency
Flag to control if the persistency is required.
Definition: DetDataSvc.h:95
StatusCode DetDataSvc::updateObject ( DataObject toUpdate)
virtual

Update object.

Todo:
update also its ancestors in the data store if necessary

Reimplemented from DataSvc.

Definition at line 229 of file DetDataSvc.cpp.

229  {
230 
231  DEBMSG << "Method updateObject starting" << endmsg;
232 
233  // Check that object to update exists
234  if ( 0 == toUpdate ) {
235  error() << "There is no DataObject to update" << endmsg;
236  return INVALID_OBJECT;
237  }
238 
239  // Retrieve IValidity interface of object to update
240  IValidity* condition = dynamic_cast<IValidity*>( toUpdate );
241  if ( 0 == condition ) {
242  warning()
243  << "Cannot update DataObject: DataObject does not implement IValidity"
244  << endmsg;
245  return StatusCode::SUCCESS;
246  }
247 
248  // Check that the event time has been defined
249  if ( !validEventTime() ) {
250  warning()
251  << "Cannot update DataObject: event time undefined"
252  << endmsg;
253  return StatusCode::SUCCESS;
254  }
255 
256  // No need to update if condition is valid
257  if ( condition->isValid( eventTime() ) ) {
258  DEBMSG << "DataObject is valid: no need to update" << endmsg;
259  return StatusCode::SUCCESS;
260  } else {
261  DEBMSG << "DataObject is invalid: update it" << endmsg;
262  }
263 
264  // TODO: before loading updated object, update HERE its parent in data store
265 
266  // Now delegate update to the conversion service by calling the base class
267  DEBMSG << "Delegate update to relevant conversion service" << endmsg;
268  StatusCode status = DataSvc::updateObject(toUpdate);
269  if ( !status.isSuccess() ) {
270  error() << "Could not update DataObject" << endmsg;
271  if ( status == NO_DATA_LOADER )
272  error() << "There is no data loader" << endmsg;
273  return status;
274  }
275 
276  // Now cross-check that the new condition is valid
277  condition = dynamic_cast<IValidity*>(toUpdate);
278  if ( 0 == condition ) {
279  error() << "Updated DataObject does not implement IValidity" << endmsg;
280  return StatusCode::FAILURE;
281  }
283  !condition->isValid( eventTime() ) ) {
284  error() << "Updated DataObject is not valid" << endmsg;
285  error() << "Are you sure the conversion service has updated it?" << endmsg;
286  return StatusCode::FAILURE;
287  }
288 
289  // DataObject was successfully updated
290  DEBMSG << "Method updateObject exiting successfully" << endmsg;
291  return StatusCode::SUCCESS;
292 
293 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
No data loader available.
virtual StatusCode updateObject(IRegistry *pDirectory)
Update object identified by its directory entry.
Definition: DataSvc.cpp:997
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
virtual bool validEventTime() const
Check if the event time has been set.
Definition: DetDataSvc.cpp:208
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const Gaudi::Time & eventTime() const
Get the event time.
Definition: DetDataSvc.cpp:213
virtual bool isValid() const =0
Check if the object is valid (it can be always invalid).
#define DEBMSG
Definition: DetDataSvc.cpp:19
virtual Gaudi::StateMachine::State FSMState() const
Get the current state.
Definition: Service.h:56
Object pointer is invalid.
Interface for objects with a validity.
Definition: IValidity.h:9
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
bool DetDataSvc::validEventTime ( ) const
virtual

Check if the event time has been set.

Kept for backward compatibility, returns always true.

Implements IDetDataSvc.

Definition at line 208 of file DetDataSvc.cpp.

208  {
209  return true;
210 }

Member Data Documentation

SmartIF<IAddressCreator> DetDataSvc::m_addrCreator
private

Address Creator to be used.

Definition at line 101 of file DetDataSvc.h.

std::string DetDataSvc::m_detDbLocation
private

Location of detector Db (filename,URL)

Definition at line 86 of file DetDataSvc.h.

std::string DetDataSvc::m_detDbRootName
private

Name of the root node of the detector.

Definition at line 89 of file DetDataSvc.h.

int DetDataSvc::m_detStorageType
private

Detector Data Persistency Storage type.

Definition at line 83 of file DetDataSvc.h.

Gaudi::Time DetDataSvc::m_eventTime
private

Current event time.

Definition at line 98 of file DetDataSvc.h.

std::string DetDataSvc::m_persistencySvcName
private

Name of the persistency service.

Definition at line 92 of file DetDataSvc.h.

bool DetDataSvc::m_usePersistency
private

Flag to control if the persistency is required.

Definition at line 95 of file DetDataSvc.h.


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