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

A RecordDataSvc is the base class for event services. More...

#include <src/DataSvc/RecordDataSvc.h>

Inheritance diagram for RecordDataSvc:
Collaboration diagram for RecordDataSvc:

Public Member Functions

virtual StatusCode initialize ()
 Service initialisation. More...
 
virtual StatusCode reinitialize ()
 Service reinitialisation. More...
 
virtual StatusCode finalize ()
 Service finalization. More...
 
virtual void handle (const Incident &incident)
 IIncidentListener override: Inform that a new incident has occured. More...
 
 RecordDataSvc (const std::string &name, ISvcLocator *svc)
 Standard Constructor. More...
 
virtual ~RecordDataSvc ()
 Standard Destructor. More...
 
- Public Member Functions inherited from extends1< DataSvc, IIncidentListener >
 extends1 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
 extends1 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
 extends1 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends1 ()
 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 ~extends1 ()
 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 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...
 
 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 ~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...
 
- Public Member Functions inherited from extend_interfaces1< IIncidentListener >
virtual ~extend_interfaces1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IIncidentListener
 DeclareInterfaceID (IIncidentListener, 2, 0)
 InterfaceID. More...
 

Protected Types

typedef std::vector< std::string > StringV
 

Protected Member Functions

void registerRecord (const std::string &data, IOpaqueAddress *pAddr)
 Load new record into the data store if necessary. More...
 
void loadRecords (IRegistry *pReg)
 Load dependent records into memory. 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

bool m_autoLoad
 Property: autoload of records (default: true) More...
 
std::string m_incidentName
 Property: name of incident to be fired if new record arrives. More...
 
std::string m_saveIncidentName
 Property: name of the "save" incident. More...
 
std::string m_persSvcName
 Property: name of the persistency service. More...
 
StringV m_incidents
 Pending new file incidents. More...
 
IConversionSvcm_cnvSvc
 Reference to the main data conversion service. 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...
 

Additional Inherited Members

- Public Types inherited from extends1< DataSvc, IIncidentListener >
typedef extends1 base_class
 Typedef to this class. More...
 
typedef extend_interfaces1
< 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_interfaces1< IIncidentListener >
typedef
IIncidentListener::iid::iids::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...
 

Detailed Description

A RecordDataSvc is the base class for event services.

When a new datafile is opened the data service retrieves an incident from the persistency area (currently only from POOL) together with an opaque address describing the record. These history records are put onto the run-records datastore under the name of the logical file (FID): /Records/<FID>/.....

Hence, each history records can be addresses the same way: /Record/<FID> (/EOR)

Author
M.Frank
Version
1.0

Definition at line 26 of file RecordDataSvc.h.

Member Typedef Documentation

typedef std::vector<std::string> RecordDataSvc::StringV
protected

Definition at line 28 of file RecordDataSvc.h.

Constructor & Destructor Documentation

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

Standard Constructor.

Definition at line 169 of file RecordDataSvc.cpp.

170 : base_class(name,svc), m_cnvSvc(0)
171 {
172  m_rootName = "/Records";
173  declareProperty("AutoLoad", m_autoLoad = true);
174  declareProperty("IncidentName", m_incidentName = "");
175  declareProperty("SaveIncident", m_saveIncidentName = "SAVE_RECORD");
176  declareProperty("PersistencySvc", m_persSvcName = "PersistencySvc/RecordPersistencySvc");
177 }
std::string m_persSvcName
Property: name of the persistency service.
Definition: RecordDataSvc.h:58
std::string m_incidentName
Property: name of incident to be fired if new record arrives.
Definition: RecordDataSvc.h:54
bool m_autoLoad
Property: autoload of records (default: true)
Definition: RecordDataSvc.h:52
std::string m_rootName
Name of root event.
Definition: DataSvc.h:50
extends1 base_class
Typedef to this class.
Definition: extends.h:12
std::string m_saveIncidentName
Property: name of the "save" incident.
Definition: RecordDataSvc.h:56
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:211
IConversionSvc * m_cnvSvc
Reference to the main data conversion service.
Definition: RecordDataSvc.h:62
RecordDataSvc::~RecordDataSvc ( )
virtual

Standard Destructor.

Definition at line 180 of file RecordDataSvc.cpp.

180  {
181 }

Member Function Documentation

StatusCode RecordDataSvc::finalize ( )
virtual

Service finalization.

Reimplemented from DataSvc.

Definition at line 90 of file RecordDataSvc.cpp.

90  {
92  if( m_cnvSvc ) m_cnvSvc->release();
93  m_cnvSvc = 0;
95  return StatusCode::SUCCESS ;
96 }
IIncidentSvc * m_incidentSvc
Pointer to incident service.
Definition: DataSvc.h:54
virtual unsigned long release()=0
Release Interface instance.
virtual void removeListener(IIncidentListener *lis, const std::string &type="")=0
Remove listener.
void ignore() const
Definition: StatusCode.h:107
virtual StatusCode finalize()
Service initialization.
Definition: DataSvc.cpp:1241
IConversionSvc * m_cnvSvc
Reference to the main data conversion service.
Definition: RecordDataSvc.h:62
void RecordDataSvc::handle ( const Incident incident)
virtual

IIncidentListener override: Inform that a new incident has occured.

Inform that a new incident has occured.

Implements IIncidentListener.

Definition at line 99 of file RecordDataSvc.cpp.

99  {
100  if ( incident.type() == "FILE_OPEN_READ" ) {
102  const Ctxt* inc = dynamic_cast<const Ctxt*>(&incident);
103  if ( inc ) {
104  registerRecord(inc->source(),inc->tag());
105  if ( !m_incidentName.empty() ) {
106  StringV incidents(m_incidents);
107  m_incidents.clear();
108  for( StringV::const_iterator i=incidents.begin(); i!=incidents.end();++i)
110  }
111  return;
112  }
113  MsgStream log(msgSvc(),name());
114  log << MSG::ALWAYS << "Received invalid incident of type:" << incident.type() << endmsg;
115  }
116  else if ( incident.type() == m_saveIncidentName ) {
117  MsgStream log(msgSvc(),name());
118  log << MSG::ALWAYS << "Saving records not implemented." << endmsg;
119  }
120 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
const std::string & type() const
Access to the incident type.
Definition: Incident.h:34
std::string m_incidentName
Property: name of incident to be fired if new record arrives.
Definition: RecordDataSvc.h:54
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
IIncidentSvc * m_incidentSvc
Pointer to incident service.
Definition: DataSvc.h:54
virtual void fireIncident(const Incident &incident)=0
Fire an Incident.
std::string m_saveIncidentName
Property: name of the "save" incident.
Definition: RecordDataSvc.h:56
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
StringV m_incidents
Pending new file incidents.
Definition: RecordDataSvc.h:60
Base class for all Incidents (computing events).
Definition: Incident.h:16
void registerRecord(const std::string &data, IOpaqueAddress *pAddr)
Load new record into the data store if necessary.
list i
Definition: ana.py:128
std::vector< std::string > StringV
Definition: RecordDataSvc.h:28
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode RecordDataSvc::initialize ( )
virtual

Service initialisation.

We need to subscribe to 2 incident: 1) FILE_OPEN_READ: fired by conversion service on open file 2) IncidentType::BeginEvent fired by event loop BEFORE the event processing starts. Do everything to bootstract access to the old event record.

Reimplemented from DataSvc.

Definition at line 39 of file RecordDataSvc.cpp.

39  {
40  // Nothing to do: just call base class initialisation
42  MsgStream log(msgSvc(),name());
43 
44  if ( !sc.isSuccess() ) { // Base class failure
45  return sc;
46  }
47  // Attach data loader facility
48  sc = service(m_persSvcName, m_cnvSvc, true);
49  if ( !sc.isSuccess() ) {
50  log << MSG::ERROR << "Failed to access RecordPersistencySvc." << endmsg;
51  return sc;
52  }
54  if ( prp ) {
55  //prp->setProperty();
56  }
57  sc = setDataLoader( m_cnvSvc );
58  if ( !sc.isSuccess() ) {
59  log << MSG::ERROR << "Failed to attach dataloader RecordPersistencySvc." << endmsg;
60  return sc;
61  }
62 
63  sc = setRoot(m_rootName, new DataObject());
64  if( !sc.isSuccess() ) {
65  log << MSG::WARNING << "Error declaring Record root DataObject" << endmsg;
66  return sc;
67  }
68 
69  if( !m_incidentSvc ) {
70  log << MSG::FATAL << "IncidentSvc is invalid--base class failed." << endmsg;
71  return sc;
72  }
73 
78  m_incidentSvc->addListener(this,"FILE_OPEN_READ");
80  return sc;
81 }
virtual StatusCode setDataLoader(IConversionSvc *svc)
IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service.
Definition: DataSvc.cpp:203
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
std::string m_persSvcName
Property: name of the persistency service.
Definition: RecordDataSvc.h:58
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
std::string m_rootName
Name of root event.
Definition: DataSvc.h:50
IIncidentSvc * m_incidentSvc
Pointer to incident service.
Definition: DataSvc.h:54
virtual StatusCode 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:154
std::string m_saveIncidentName
Property: name of the "save" incident.
Definition: RecordDataSvc.h:56
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
virtual StatusCode initialize()
Service initialization.
Definition: DataSvc.cpp:1201
virtual void addListener(IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false)=0
Add listener.
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 & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
IConversionSvc * m_cnvSvc
Reference to the main data conversion service.
Definition: RecordDataSvc.h:62
void RecordDataSvc::loadRecords ( IRegistry pReg)
protected

Load dependent records into memory.

Definition at line 123 of file RecordDataSvc.cpp.

123  {
124  if ( 0 != pObj ) {
125  typedef vector<IRegistry*> Leaves;
126  Leaves leaves;
127  DataObject* p = 0;
128  MsgStream log(msgSvc(),name());
129  const string& id0 = pObj->identifier();
130  StatusCode sc = retrieveObject(id0, p);
131  if ( sc.isSuccess() ) {
132  log << MSG::DEBUG << "Loaded records object: " << id0 << endmsg;
133  sc = objectLeaves(pObj, leaves);
134  if ( sc.isSuccess() ) {
135  for ( Leaves::const_iterator i=leaves.begin(); i != leaves.end(); i++ )
136  loadRecords(*i);
137  }
138  }
139  else {
140  log << MSG::ERROR << "Failed to load records object: " << pObj->identifier() << endmsg;
141  }
142  }
143 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
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:230
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
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:782
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
list i
Definition: ana.py:128
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
void loadRecords(IRegistry *pReg)
Load dependent records into memory.
void RecordDataSvc::registerRecord ( const std::string &  data,
IOpaqueAddress pAddr 
)
protected

Load new record into the data store if necessary.

Load new run record into the data store if necessary.

Definition at line 146 of file RecordDataSvc.cpp.

146  {
147  if ( !data.empty() && 0 != pAddr ) {
148  MsgStream log(msgSvc(),name());
149  string fid = data;
150  log << MSG::DEBUG << "Request to load record for file " << fid << endmsg;
151  StatusCode sc = registerAddress(m_root,fid,pAddr);
152  if ( !sc.isSuccess() ) {
153  log << MSG::WARNING << "Failed to register record for:" << fid << endmsg;
154  pAddr->release();
155  return;
156  }
157  if ( m_autoLoad ) {
158  loadRecords(pAddr->registry());
159  }
160  m_incidents.push_back(pAddr->registry()->identifier());
161  }
162  else if ( !data.empty() && 0 == pAddr ) {
163  MsgStream log(msgSvc(),name());
164  log << MSG::INFO << "Failed to register record for:" << data << " [Invalid Address]" << endmsg;
165  }
166 }
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:75
bool m_autoLoad
Property: autoload of records (default: true)
Definition: RecordDataSvc.h:52
virtual unsigned long release()=0
release reference to object
DataSvcHelpers::RegistryEntry * m_root
Pointer to root entry.
Definition: DataSvc.h:64
virtual StatusCode registerAddress(const std::string &fullPath, IOpaqueAddress *pAddress)
IDataManagerSvc: Register object address with the data store.
Definition: DataSvc.cpp:249
virtual IRegistry * registry() const =0
Update branch name.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
StringV m_incidents
Pending new file incidents.
Definition: RecordDataSvc.h:60
virtual const id_type & identifier() const =0
Full identifier (or key)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
void loadRecords(IRegistry *pReg)
Load dependent records into memory.
StatusCode RecordDataSvc::reinitialize ( )
virtual

Service reinitialisation.

Reimplemented from DataSvc.

Definition at line 84 of file RecordDataSvc.cpp.

84  {
85  // Do nothing for this service
86  return StatusCode::SUCCESS;
87 }

Member Data Documentation

bool RecordDataSvc::m_autoLoad
protected

Property: autoload of records (default: true)

Definition at line 52 of file RecordDataSvc.h.

IConversionSvc* RecordDataSvc::m_cnvSvc
protected

Reference to the main data conversion service.

Definition at line 62 of file RecordDataSvc.h.

std::string RecordDataSvc::m_incidentName
protected

Property: name of incident to be fired if new record arrives.

Definition at line 54 of file RecordDataSvc.h.

StringV RecordDataSvc::m_incidents
protected

Pending new file incidents.

Definition at line 60 of file RecordDataSvc.h.

std::string RecordDataSvc::m_persSvcName
protected

Property: name of the persistency service.

Definition at line 58 of file RecordDataSvc.h.

std::string RecordDataSvc::m_saveIncidentName
protected

Property: name of the "save" incident.

Definition at line 56 of file RecordDataSvc.h.


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