28#define DATASVC_RECORDDATASVC_CPP
58 error() <<
"Failed to access RecordPersistencySvc." <<
endmsg;
67 error() <<
"Failed to attach dataloader RecordPersistencySvc." <<
endmsg;
73 warning() <<
"Error declaring Record root DataObject" <<
endmsg;
78 fatal() <<
"IncidentSvc is invalid--base class failed." <<
endmsg;
101 if ( incident.
type() ==
"FILE_OPEN_READ" ) {
103 auto inc =
dynamic_cast<const Ctxt*
>( &incident );
105 always() <<
"Received invalid incident of type:" << incident.
type() <<
endmsg;
115 always() <<
"Saving records not implemented." <<
endmsg;
122 error() <<
"Failed to load records object" <<
endmsg;
124 vector<IRegistry*> leaves;
129 debug() <<
"Loaded records object: " << id0 <<
endmsg;
140 if ( !data.empty() && pAddr ) {
142 debug() <<
"Request to load record for file " << fid <<
endmsg;
145 warning() <<
"Failed to register record for:" << fid <<
endmsg;
151 }
else if ( !data.empty() && !pAddr ) {
152 info() <<
"Failed to register record for:" << data <<
" [Invalid Address]" <<
endmsg;
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
MsgStream & always() const
shortcut for the method msgStream(MSG::ALWAYS)
A DataObject is the base class of any identifiable object on any data store.
StatusCode setRoot(std::string root_name, DataObject *pRootObj) override
Initialize data store for new event by giving new event path and root object.
StatusCode finalize() override
Service initialization.
Gaudi::Property< std::string > m_rootName
StatusCode setDataLoader(IConversionSvc *svc, IDataProviderSvc *dpsvc=nullptr) override
IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service and optionally a data pro...
StatusCode objectLeaves(const DataObject *pObject, std::vector< IRegistry * > &refLeaves) override
IDataManagerSvc: Explore the object store: retrieve all leaves attached to the object.
StatusCode initialize() override
Service initialization.
SmartIF< IIncidentSvc > m_incidentSvc
Pointer to incident service.
StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject) override
Retrieve object from data store.
StatusCode registerAddress(std::string_view fullPath, IOpaqueAddress *pAddress) override
IDataManagerSvc: Register object address with the data store.
std::unique_ptr< DataSvcHelpers::RegistryEntry > m_root
Pointer to root entry.
Opaque address interface definition.
virtual unsigned long release()=0
release reference to object
virtual IRegistry * registry() const =0
Update branch name.
The IProperty is the basic interface for all components which have properties that can be set or get.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
virtual const id_type & identifier() const =0
Full identifier (or key)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Base class for all Incidents (computing events).
const std::string & type() const
Access to the incident type.
A RecordDataSvc is the base class for event services.
Gaudi::Property< std::string > m_incidentName
StatusCode initialize() override
Service initialisation.
SmartIF< IConversionSvc > m_cnvSvc
Reference to the main data conversion service.
std::vector< std::string > m_incidents
Pending new file incidents.
void registerRecord(const std::string &data, IOpaqueAddress *pAddr)
Load new record into the data store if necessary.
Gaudi::Property< std::string > m_persSvcName
Gaudi::Property< bool > m_autoLoad
RecordDataSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
void handle(const Incident &incident) override
IIncidentListener override: Inform that a new incident has occured.
Gaudi::Property< std::string > m_saveIncidentName
StatusCode finalize() override
Service finalization.
void loadRecords(IRegistry *pReg)
Load dependent records into memory.
const std::string & name() const override
Retrieve name of the service.
SmartIF< IFace > service(const std::string &name, bool createIf=true) const
This class is used for returning status codes from appropriate routines.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE