The Gaudi Framework  v33r0 (d5ea422b)
PersistencySvc Class Reference

PersistencySvc class implementation definition. More...

#include <src/PersistencySvc/PersistencySvc.h>

Inheritance diagram for PersistencySvc:
Collaboration diagram for PersistencySvc:

Classes

class  ServiceEntry
 

Public Member Functions

IPersistencySvc Interface implementation
long repSvcType () const override
 Return default service type. More...
 
const CLIDobjType () const override
 Retrieve the class type of objects the converter produces. (DUMMY) More...
 
StatusCode createObj (IOpaqueAddress *pAddress, DataObject *&refpObject) override
 Implementation of IConverter: Create the transient representation of an object. More...
 
StatusCode fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) override
 Implementation of IConverter: Resolve the references of the created transient object. More...
 
StatusCode updateObj (IOpaqueAddress *pAddress, DataObject *refpObject) override
 Implementation of IConverter: Update the transient object from the other representation. More...
 
StatusCode updateObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) override
 Implementation of IConverter: Update the references of an updated transient object. More...
 
StatusCode createRep (DataObject *pObject, IOpaqueAddress *&refpAddress) override
 Implementation of IConverter: Convert the transient object to the requested representation. More...
 
StatusCode fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) override
 Implementation of IConverter: Resolve the references of the converted object. More...
 
StatusCode updateRep (IOpaqueAddress *pAddress, DataObject *pObject) override
 Implementation of IConverter: Update the converted representation of a transient object. More...
 
StatusCode updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) override
 Implementation of IConverter: Update the references of an already converted object. More...
 
StatusCode setDataProvider (IDataProviderSvc *pStore) override
 Define transient datastore. More...
 
SmartIF< IDataProviderSvc > & dataProvider () const override
 Access reference to transient datastore. More...
 
StatusCode setConversionSvc (IConversionSvc *svc) override
 Set conversion service the converter is connected to. More...
 
SmartIF< IConversionSvc > & conversionSvc () const override
 Get conversion service the converter is connected to. More...
 
StatusCode setAddressCreator (IAddressCreator *creator) override
 Set address creator facility. More...
 
SmartIF< IAddressCreator > & addressCreator () const override
 Retrieve address creator facility. More...
 
StatusCode addConverter (IConverter *pConverter) override
 Add converter object to conversion service. More...
 
StatusCode addConverter (const CLID &clid) override
 Add converter object to conversion service. More...
 
IConverterconverter (const CLID &clid) override
 Retrieve converter from list. More...
 
StatusCode removeConverter (const CLID &clid) override
 Remove converter object from conversion service (if present). More...
 
StatusCode connectOutput (const std::string &outputFile, const std::string &openMode) override
 Connect the output file to the service with open mode. More...
 
StatusCode connectOutput (const std::string &outputFile) override
 Connect the output file to the service. More...
 
StatusCode commitOutput (const std::string &output, bool do_commit) override
 Commit pending output. More...
 
StatusCode createAddress (long svc_type, const CLID &clid, const std::string *pars, const unsigned long *ipars, IOpaqueAddress *&refpAddress) override
 Create a Generic address using explicit arguments to identify a single object. More...
 
StatusCode convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress) override
 Convert an address to string form. More...
 
StatusCode createAddress (long svc_type, const CLID &clid, const std::string &refAddress, IOpaqueAddress *&refpAddress) override
 Convert an address in string form to object form. More...
 
: IPersistencySvc implementation
StatusCode addCnvService (IConversionSvc *service) override
 Add a new Service. More...
 
StatusCode removeCnvService (long type) override
 Remove a Service. More...
 
StatusCode setDefaultCnvService (long type) override
 Set default service type. More...
 
StatusCode getService (long service_type, IConversionSvc *&refpSvc) override
 Retrieve conversion service identified by technology. More...
 
StatusCode getService (const std::string &service_type, IConversionSvc *&refpSvc) override
 Retrieve conversion service identified by technology. More...
 
: IService implementation
StatusCode initialize () override
 Initialize the service. More...
 
StatusCode finalize () override
 stop the service. More...
 
- Public Member Functions inherited from extends< Service, IConversionSvc, IPersistencySvc, IAddressCreator >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from Service
const std::stringname () const override
 Retrieve name of the service. More...
 
StatusCode configure () override
 
StatusCode initialize () override
 
StatusCode start () override
 
StatusCode stop () override
 
StatusCode finalize () override
 
StatusCode terminate () override
 
Gaudi::StateMachine::State FSMState () const override
 
Gaudi::StateMachine::State targetFSMState () const override
 
StatusCode reinitialize () override
 
StatusCode restart () override
 
StatusCode sysInitialize () override
 Initialize Service. More...
 
StatusCode sysStart () override
 Initialize Service. More...
 
StatusCode sysStop () override
 Initialize Service. More...
 
StatusCode sysFinalize () override
 Finalize Service. More...
 
StatusCode sysReinitialize () override
 Re-initialize the Service. More...
 
StatusCode sysRestart () override
 Re-initialize the Service. More...
 
 Service (std::string name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const override
 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<typename IFace = IService>
SmartIF< IFace > service (const std::string &name, 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 >
StatusCode declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
 Declare used tool. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
 Helper to wrap a regular data member and use it as a regular property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation. More...
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p) override
 set the property form another property More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const std::string &n, const std::string &v) override
 set the property from name and the value More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (const std::string &name) const override
 get the property by name More...
 
StatusCode getProperty (const std::string &n, std::string &v) const override
 convert the property to the string More...
 
const std::vector< Gaudi::Details::PropertyBase * > & getProperties () const override
 get all properties More...
 
bool hasProperty (const std::string &name) const override
 Return true if we have a property with the given name. More...
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
MSG::Level outputLevel () const
 Backward compatibility function for getting the output level. More...
 
- Public Member Functions inherited from CommonMessagingBase
virtual ~CommonMessagingBase ()=default
 Virtual destructor. More...
 
const 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...
 

Protected Types

typedef std::map< long, ServiceEntryServices
 

Protected Member Functions

: Object implementation
SmartIF< IConversionSvc > & service (const std::string &nam)
 Retrieve conversion service by name. More...
 
SmartIF< IConversionSvc > & service (long service_type)
 Retrieve conversion service from list. More...
 
SmartIF< IAddressCreator > & addressCreator (long service_type)
 Retrieve address creator from list. More...
 
void encodeAddrHdr (long service_type, const CLID &clid, std::string &address) const
 Retrieve string from storage type and clid. More...
 
void decodeAddrHdr (const std::string &address, long &service_type, CLID &clid, std::string &address_trailer) const
 Retrieve storage type and clid from address header of string. More...
 
StatusCode makeCall (int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
 Implementation helper. More...
 
bool enable (bool value)
 Set enabled flag. More...
 
- Protected Member Functions inherited from Service
 ~Service () override
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBaseproperty (const std::string &name) const
 
- Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Protected Attributes

long m_cnvDefType = TEST_StorageType
 Default service type. More...
 
SmartIF< IDataProviderSvcm_dataSvc
 Pointer to datma provider service. More...
 
Services m_cnvServices
 List of convermsion workers. More...
 
SmartIF< IConversionSvcm_cnvDefault
 Default output service. More...
 
Gaudi::Property< std::vector< std::string > > m_svcNames
 
bool m_enable = true
 Flag to indicate that the service is enabled. More...
 
SmartIF< IAddressCreatorm_addrCreator
 Pointer to the IAddressCreator interface of this, for addressCreator(). More...
 
- Protected Attributes inherited from Service
Gaudi::StateMachine::State m_state = Gaudi::StateMachine::OFFLINE
 Service state. More...
 
Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::OFFLINE
 Service state. More...
 
Gaudi::Property< int > m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
 
Gaudi::Property< bool > m_auditInit {this, "AuditServices", false, " unused"}
 
Gaudi::Property< bool > m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
 
Gaudi::Property< bool > m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
 
Gaudi::Property< bool > m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
 
Gaudi::Property< bool > m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
 
Gaudi::Property< bool > m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
 
Gaudi::Property< bool > m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
 
SmartIF< IAuditorSvcm_pAuditorSvc
 Auditor Service. More...
 

Additional Inherited Members

- Public Types inherited from extends< Service, IConversionSvc, IPersistencySvc, IAddressCreator >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces... >
 Typedef to the base of this class. More...
 
- Public Types inherited from Service
using Factory = Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)>
 
- Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 Typedef used to refer to this class from derived classes, as in. More...
 
- Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using base_class = CommonMessaging
 
- Public Types inherited from extend_interfaces< Interfaces... >
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
 take union of the ext_iids of all Interfaces... More...
 

Detailed Description

PersistencySvc class implementation definition.

System: The LHCb Offline System

Package: PersistencySvc

Dependencies:

  • STL: <vector>, <algorithm>, <functional>
  • Generic service definition: "Kernel/Service.h"
  • IConversionSvc definition: "Kernel/IConversionSvc.h"
  • PersistencySvc definition: "Kernel/Interfaces/IPersistencySvc.h"

History:

 +---------+----------------------------------------------+---------+
 |    Date |                 Comment                      | Who     |
 +---------+----------------------------------------------+---------+
 | 3/11/98 | Initial version                              | M.Frank |
 +---------+----------------------------------------------+---------+
 
Author
Markus Frank
Version
1.0

Definition at line 60 of file PersistencySvc.h.

Member Typedef Documentation

◆ Services

Definition at line 87 of file PersistencySvc.h.

Member Function Documentation

◆ addCnvService()

StatusCode PersistencySvc::addCnvService ( IConversionSvc service)
override

Add a new Service.

Add data service.

Definition at line 245 of file PersistencySvc.cpp.

245  {
246  if ( !servc ) return Status::BAD_STORAGE_TYPE;
247  long type = servc->repSvcType();
248  long def_typ = ( m_cnvDefault ? m_cnvDefault->repSvcType() : 0 );
249  auto it = m_cnvServices.find( type );
250  auto cnv_svc = ( it != m_cnvServices.end() ? it->second.conversionSvc() : nullptr );
251  if ( type == def_typ ) m_cnvDefault = servc;
252  if ( cnv_svc == servc ) return StatusCode::SUCCESS;
253 
254  auto iservc = make_SmartIF( servc );
255  auto icr = iservc.as<IAddressCreator>();
256  if ( icr ) {
257  auto isvc = iservc.as<IService>();
258  if ( isvc ) {
259  if ( cnv_svc ) removeCnvService( type ).ignore();
260  auto p = m_cnvServices.emplace( type, ServiceEntry( type, isvc, iservc, icr ) );
261  if ( !p.second ) {
262  info() << "Cannot add Conversion service of type " << isvc->name() << endmsg;
263  return StatusCode::FAILURE;
264  }
265  info() << "Added successfully Conversion service:" << isvc->name() << endmsg;
266  iservc->setAddressCreator( this ).ignore();
267  iservc->setDataProvider( m_dataSvc ).ignore();
268  return StatusCode::SUCCESS;
269  }
270  }
271  info() << "Cannot add Conversion service of type " << type << endmsg;
272  return StatusCode::FAILURE;
273 }
IAddressCreator interface definition.
constexpr static const auto SUCCESS
Definition: StatusCode.h:96
T end(T... args)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
virtual long repSvcType() const =0
Retrieve the class type of the data store the converter uses.
General service interface definition.
Definition: IService.h:28
SmartIF< IConversionSvc > m_cnvDefault
Default output service.
StatusCode removeCnvService(long type) override
Remove a Service.
T find(T... args)
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:164
SmartIF< IConversionSvc > & conversionSvc() const
Services m_cnvServices
List of convermsion workers.
T emplace(T... args)
constexpr static const auto FAILURE
Definition: StatusCode.h:97
SmartIF< IFace > make_SmartIF(IFace *iface)
Definition: SmartIF.h:150
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to datma provider service.

◆ addConverter() [1/2]

StatusCode PersistencySvc::addConverter ( IConverter pConverter)
override

Add converter object to conversion service.

Definition at line 193 of file PersistencySvc.cpp.

193  {
194  if ( !pConverter ) return Status::NO_CONVERTER;
195  IConversionSvc* svc = service( pConverter->repSvcType() );
196  return svc ? svc->addConverter( pConverter ) : Status::BAD_STORAGE_TYPE;
197 }
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
virtual StatusCode addConverter(IConverter *pConverter)=0
Add converter object to conversion service.
virtual long repSvcType() const =0
Retrieve the class type of the data store the converter uses.

◆ addConverter() [2/2]

StatusCode PersistencySvc::addConverter ( const CLID clid)
override

Add converter object to conversion service.

Definition at line 190 of file PersistencySvc.cpp.

190 { return StatusCode::FAILURE; }
constexpr static const auto FAILURE
Definition: StatusCode.h:97

◆ addressCreator() [1/2]

SmartIF< IAddressCreator > & PersistencySvc::addressCreator ( ) const
override

Retrieve address creator facility.

Definition at line 414 of file PersistencySvc.cpp.

414 { return m_addrCreator; }
SmartIF< IAddressCreator > m_addrCreator
Pointer to the IAddressCreator interface of this, for addressCreator().

◆ addressCreator() [2/2]

SmartIF< IAddressCreator > & PersistencySvc::addressCreator ( long  service_type)
protected

Retrieve address creator from list.

Retrieve address creator service from list.

Definition at line 155 of file PersistencySvc.cpp.

155  {
156  long typ = type;
157  auto it = m_cnvServices.find( typ );
158  if ( it == m_cnvServices.end() ) {
160  if ( s ) {
161  it = m_cnvServices.find( typ );
162  if ( it != m_cnvServices.end() ) return it->second.addrCreator();
163  }
164  static SmartIF<IAddressCreator> no_creator;
165  return no_creator;
166  }
167  return it->second.addrCreator();
168 }
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
SmartIF< IAddressCreator > & addrCreator() const
T end(T... args)
T find(T... args)
Services m_cnvServices
List of convermsion workers.
string s
Definition: gaudirun.py:328

◆ commitOutput()

StatusCode PersistencySvc::commitOutput ( const std::string output,
bool  do_commit 
)
override

Commit pending output.

Definition at line 303 of file PersistencySvc.cpp.

303 { return StatusCode::SUCCESS; }
constexpr static const auto SUCCESS
Definition: StatusCode.h:96

◆ connectOutput() [1/2]

StatusCode PersistencySvc::connectOutput ( const std::string outputFile,
const std::string openMode 
)
override

Connect the output file to the service with open mode.

Definition at line 295 of file PersistencySvc.cpp.

295  {
296  return connectOutput( outputFile );
297 }
StatusCode connectOutput(const std::string &outputFile, const std::string &openMode) override
Connect the output file to the service with open mode.

◆ connectOutput() [2/2]

StatusCode PersistencySvc::connectOutput ( const std::string outputFile)
override

Connect the output file to the service.

Definition at line 300 of file PersistencySvc.cpp.

300 { return StatusCode::SUCCESS; }
constexpr static const auto SUCCESS
Definition: StatusCode.h:96

◆ conversionSvc()

SmartIF< IConversionSvc > & PersistencySvc::conversionSvc ( ) const
override

Get conversion service the converter is connected to.

Definition at line 187 of file PersistencySvc.cpp.

187 { return m_cnvDefault; }
SmartIF< IConversionSvc > m_cnvDefault
Default output service.

◆ convertAddress()

StatusCode PersistencySvc::convertAddress ( const IOpaqueAddress pAddress,
std::string refAddress 
)
override

Convert an address to string form.

Definition at line 314 of file PersistencySvc.cpp.

314  {
315  // Assumuption is that the Persistency service prepends a header
316  // and requests the conversion service refered to by the service
317  // type to encode the rest
318  long svc_type = 0;
319  CLID clid = 0;
320  if ( pAddress ) {
321  svc_type = pAddress->svcType();
322  clid = pAddress->clID();
323  }
324  IAddressCreator* svc = addressCreator( svc_type );
325  StatusCode status = Status::BAD_STORAGE_TYPE; // Preset error
326  refAddress.clear();
327 
328  if ( svc ) {
329  // Found service, set header
330  encodeAddrHdr( svc_type, clid, refAddress );
331  std::string address;
332  // Get rest of address from conversion service
333  status = svc->convertAddress( pAddress, address );
334  refAddress += address;
335  }
336  return status;
337 }
SmartIF< IAddressCreator > & addressCreator() const override
Retrieve address creator facility.
IAddressCreator interface definition.
virtual long svcType() const =0
Retrieve service type.
STL class.
virtual const CLID & clID() const =0
Retrieve class information from link.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
void encodeAddrHdr(long service_type, const CLID &clid, std::string &address) const
Retrieve string from storage type and clid.
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
T clear(T... args)
virtual StatusCode convertAddress(const IOpaqueAddress *pAddress, std::string &refAddress)=0
Convert an address to string form.

◆ converter()

IConverter * PersistencySvc::converter ( const CLID clid)
override

Retrieve converter from list.

Definition at line 211 of file PersistencySvc.cpp.

211 { return nullptr; }

◆ createAddress() [1/2]

StatusCode PersistencySvc::createAddress ( long  svc_type,
const CLID clid,
const std::string pars,
const unsigned long *  ipars,
IOpaqueAddress *&  refpAddress 
)
override

Create a Generic address using explicit arguments to identify a single object.

Definition at line 306 of file PersistencySvc.cpp.

307  {
308  refpAddress = nullptr;
309  IAddressCreator* svc = addressCreator( svc_type );
310  return svc ? svc->createAddress( svc_type, clid, pars, ipars, refpAddress ) : Status::BAD_STORAGE_TYPE;
311 }
SmartIF< IAddressCreator > & addressCreator() const override
Retrieve address creator facility.
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ipar, IOpaqueAddress *&refpAddress)=0
Create a Generic address using explicit arguments to identify a single object.
IAddressCreator interface definition.

◆ createAddress() [2/2]

StatusCode PersistencySvc::createAddress ( long  svc_type,
const CLID clid,
const std::string refAddress,
IOpaqueAddress *&  refpAddress 
)
override

Convert an address in string form to object form.

Definition at line 340 of file PersistencySvc.cpp.

341  {
342  // Assumption is that the Persistency service decodes that header
343  // and requests the conversion service referred to by the service
344  // type to decode the rest
345  long new_svc_type = 0;
346  CLID new_clid = 0;
347  std::string address_trailer;
348  decodeAddrHdr( refAddress, new_svc_type, new_clid, address_trailer );
349  IAddressCreator* svc = addressCreator( new_svc_type );
350  return svc ? svc->createAddress( new_svc_type, new_clid, address_trailer, refpAddress ) : Status::BAD_STORAGE_TYPE;
351 }
SmartIF< IAddressCreator > & addressCreator() const override
Retrieve address creator facility.
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ipar, IOpaqueAddress *&refpAddress)=0
Create a Generic address using explicit arguments to identify a single object.
IAddressCreator interface definition.
STL class.
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
void decodeAddrHdr(const std::string &address, long &service_type, CLID &clid, std::string &address_trailer) const
Retrieve storage type and clid from address header of string.

◆ createObj()

StatusCode PersistencySvc::createObj ( IOpaqueAddress pAddress,
DataObject *&  refpObject 
)
override

Implementation of IConverter: Create the transient representation of an object.

Create the transient representation of an object.

Definition at line 115 of file PersistencySvc.cpp.

115  {
116  return makeCall( CREATE_OBJ, pAddr, refpObj );
117 }
StatusCode makeCall(int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
Implementation helper.

◆ createRep()

StatusCode PersistencySvc::createRep ( DataObject pObject,
IOpaqueAddress *&  refpAddress 
)
override

Implementation of IConverter: Convert the transient object to the requested representation.

Convert the transient object to the requested representation.

Definition at line 135 of file PersistencySvc.cpp.

135  {
136  return makeCall( CREATE_REP, refpAddr, pObj );
137 }
StatusCode makeCall(int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
Implementation helper.

◆ dataProvider()

SmartIF< IDataProviderSvc > & PersistencySvc::dataProvider ( ) const
override

Access reference to transient datastore.

Access the dataprovider service.

Definition at line 178 of file PersistencySvc.cpp.

178 { return m_dataSvc; }
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to datma provider service.

◆ decodeAddrHdr()

void PersistencySvc::decodeAddrHdr ( const std::string address,
long &  service_type,
CLID clid,
std::string address_trailer 
) const
protected

Retrieve storage type and clid from address header of string.

Definition at line 364 of file PersistencySvc.cpp.

365  {
366  // For address header, use xml-style format of
367  // <address_header service_type="xxx" clid="yyy" />
368  service_type = 0;
369  clid = 0;
370  address_trailer.clear();
371 
372  // Check for address_header tag
373  size_t pos = address.find( "<address_header" );
374  if ( std::string::npos != pos ) {
375  // Get service_type
376  pos = address.find( "service_type=\"" );
377  if ( std::string::npos != pos ) {
378  pos += 14;
379  size_t end = address.find( '"', pos );
380  if ( std::string::npos != end ) {
381  service_type = std::stol( address.substr( pos, end - pos ) );
382  // Get clid
383  pos = address.find( "clid=\"" );
384  if ( std::string::npos != pos ) {
385  pos += 6;
386  end = address.find( '\"', pos );
387  if ( std::string::npos != end ) {
388  std::istringstream str;
389  str.str( address.substr( pos, end - pos ) );
390  str >> clid;
391  // Get trailer_address
392  pos = address.find( '>' );
393  if ( pos < ( address.size() - 2 ) ) { // this means that '>' was found (pos != npos)
394  // it is before the last char
395  address_trailer = address.substr( pos + 1 );
396  }
397  }
398  }
399  }
400  }
401  }
402 }
T str(T... args)
def end
Definition: IOTest.py:123
T clear(T... args)
T find(T... args)
T size(T... args)
T substr(T... args)
T stol(T... args)

◆ enable()

bool PersistencySvc::enable ( bool  value)
protected

Set enabled flag.

Definition at line 517 of file PersistencySvc.cpp.

517  {
518  std::swap( value, m_enable );
519  return value;
520 }
T swap(T... args)
bool m_enable
Flag to indicate that the service is enabled.

◆ encodeAddrHdr()

void PersistencySvc::encodeAddrHdr ( long  service_type,
const CLID clid,
std::string address 
) const
protected

Retrieve string from storage type and clid.

Definition at line 354 of file PersistencySvc.cpp.

354  {
355  // For address header, use xml-style format of
356  // <addrhdr service_type="xxx" clid="yyy" />
357  std::stringstream stream;
358  int svctyp = service_type; // must put int into stream, not char
359  stream << "<address_header service_type=\"" << svctyp << "\" clid=\"" << clid << "\" /> ";
360  address = stream.str();
361 }
T str(T... args)

◆ fillObjRefs()

StatusCode PersistencySvc::fillObjRefs ( IOpaqueAddress pAddress,
DataObject pObject 
)
override

Implementation of IConverter: Resolve the references of the created transient object.

Resolve the references of the created transient object.

Definition at line 120 of file PersistencySvc.cpp.

120  {
121  return makeCall( FILL_OBJ_REFS, pAddr, pObj );
122 }
StatusCode makeCall(int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
Implementation helper.

◆ fillRepRefs()

StatusCode PersistencySvc::fillRepRefs ( IOpaqueAddress pAddress,
DataObject pObject 
)
override

Implementation of IConverter: Resolve the references of the converted object.

Resolve the references of the converted object.

Definition at line 140 of file PersistencySvc.cpp.

140  {
141  return makeCall( FILL_REP_REFS, pAddr, pObj );
142 }
StatusCode makeCall(int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
Implementation helper.

◆ finalize()

StatusCode PersistencySvc::finalize ( )
override

stop the service.

Definition at line 508 of file PersistencySvc.cpp.

508  {
509  // Release all workers
511  // Release references to this to avoid loops
512  m_addrCreator = nullptr;
513  return StatusCode::SUCCESS;
514 }
SmartIF< IAddressCreator > m_addrCreator
Pointer to the IAddressCreator interface of this, for addressCreator().
constexpr static const auto SUCCESS
Definition: StatusCode.h:96
T clear(T... args)
Services m_cnvServices
List of convermsion workers.

◆ getService() [1/2]

StatusCode PersistencySvc::getService ( long  service_type,
IConversionSvc *&  refpSvc 
)
override

Retrieve conversion service identified by technology.

Definition at line 417 of file PersistencySvc.cpp.

417  {
418  refpSvc = service( service_type );
419  return refpSvc ? StatusCode::SUCCESS : StatusCode::FAILURE;
420 }
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
constexpr static const auto SUCCESS
Definition: StatusCode.h:96
constexpr static const auto FAILURE
Definition: StatusCode.h:97

◆ getService() [2/2]

StatusCode PersistencySvc::getService ( const std::string service_type,
IConversionSvc *&  refpSvc 
)
override

Retrieve conversion service identified by technology.

Definition at line 423 of file PersistencySvc.cpp.

423  {
424  const char* imp = service_type.c_str();
425  long len = service_type.length();
426  if ( ::strncasecmp( imp, "SICB", len ) == 0 )
427  return getService( SICB_StorageType, refpSvc );
428  else if ( ::strncasecmp( imp, "ZEBRA", len ) == 0 )
429  return getService( SICB_StorageType, refpSvc );
430  else if ( ::strncasecmp( imp, "MS Access", len ) == 0 )
431  return getService( ACCESS_StorageType, refpSvc );
432  else if ( ::strncasecmp( imp, "Microsoft Access", strlen( "Microsoft Access" ) ) == 0 )
433  return getService( ACCESS_StorageType, refpSvc );
434  else if ( ::strncasecmp( imp, "SQL Server", len ) == 0 )
435  return getService( SQLSERVER_StorageType, refpSvc );
436  else if ( ::strncasecmp( imp, "Microsoft ODBC for Oracle", len ) == 0 )
437  return getService( ORACLE_StorageType, refpSvc );
438  else if ( ::strncasecmp( imp, "Oracle ODBC", strlen( "Oracle ODBC" ) ) == 0 )
439  return getService( ORACLE_StorageType, refpSvc );
440  else if ( ::strncasecmp( imp, "Oracle OCI", strlen( "Oracle OCI" ) ) == 0 )
441  return getService( ORACLE_StorageType, refpSvc );
442  else if ( ::strncasecmp( imp, "MySQL", len ) == 0 )
443  return getService( MYSQL_StorageType, refpSvc );
444  else if ( ::strncasecmp( imp, "ROOT", len ) == 0 )
445  return getService( ROOT_StorageType, refpSvc );
446  else if ( ::strncasecmp( imp, "OBJY", len ) == 0 )
447  return getService( OBJY_StorageType, refpSvc );
448  else if ( ::strncasecmp( imp, "OBJYECTI", 7 ) == 0 )
449  return getService( OBJY_StorageType, refpSvc );
450  else if ( ::strncasecmp( imp, "POOL_ROOTKEY", 12 ) == 0 )
451  return getService( POOL_ROOTKEY_StorageType, refpSvc );
452  else if ( ::strncasecmp( imp, "POOL_ROOTTREE", 12 ) == 0 )
453  return getService( POOL_ROOTTREE_StorageType, refpSvc );
454  else if ( ::strncasecmp( imp, "POOL_ROOT", 9 ) == 0 )
455  return getService( POOL_ROOT_StorageType, refpSvc );
456  else if ( ::strncasecmp( imp, "POOL_MySQL", 8 ) == 0 )
457  return getService( POOL_MYSQL_StorageType, refpSvc );
458  else if ( ::strncasecmp( imp, "POOL_ORACLE", 8 ) == 0 )
459  return getService( POOL_ORACLE_StorageType, refpSvc );
460  else if ( ::strncasecmp( imp, "POOL_ACCESS", 8 ) == 0 )
461  return getService( POOL_ACCESS_StorageType, refpSvc );
462  else if ( ::strncasecmp( imp, "POOL", 4 ) == 0 )
463  return getService( POOL_StorageType, refpSvc );
464 
465  for ( const auto& i : m_cnvServices ) {
466  SmartIF<IService> svc( i.second.conversionSvc() );
467  if ( svc ) {
468  // Check wether this is already an active service: first check by service name
469  if ( svc->name() == service_type ) {
470  refpSvc = i.second.conversionSvc();
471  return StatusCode::SUCCESS;
472  }
473  // Check wether this is already an active service: now check by service type
474  auto instance = svc.get();
475  if ( System::typeinfoName( typeid( *instance ) ) == service_type ) {
476  refpSvc = i.second.conversionSvc();
477  return StatusCode::SUCCESS;
478  }
479  }
480  }
481  // if not, check if the service is in the list and may be requested
482  for ( const auto& i : m_svcNames.value() ) {
484  if ( itm.name() == service_type || itm.type() == service_type ) {
485  IConversionSvc* svc = service( i );
486  if ( svc ) {
487  refpSvc = svc;
488  return StatusCode::SUCCESS;
489  }
490  }
491  }
492  return StatusCode::FAILURE;
493 }
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:308
Gaudi::Property< std::vector< std::string > > m_svcNames
const long ACCESS_StorageType
Definition: ClassID.h:70
constexpr static const auto SUCCESS
Definition: StatusCode.h:96
virtual SmartIF< IConversionSvc > & conversionSvc() const =0
Get conversion service the converter is connected to.
const long MYSQL_StorageType
Definition: ClassID.h:74
const long POOL_MYSQL_StorageType
Definition: ClassID.h:82
const long POOL_ROOTKEY_StorageType
Definition: ClassID.h:79
const long POOL_ACCESS_StorageType
Definition: ClassID.h:81
Helper class to parse a string of format "type/name".
T strlen(T... args)
StatusCode getService(long service_type, IConversionSvc *&refpSvc) override
Retrieve conversion service identified by technology.
const long POOL_ORACLE_StorageType
Definition: ClassID.h:83
const long ROOT_StorageType
Definition: ClassID.h:62
const long ORACLE_StorageType
Definition: ClassID.h:75
const long POOL_ROOT_StorageType
Definition: ClassID.h:78
const long POOL_StorageType
Definition: ClassID.h:77
T length(T... args)
const long POOL_ROOTTREE_StorageType
Definition: ClassID.h:80
T c_str(T... args)
Services m_cnvServices
List of convermsion workers.
constexpr static const auto FAILURE
Definition: StatusCode.h:97
const long SQLSERVER_StorageType
Definition: ClassID.h:73
const long OBJY_StorageType
Definition: ClassID.h:63
const long SICB_StorageType
Definition: ClassID.h:61

◆ initialize()

StatusCode PersistencySvc::initialize ( )
override

Initialize the service.

Definition at line 499 of file PersistencySvc.cpp.

499  {
500  m_addrCreator = this; // initialize internal pointer to IAddressCreator interface
501  // Initialize basic service
502  StatusCode status = Service::initialize();
503  if ( UNLIKELY( !status.isSuccess() ) ) { error() << "Error initializing Service base class." << endmsg; }
504  return status;
505 }
SmartIF< IAddressCreator > m_addrCreator
Pointer to the IAddressCreator interface of this, for addressCreator().
#define UNLIKELY(x)
Definition: Kernel.h:106
StatusCode initialize() override
Definition: Service.cpp:70
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
bool isSuccess() const
Definition: StatusCode.h:361
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202

◆ makeCall()

StatusCode PersistencySvc::makeCall ( int  typ,
IOpaqueAddress *&  pAddress,
DataObject *&  pObject 
)
protected

Implementation helper.

Definition at line 60 of file PersistencySvc.cpp.

60  {
61  if ( m_enable ) {
62  IConversionSvc* svc = nullptr;
63  switch ( typ ) {
64  case CREATE_REP:
65  case FILL_REP_REFS:
66  case UPDATE_REP:
67  case UPDATE_REP_REFS:
68  svc = m_cnvDefault;
69  break;
70  default:
71  if ( !pAddress ) return Status::INVALID_ADDRESS;
72  svc = service( pAddress->svcType() );
73  if ( !svc ) return Status::BAD_STORAGE_TYPE;
74  break;
75  }
76 
77  StatusCode status( StatusCode::FAILURE, true );
78  switch ( typ ) {
79  case CREATE_OBJ:
80  pObject = nullptr;
81  status = svc->createObj( pAddress, pObject );
82  break;
83  case FILL_OBJ_REFS:
84  status = svc->fillObjRefs( pAddress, pObject );
85  break;
86  case UPDATE_OBJ:
87  status = svc->updateObj( pAddress, pObject );
88  break;
89  case UPDATE_OBJ_REFS:
90  status = svc->updateObjRefs( pAddress, pObject );
91  break;
92  case CREATE_REP:
93  status = svc->createRep( pObject, pAddress );
94  break;
95  case FILL_REP_REFS:
96  status = svc->fillRepRefs( pAddress, pObject );
97  break;
98  case UPDATE_REP:
99  status = svc->updateRep( pAddress, pObject );
100  break;
101  case UPDATE_REP_REFS:
102  status = svc->updateRepRefs( pAddress, pObject );
103  break;
104  default:
105  status = StatusCode::FAILURE;
106  break;
107  }
108  status.ignore();
109  return status;
110  }
111  return StatusCode::SUCCESS;
112 }
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject)=0
Create the transient representation of an object.
bool m_enable
Flag to indicate that the service is enabled.
constexpr static const auto SUCCESS
Definition: StatusCode.h:96
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)=0
Convert the transient object to the requested representation.
virtual long svcType() const =0
Retrieve service type.
virtual StatusCode updateRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the references of an already converted object.
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:61
virtual StatusCode updateObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the references of an updated transient object.
SmartIF< IConversionSvc > m_cnvDefault
Default output service.
virtual StatusCode updateRep(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the converted representation of a transient object.
virtual StatusCode fillObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the created transient object.
constexpr static const auto FAILURE
Definition: StatusCode.h:97
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the converted object.

◆ objType()

const CLID & PersistencySvc::objType ( ) const
override

Retrieve the class type of objects the converter produces. (DUMMY)

Retrieve the class type of objects the converter produces.

Definition at line 496 of file PersistencySvc.cpp.

496 { return CLID_NULL; }

◆ removeCnvService()

StatusCode PersistencySvc::removeCnvService ( long  type)
override

Remove a Service.

Remove conversion service.

Definition at line 276 of file PersistencySvc.cpp.

276  {
277  auto it = m_cnvServices.find( svctype );
278  if ( it == m_cnvServices.end() ) return Status::BAD_STORAGE_TYPE;
279  it->second.service()->release();
280  it->second.addrCreator()->release();
281  m_cnvServices.erase( it );
282  return StatusCode::SUCCESS;
283 }
constexpr static const auto SUCCESS
Definition: StatusCode.h:96
T end(T... args)
T erase(T... args)
T find(T... args)
Services m_cnvServices
List of convermsion workers.
SmartIF< IService > & service() const

◆ removeConverter()

StatusCode PersistencySvc::removeConverter ( const CLID clid)
override

Remove converter object from conversion service (if present).

Definition at line 200 of file PersistencySvc.cpp.

200  {
201  // Remove converter type from all services
202  StatusCode status = Status::NO_CONVERTER, iret = StatusCode::SUCCESS;
203  for ( auto& i : m_cnvServices ) {
204  iret = i.second.conversionSvc()->removeConverter( clid );
205  if ( iret.isSuccess() ) status = iret;
206  }
207  return status;
208 }
constexpr static const auto SUCCESS
Definition: StatusCode.h:96
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
Services m_cnvServices
List of convermsion workers.

◆ repSvcType()

long PersistencySvc::repSvcType ( ) const
override

Return default service type.

Retrieve the class type of the data store the converter uses.

Definition at line 286 of file PersistencySvc.cpp.

286 { return m_cnvDefault ? m_cnvDefault->repSvcType() : 0; }
virtual long repSvcType() const =0
Retrieve the class type of the data store the converter uses.
SmartIF< IConversionSvc > m_cnvDefault
Default output service.

◆ service() [1/2]

SmartIF< IConversionSvc > & PersistencySvc::service ( const std::string nam)
protected

Retrieve conversion service by name.

Definition at line 214 of file PersistencySvc.cpp.

214  {
217  [&]( Services::const_reference i ) { return i.second.service()->name() == tn.name(); } );
218  if ( it != m_cnvServices.end() ) return it->second.conversionSvc();
219 
220  auto svc = Service::service<IConversionSvc>( nam, true );
221  if ( svc && addCnvService( svc.get() ).isSuccess() ) {
222  return service( nam ); // now it is in the list
223  }
224 
225  info() << "Cannot access Conversion service:" << nam << endmsg;
226  static SmartIF<IConversionSvc> no_svc;
227  return no_svc;
228 }
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
T end(T... args)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Helper class to parse a string of format "type/name".
StatusCode addCnvService(IConversionSvc *service) override
Add a new Service.
T find_if(T... args)
T begin(T... args)
Services m_cnvServices
List of convermsion workers.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
SmartIF< IService > & service() const

◆ service() [2/2]

SmartIF< IConversionSvc > & PersistencySvc::service ( long  service_type)
protected

Retrieve conversion service from list.

Definition at line 231 of file PersistencySvc.cpp.

231  {
232  // Check wether this is already an active service
233  auto it = m_cnvServices.find( type );
234  if ( it != m_cnvServices.end() ) return it->second.conversionSvc();
235  // if not, check if the service is in the list and may be requested
236  for ( const auto& i : m_svcNames.value() ) {
237  auto& svc = service( i );
238  if ( svc && svc->repSvcType() == type ) return svc;
239  }
240  static SmartIF<IConversionSvc> no_svc;
241  return no_svc;
242 }
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
Gaudi::Property< std::vector< std::string > > m_svcNames
T end(T... args)
T find(T... args)
SmartIF< IConversionSvc > & conversionSvc() const
Services m_cnvServices
List of convermsion workers.

◆ setAddressCreator()

StatusCode PersistencySvc::setAddressCreator ( IAddressCreator creator)
override

Set address creator facility.

Definition at line 405 of file PersistencySvc.cpp.

405  {
406  // The persistency service is a address creation dispatcher istelf.
407  // The persistency service can NEVER create addresses itself.
408  // The entry point must only be provided in order to fulfill the needs of the
409  // implementing interfaces.
410  return StatusCode::FAILURE;
411 }
constexpr static const auto FAILURE
Definition: StatusCode.h:97

◆ setConversionSvc()

StatusCode PersistencySvc::setConversionSvc ( IConversionSvc svc)
override

Set conversion service the converter is connected to.

Definition at line 181 of file PersistencySvc.cpp.

181  {
182  m_cnvDefault = svc;
183  return StatusCode( StatusCode::SUCCESS, true );
184 }
constexpr static const auto SUCCESS
Definition: StatusCode.h:96
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
SmartIF< IConversionSvc > m_cnvDefault
Default output service.

◆ setDataProvider()

StatusCode PersistencySvc::setDataProvider ( IDataProviderSvc pStore)
override

Define transient datastore.

Define transient data store.

Definition at line 171 of file PersistencySvc.cpp.

171  {
172  m_dataSvc = pDataSvc;
173  for ( auto& i : m_cnvServices ) { i.second.conversionSvc()->setDataProvider( m_dataSvc ).ignore(); }
174  return StatusCode( StatusCode::SUCCESS, true );
175 }
constexpr static const auto SUCCESS
Definition: StatusCode.h:96
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
Services m_cnvServices
List of convermsion workers.
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to datma provider service.

◆ setDefaultCnvService()

StatusCode PersistencySvc::setDefaultCnvService ( long  type)
override

Set default service type.

Set default conversion service.

Definition at line 289 of file PersistencySvc.cpp.

289  {
291  return StatusCode::SUCCESS;
292 }
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
constexpr static const auto SUCCESS
Definition: StatusCode.h:96
SmartIF< IConversionSvc > m_cnvDefault
Default output service.

◆ updateObj()

StatusCode PersistencySvc::updateObj ( IOpaqueAddress pAddress,
DataObject refpObject 
)
override

Implementation of IConverter: Update the transient object from the other representation.

Update the transient object from the other representation.

Definition at line 125 of file PersistencySvc.cpp.

125  {
126  return makeCall( UPDATE_OBJ, pAddr, pObj );
127 }
StatusCode makeCall(int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
Implementation helper.

◆ updateObjRefs()

StatusCode PersistencySvc::updateObjRefs ( IOpaqueAddress pAddress,
DataObject pObject 
)
override

Implementation of IConverter: Update the references of an updated transient object.

Update the references of an updated transient object.

Definition at line 130 of file PersistencySvc.cpp.

130  {
131  return makeCall( UPDATE_OBJ_REFS, pAddr, pObj );
132 }
StatusCode makeCall(int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
Implementation helper.

◆ updateRep()

StatusCode PersistencySvc::updateRep ( IOpaqueAddress pAddress,
DataObject pObject 
)
override

Implementation of IConverter: Update the converted representation of a transient object.

Update the converted representation of a transient object.

Definition at line 145 of file PersistencySvc.cpp.

145  {
146  return makeCall( UPDATE_REP, pAddr, pObj );
147 }
StatusCode makeCall(int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
Implementation helper.

◆ updateRepRefs()

StatusCode PersistencySvc::updateRepRefs ( IOpaqueAddress pAddress,
DataObject pObject 
)
override

Implementation of IConverter: Update the references of an already converted object.

Update the references of an already converted object.

Definition at line 150 of file PersistencySvc.cpp.

150  {
151  return makeCall( UPDATE_REP_REFS, pAddr, pObj );
152 }
StatusCode makeCall(int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
Implementation helper.

Member Data Documentation

◆ m_addrCreator

SmartIF<IAddressCreator> PersistencySvc::m_addrCreator
mutableprotected

Pointer to the IAddressCreator interface of this, for addressCreator().

Definition at line 260 of file PersistencySvc.h.

◆ m_cnvDefault

SmartIF<IConversionSvc> PersistencySvc::m_cnvDefault
mutableprotected

Default output service.

Definition at line 245 of file PersistencySvc.h.

◆ m_cnvDefType

long PersistencySvc::m_cnvDefType = TEST_StorageType
protected

Default service type.

Definition at line 239 of file PersistencySvc.h.

◆ m_cnvServices

Services PersistencySvc::m_cnvServices
protected

List of convermsion workers.

Definition at line 243 of file PersistencySvc.h.

◆ m_dataSvc

SmartIF<IDataProviderSvc> PersistencySvc::m_dataSvc
mutableprotected

Pointer to datma provider service.

Definition at line 241 of file PersistencySvc.h.

◆ m_enable

bool PersistencySvc::m_enable = true
protected

Flag to indicate that the service is enabled.

Definition at line 257 of file PersistencySvc.h.

◆ m_svcNames

Gaudi::Property<std::vector<std::string> > PersistencySvc::m_svcNames
protected
Initial value:
{
this,
"CnvServices",
{},
[this]( auto& p ) {
if ( this->msgLevel( MSG::DEBUG ) ) this->debug() << p << endmsg;
},
"Names of services to be requested from the service locator and added by default"}

Definition at line 247 of file PersistencySvc.h.


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