The Gaudi Framework  master (37c0b60a)
PersistencySvc Class Reference

PersistencySvc class implementation definition. More...

#include </builds/gaudi/Gaudi/GaudiCommonSvc/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...
 
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 >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, bool createIf=true)
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, const std::string &toolTypeAndName, bool createIf=true)
 Declare used tool. More...
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
 
template<class T >
void addToolsArray (ToolHandleArray< T > &hndlArr)
 
const std::vector< IAlgTool * > & tools () const
 
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 std::string &name, const Gaudi::Details::PropertyBase &p) override
 set the property from another property with a different name More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p)
 Set the property from a property. More...
 
virtual StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p)=0
 Set the property from a property with a different name. More...
 
virtual StatusCode setProperty (const std::string &s)=0
 Set the property by string. More...
 
StatusCode setProperty (const std::string &name, const char *v)
 Special case for string literals. More...
 
StatusCode setProperty (const std::string &name, const std::string &v)
 Special case for std::string. More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode setPropertyRepr (const std::string &n, const std::string &r) override
 set the property from name and value string representation More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (std::string_view name) const override
 get the property by name More...
 
StatusCode getProperty (std::string_view 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 (std::string_view name) const override
 Return true if we have a property with the given name. More...
 
Gaudi::Details::PropertyBaseproperty (std::string_view name) const
 \fixme property and bindPropertiesTo should be protected More...
 
void bindPropertiesTo (Gaudi::Interfaces::IOptionsSvc &optsSvc)
 
 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...
 

Protected Types

typedef std::map< long, ServiceEntryServices
 

: Object implementation


long m_cnvDefType = TEST_StorageType
 Default service type. More...
 
SmartIF< IDataProviderSvcm_dataSvc
 Pointer to data provider service. More...
 
Services m_cnvServices
 List of conversion workers. More...
 
std::recursive_mutex m_servicesMutex
 Mutex to protect accesses to m_cnvServices. 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...
 
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...
 

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...
 
- Protected Member Functions inherited from Service
std::vector< IAlgTool * > & tools ()
 
 ~Service () override
 Standard Destructor
More...
 
int outputLevel () const
 get the Service's output level More...
 
- 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 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" }
 flag indicating whether ToolHandle tools have been added to m_tools More...
 
Gaudi::Property< bool > m_auditInit { this, "AuditServices", false, "[[deprecated]] 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()" }
 
Gaudi::Property< bool > m_autoRetrieveTools
 
Gaudi::Property< bool > m_checkToolDeps
 
SmartIF< IAuditorSvcm_pAuditorSvc
 Auditor Service
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 57 of file PersistencySvc.h.

Member Typedef Documentation

◆ Services

Definition at line 84 of file PersistencySvc.h.

Member Function Documentation

◆ addCnvService()

StatusCode PersistencySvc::addCnvService ( IConversionSvc service)
override

Add a new Service.

Add data service.

Definition at line 229 of file PersistencySvc.cpp.

229  {
230  std::scoped_lock _{ m_servicesMutex };
231  if ( !servc ) return Status::BAD_STORAGE_TYPE;
232  long type = servc->repSvcType();
233  long def_typ = ( m_cnvDefault ? m_cnvDefault->repSvcType() : 0 );
234  auto it = m_cnvServices.find( type );
235  auto cnv_svc = ( it != m_cnvServices.end() ? it->second.conversionSvc() : nullptr );
236  if ( type == def_typ ) m_cnvDefault = servc;
237  if ( cnv_svc == servc ) return StatusCode::SUCCESS;
238 
239  auto iservc = make_SmartIF( servc );
240  auto icr = iservc.as<IAddressCreator>();
241  if ( icr ) {
242  auto isvc = iservc.as<IService>();
243  if ( isvc ) {
244  if ( cnv_svc ) removeCnvService( type ).ignore();
245  auto p = m_cnvServices.emplace( type, ServiceEntry( type, isvc, iservc, icr ) );
246  if ( !p.second ) {
247  error() << "Cannot add Conversion service " << isvc->name() << endmsg;
248  return StatusCode::FAILURE;
249  }
250  info() << "Added successfully Conversion service " << isvc->name() << endmsg;
251  iservc->setAddressCreator( this ).ignore();
252  iservc->setDataProvider( m_dataSvc ).ignore();
253  return StatusCode::SUCCESS;
254  }
255  }
256  error() << "Cannot add Conversion service for type " << type << endmsg;
257  return StatusCode::FAILURE;
258 }

◆ addConverter() [1/2]

StatusCode PersistencySvc::addConverter ( const CLID clid)
override

Add converter object to conversion service.

Definition at line 169 of file PersistencySvc.cpp.

169 { return StatusCode::FAILURE; }

◆ addConverter() [2/2]

StatusCode PersistencySvc::addConverter ( IConverter pConverter)
override

Add converter object to conversion service.

Definition at line 172 of file PersistencySvc.cpp.

172  {
173  if ( !pConverter ) return Status::NO_CONVERTER;
174  IConversionSvc* svc = service( pConverter->repSvcType() );
175  return svc ? svc->addConverter( pConverter ) : Status::BAD_STORAGE_TYPE;
176 }

◆ addressCreator() [1/2]

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

Retrieve address creator facility.

Definition at line 401 of file PersistencySvc.cpp.

401 { return m_addrCreator; }

◆ 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 131 of file PersistencySvc.cpp.

131  {
132  std::scoped_lock _{ m_servicesMutex };
133 
134  long typ = type;
135  auto it = m_cnvServices.find( typ );
136  if ( it == m_cnvServices.end() ) {
138  if ( s ) {
139  it = m_cnvServices.find( typ );
140  if ( it != m_cnvServices.end() ) return it->second.addrCreator();
141  }
142  static SmartIF<IAddressCreator> no_creator;
143  return no_creator;
144  }
145  return it->second.addrCreator();
146 }

◆ commitOutput()

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

Commit pending output.

Definition at line 290 of file PersistencySvc.cpp.

290 { return StatusCode::SUCCESS; }

◆ connectOutput() [1/2]

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

Connect the output file to the service.

Definition at line 287 of file PersistencySvc.cpp.

287 { return StatusCode::SUCCESS; }

◆ connectOutput() [2/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 282 of file PersistencySvc.cpp.

282  {
283  return connectOutput( outputFile );
284 }

◆ conversionSvc()

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

Get conversion service the converter is connected to.

Definition at line 166 of file PersistencySvc.cpp.

166 { return m_cnvDefault; }

◆ convertAddress()

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

Convert an address to string form.

Definition at line 301 of file PersistencySvc.cpp.

301  {
302  // Assumption is that the Persistency service prepends a header
303  // and requests the conversion service referred to by the service
304  // type to encode the rest
305  long svc_type = 0;
306  CLID clid = 0;
307  if ( pAddress ) {
308  svc_type = pAddress->svcType();
309  clid = pAddress->clID();
310  }
311  IAddressCreator* svc = addressCreator( svc_type );
312  StatusCode status = Status::BAD_STORAGE_TYPE; // Preset error
313  refAddress.clear();
314 
315  if ( svc ) {
316  // Found service, set header
317  encodeAddrHdr( svc_type, clid, refAddress );
318  std::string address;
319  // Get rest of address from conversion service
320  status = svc->convertAddress( pAddress, address );
321  refAddress += address;
322  }
323  return status;
324 }

◆ converter()

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

Retrieve converter from list.

Definition at line 191 of file PersistencySvc.cpp.

191 { return nullptr; }

◆ createAddress() [1/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 327 of file PersistencySvc.cpp.

328  {
329  // Assumption is that the Persistency service decodes that header
330  // and requests the conversion service referred to by the service
331  // type to decode the rest
332  long new_svc_type = 0;
333  CLID new_clid = 0;
334  std::string address_trailer;
335  decodeAddrHdr( refAddress, new_svc_type, new_clid, address_trailer );
336  IAddressCreator* svc = addressCreator( new_svc_type );
337  return svc ? svc->createAddress( new_svc_type, new_clid, address_trailer, refpAddress ) : Status::BAD_STORAGE_TYPE;
338 }

◆ createAddress() [2/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 293 of file PersistencySvc.cpp.

294  {
295  refpAddress = nullptr;
296  IAddressCreator* svc = addressCreator( svc_type );
297  return svc ? svc->createAddress( svc_type, clid, pars, ipars, refpAddress ) : Status::BAD_STORAGE_TYPE;
298 }

◆ 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 91 of file PersistencySvc.cpp.

91  {
92  return makeCall( CREATE_OBJ, pAddr, refpObj );
93 }

◆ 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 111 of file PersistencySvc.cpp.

111  {
112  return makeCall( CREATE_REP, refpAddr, pObj );
113 }

◆ dataProvider()

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

Access reference to transient datastore.

Access the dataprovider service.

Definition at line 157 of file PersistencySvc.cpp.

157 { return m_dataSvc; }

◆ 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 351 of file PersistencySvc.cpp.

352  {
353  // For address header, use xml-style format of
354  // <address_header service_type="xxx" clid="yyy" />
355  service_type = 0;
356  clid = 0;
357  address_trailer.clear();
358 
359  // Check for address_header tag
360  size_t pos = address.find( "<address_header" );
361  if ( std::string::npos != pos ) {
362  // Get service_type
363  pos = address.find( "service_type=\"" );
364  if ( std::string::npos != pos ) {
365  pos += 14;
366  size_t end = address.find( '"', pos );
367  if ( std::string::npos != end ) {
368  service_type = std::stol( address.substr( pos, end - pos ) );
369  // Get clid
370  pos = address.find( "clid=\"" );
371  if ( std::string::npos != pos ) {
372  pos += 6;
373  end = address.find( '\"', pos );
374  if ( std::string::npos != end ) {
375  std::istringstream str;
376  str.str( address.substr( pos, end - pos ) );
377  str >> clid;
378  // Get trailer_address
379  pos = address.find( '>' );
380  if ( pos < ( address.size() - 2 ) ) { // this means that '>' was found (pos != npos)
381  // it is before the last char
382  address_trailer = address.substr( pos + 1 );
383  }
384  }
385  }
386  }
387  }
388  }
389 }

◆ enable()

bool PersistencySvc::enable ( bool  value)
protected

Set enabled flag.

Definition at line 506 of file PersistencySvc.cpp.

506  {
507  std::swap( value, m_enable );
508  return value;
509 }

◆ 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 341 of file PersistencySvc.cpp.

341  {
342  // For address header, use xml-style format of
343  // <addrhdr service_type="xxx" clid="yyy" />
345  int svctyp = service_type; // must put int into stream, not char
346  stream << "<address_header service_type=\"" << svctyp << "\" clid=\"" << clid << "\" /> ";
347  address = stream.str();
348 }

◆ 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 96 of file PersistencySvc.cpp.

96  {
97  return makeCall( FILL_OBJ_REFS, pAddr, pObj );
98 }

◆ 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 116 of file PersistencySvc.cpp.

116  {
117  return makeCall( FILL_REP_REFS, pAddr, pObj );
118 }

◆ finalize()

StatusCode PersistencySvc::finalize ( )
override

stop the service.

Definition at line 496 of file PersistencySvc.cpp.

496  {
497  std::scoped_lock _{ m_servicesMutex };
498  // Release all workers
500  // Release references to this to avoid loops
501  m_addrCreator = nullptr;
502  return StatusCode::SUCCESS;
503 }

◆ getService() [1/2]

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

Retrieve conversion service identified by technology.

Definition at line 410 of file PersistencySvc.cpp.

410  {
411  const char* imp = service_type.c_str();
412  long len = service_type.length();
413  if ( ::strncasecmp( imp, "SICB", len ) == 0 )
414  return getService( SICB_StorageType, refpSvc );
415  else if ( ::strncasecmp( imp, "ZEBRA", len ) == 0 )
416  return getService( SICB_StorageType, refpSvc );
417  else if ( ::strncasecmp( imp, "MS Access", len ) == 0 )
418  return getService( ACCESS_StorageType, refpSvc );
419  else if ( ::strncasecmp( imp, "Microsoft Access", strlen( "Microsoft Access" ) ) == 0 )
420  return getService( ACCESS_StorageType, refpSvc );
421  else if ( ::strncasecmp( imp, "SQL Server", len ) == 0 )
422  return getService( SQLSERVER_StorageType, refpSvc );
423  else if ( ::strncasecmp( imp, "Microsoft ODBC for Oracle", len ) == 0 )
424  return getService( ORACLE_StorageType, refpSvc );
425  else if ( ::strncasecmp( imp, "Oracle ODBC", strlen( "Oracle ODBC" ) ) == 0 )
426  return getService( ORACLE_StorageType, refpSvc );
427  else if ( ::strncasecmp( imp, "Oracle OCI", strlen( "Oracle OCI" ) ) == 0 )
428  return getService( ORACLE_StorageType, refpSvc );
429  else if ( ::strncasecmp( imp, "MySQL", len ) == 0 )
430  return getService( MYSQL_StorageType, refpSvc );
431  else if ( ::strncasecmp( imp, "ROOT", len ) == 0 )
432  return getService( ROOT_StorageType, refpSvc );
433  else if ( ::strncasecmp( imp, "OBJY", len ) == 0 )
434  return getService( OBJY_StorageType, refpSvc );
435  else if ( ::strncasecmp( imp, "OBJYECTI", 7 ) == 0 )
436  return getService( OBJY_StorageType, refpSvc );
437  else if ( ::strncasecmp( imp, "POOL_ROOTKEY", 12 ) == 0 )
438  return getService( POOL_ROOTKEY_StorageType, refpSvc );
439  else if ( ::strncasecmp( imp, "POOL_ROOTTREE", 12 ) == 0 )
440  return getService( POOL_ROOTTREE_StorageType, refpSvc );
441  else if ( ::strncasecmp( imp, "POOL_ROOT", 9 ) == 0 )
442  return getService( POOL_ROOT_StorageType, refpSvc );
443  else if ( ::strncasecmp( imp, "POOL_MySQL", 8 ) == 0 )
444  return getService( POOL_MYSQL_StorageType, refpSvc );
445  else if ( ::strncasecmp( imp, "POOL_ORACLE", 8 ) == 0 )
446  return getService( POOL_ORACLE_StorageType, refpSvc );
447  else if ( ::strncasecmp( imp, "POOL_ACCESS", 8 ) == 0 )
448  return getService( POOL_ACCESS_StorageType, refpSvc );
449  else if ( ::strncasecmp( imp, "POOL", 4 ) == 0 )
450  return getService( POOL_StorageType, refpSvc );
451 
452  std::scoped_lock _{ m_servicesMutex };
453  for ( const auto& i : m_cnvServices ) {
454  SmartIF<IService> svc( i.second.conversionSvc() );
455  if ( svc ) {
456  // Check wether this is already an active service: first check by service name
457  if ( svc->name() == service_type ) {
458  refpSvc = i.second.conversionSvc();
459  return StatusCode::SUCCESS;
460  }
461  // Check wether this is already an active service: now check by service type
462  auto instance = svc.get();
463  if ( System::typeinfoName( typeid( *instance ) ) == service_type ) {
464  refpSvc = i.second.conversionSvc();
465  return StatusCode::SUCCESS;
466  }
467  }
468  }
469  // if not, check if the service is in the list and may be requested
470  for ( const auto& i : m_svcNames.value() ) {
472  if ( itm.name() == service_type || itm.type() == service_type ) {
473  IConversionSvc* svc = service( i );
474  if ( svc ) {
475  refpSvc = svc;
476  return StatusCode::SUCCESS;
477  }
478  }
479  }
480  return StatusCode::FAILURE;
481 }

◆ getService() [2/2]

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

Retrieve conversion service identified by technology.

Definition at line 404 of file PersistencySvc.cpp.

404  {
405  refpSvc = service( service_type );
406  return refpSvc ? StatusCode::SUCCESS : StatusCode::FAILURE;
407 }

◆ initialize()

StatusCode PersistencySvc::initialize ( )
override

Initialize the service.

Definition at line 487 of file PersistencySvc.cpp.

487  {
488  m_addrCreator = this; // initialize internal pointer to IAddressCreator interface
489  // Initialize basic service
490  StatusCode status = Service::initialize();
491  if ( !status.isSuccess() ) { error() << "Error initializing Service base class." << endmsg; }
492  return status;
493 }

◆ makeCall()

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

Implementation helper.

Definition at line 36 of file PersistencySvc.cpp.

36  {
37  if ( m_enable ) {
38  IConversionSvc* svc = nullptr;
39  switch ( typ ) {
40  case CREATE_REP:
41  case FILL_REP_REFS:
42  case UPDATE_REP:
43  case UPDATE_REP_REFS:
44  svc = m_cnvDefault;
45  break;
46  default:
47  if ( !pAddress ) return Status::INVALID_ADDRESS;
48  svc = service( pAddress->svcType() );
49  if ( !svc ) return Status::BAD_STORAGE_TYPE;
50  break;
51  }
52 
54  switch ( typ ) {
55  case CREATE_OBJ:
56  pObject = nullptr;
57  status = svc->createObj( pAddress, pObject );
58  break;
59  case FILL_OBJ_REFS:
60  status = svc->fillObjRefs( pAddress, pObject );
61  break;
62  case UPDATE_OBJ:
63  status = svc->updateObj( pAddress, pObject );
64  break;
65  case UPDATE_OBJ_REFS:
66  status = svc->updateObjRefs( pAddress, pObject );
67  break;
68  case CREATE_REP:
69  status = svc->createRep( pObject, pAddress );
70  break;
71  case FILL_REP_REFS:
72  status = svc->fillRepRefs( pAddress, pObject );
73  break;
74  case UPDATE_REP:
75  status = svc->updateRep( pAddress, pObject );
76  break;
77  case UPDATE_REP_REFS:
78  status = svc->updateRepRefs( pAddress, pObject );
79  break;
80  default:
81  status = StatusCode::FAILURE;
82  break;
83  }
84  status.ignore();
85  return status;
86  }
87  return StatusCode::SUCCESS;
88 }

◆ 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 484 of file PersistencySvc.cpp.

484 { return CLID_NULL; }

◆ removeCnvService()

StatusCode PersistencySvc::removeCnvService ( long  type)
override

Remove a Service.

Remove conversion service.

Definition at line 261 of file PersistencySvc.cpp.

261  {
262  std::scoped_lock _{ m_servicesMutex };
263 
264  auto it = m_cnvServices.find( svctype );
265  if ( it == m_cnvServices.end() ) return Status::BAD_STORAGE_TYPE;
266  it->second.service()->release();
267  it->second.addrCreator()->release();
268  m_cnvServices.erase( it );
269  return StatusCode::SUCCESS;
270 }

◆ removeConverter()

StatusCode PersistencySvc::removeConverter ( const CLID clid)
override

Remove converter object from conversion service (if present).

Definition at line 179 of file PersistencySvc.cpp.

179  {
180  std::scoped_lock _{ m_servicesMutex };
181  // Remove converter type from all services
182  StatusCode status = Status::NO_CONVERTER, iret = StatusCode::SUCCESS;
183  for ( auto& i : m_cnvServices ) {
184  iret = i.second.conversionSvc()->removeConverter( clid );
185  if ( iret.isSuccess() ) status = iret;
186  }
187  return status;
188 }

◆ repSvcType()

long PersistencySvc::repSvcType ( ) const
override

Return default service type.

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

Definition at line 273 of file PersistencySvc.cpp.

273 { return m_cnvDefault ? m_cnvDefault->repSvcType() : 0; }

◆ service() [1/2]

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

Retrieve conversion service by name.

Definition at line 194 of file PersistencySvc.cpp.

194  {
196 
197  std::scoped_lock _{ m_servicesMutex };
198 
200  [&]( Services::const_reference i ) { return i.second.service()->name() == tn.name(); } );
201  if ( it != m_cnvServices.end() ) return it->second.conversionSvc();
202 
203  auto svc = Service::service<IConversionSvc>( nam, true );
204  if ( svc && addCnvService( svc.get() ).isSuccess() ) {
205  return service( nam ); // now it is in the list
206  }
207 
208  error() << "Cannot access Conversion service " << nam << endmsg;
209  static SmartIF<IConversionSvc> no_svc;
210  return no_svc;
211 }

◆ service() [2/2]

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

Retrieve conversion service from list.

Definition at line 214 of file PersistencySvc.cpp.

214  {
215  std::scoped_lock _{ m_servicesMutex };
216  // Check wether this is already an active service
217  auto it = m_cnvServices.find( type );
218  if ( it != m_cnvServices.end() ) return it->second.conversionSvc();
219  // if not, check if the service is in the list and may be requested
220  for ( const auto& i : m_svcNames.value() ) {
221  auto& svc = service( i );
222  if ( svc && svc->repSvcType() == type ) return svc;
223  }
224  static SmartIF<IConversionSvc> no_svc;
225  return no_svc;
226 }

◆ setAddressCreator()

StatusCode PersistencySvc::setAddressCreator ( IAddressCreator creator)
override

Set address creator facility.

Definition at line 392 of file PersistencySvc.cpp.

392  {
393  // The persistency service is an address creation dispatcher itself.
394  // The persistency service can NEVER create addresses itself.
395  // The entry point must only be provided in order to fulfill the needs of the
396  // implementing interfaces.
397  return StatusCode::FAILURE;
398 }

◆ setConversionSvc()

StatusCode PersistencySvc::setConversionSvc ( IConversionSvc svc)
override

Set conversion service the converter is connected to.

Definition at line 160 of file PersistencySvc.cpp.

160  {
161  m_cnvDefault = svc;
162  return StatusCode::SUCCESS;
163 }

◆ setDataProvider()

StatusCode PersistencySvc::setDataProvider ( IDataProviderSvc pStore)
override

Define transient datastore.

Define transient data store.

Definition at line 149 of file PersistencySvc.cpp.

149  {
150  std::scoped_lock _{ m_servicesMutex };
151  m_dataSvc = pDataSvc;
152  for ( auto& i : m_cnvServices ) { i.second.conversionSvc()->setDataProvider( m_dataSvc ).ignore(); }
153  return StatusCode::SUCCESS;
154 }

◆ setDefaultCnvService()

StatusCode PersistencySvc::setDefaultCnvService ( long  type)
override

Set default service type.

Set default conversion service.

Definition at line 276 of file PersistencySvc.cpp.

276  {
278  return StatusCode::SUCCESS;
279 }

◆ 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 101 of file PersistencySvc.cpp.

101  {
102  return makeCall( UPDATE_OBJ, pAddr, pObj );
103 }

◆ 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 106 of file PersistencySvc.cpp.

106  {
107  return makeCall( UPDATE_OBJ_REFS, pAddr, pObj );
108 }

◆ 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 121 of file PersistencySvc.cpp.

121  {
122  return makeCall( UPDATE_REP, pAddr, pObj );
123 }

◆ 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 126 of file PersistencySvc.cpp.

126  {
127  return makeCall( UPDATE_REP_REFS, pAddr, pObj );
128 }

Member Data Documentation

◆ m_addrCreator

SmartIF<IAddressCreator> PersistencySvc::m_addrCreator
mutableprotected

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

Definition at line 250 of file PersistencySvc.h.

◆ m_cnvDefault

SmartIF<IConversionSvc> PersistencySvc::m_cnvDefault
mutableprotected

Default output service.

Definition at line 234 of file PersistencySvc.h.

◆ m_cnvDefType

long PersistencySvc::m_cnvDefType = TEST_StorageType
protected

Default service type.

Definition at line 225 of file PersistencySvc.h.

◆ m_cnvServices

Services PersistencySvc::m_cnvServices
protected

List of conversion workers.

Definition at line 229 of file PersistencySvc.h.

◆ m_dataSvc

SmartIF<IDataProviderSvc> PersistencySvc::m_dataSvc
mutableprotected

Pointer to data provider service.

Definition at line 227 of file PersistencySvc.h.

◆ m_enable

bool PersistencySvc::m_enable = true
protected

Flag to indicate that the service is enabled.

Definition at line 247 of file PersistencySvc.h.

◆ m_servicesMutex

std::recursive_mutex PersistencySvc::m_servicesMutex
mutableprotected

Mutex to protect accesses to m_cnvServices.

Definition at line 231 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",
"OrderedSet<std::string>" }

Definition at line 236 of file PersistencySvc.h.


The documentation for this class was generated from the following files:
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:25
PersistencySvc::encodeAddrHdr
void encodeAddrHdr(long service_type, const CLID &clid, std::string &address) const
Retrieve string from storage type and clid.
Definition: PersistencySvc.cpp:341
IService
Definition: IService.h:28
UPDATE_REP_REFS
@ UPDATE_REP_REFS
Definition: PersistencySvc.cpp:33
Write.stream
stream
Definition: Write.py:32
std::strlen
T strlen(T... args)
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:118
IAddressCreator
Definition: IAddressCreator.h:38
PersistencySvc::ServiceEntry::conversionSvc
SmartIF< IConversionSvc > & conversionSvc() const
Definition: PersistencySvc.h:80
std::string
STL class.
PersistencySvc::m_cnvDefault
SmartIF< IConversionSvc > m_cnvDefault
Default output service.
Definition: PersistencySvc.h:234
IConverter::fillRepRefs
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the converted object.
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
IConverter::updateRepRefs
virtual StatusCode updateRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the references of an already converted object.
CREATE_OBJ
@ CREATE_OBJ
Definition: PersistencySvc.cpp:26
gaudirun.s
string s
Definition: gaudirun.py:346
ACCESS_StorageType
const long ACCESS_StorageType
Definition: ClassID.h:70
std::map::find
T find(T... args)
std::string::size
T size(T... args)
IOpaqueAddress::svcType
virtual long svcType() const =0
Retrieve service type.
MYSQL_StorageType
const long MYSQL_StorageType
Definition: ClassID.h:74
PersistencySvc::addCnvService
StatusCode addCnvService(IConversionSvc *service) override
Add a new Service.
Definition: PersistencySvc.cpp:229
PersistencySvc::decodeAddrHdr
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.
Definition: PersistencySvc.cpp:351
IAddressCreator::convertAddress
virtual StatusCode convertAddress(const IOpaqueAddress *pAddress, std::string &refAddress)=0
Convert an address to string form.
PersistencySvc::removeCnvService
StatusCode removeCnvService(long type) override
Remove a Service.
Definition: PersistencySvc.cpp:261
std::map::emplace
T emplace(T... args)
POOL_MYSQL_StorageType
const long POOL_MYSQL_StorageType
Definition: ClassID.h:82
std::stringstream
STL class.
std::istringstream
STL class.
IConverter::createObj
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject)=0
Create the transient representation of an object.
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:315
PersistencySvc::ServiceEntry::service
SmartIF< IService > & service() const
Definition: PersistencySvc.h:79
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:148
PersistencySvc::m_cnvServices
Services m_cnvServices
List of conversion workers.
Definition: PersistencySvc.h:229
std::string::clear
T clear(T... args)
FILL_OBJ_REFS
@ FILL_OBJ_REFS
Definition: PersistencySvc.cpp:27
std::stol
T stol(T... args)
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:20
StatusCode
Definition: StatusCode.h:65
IConverter::createRep
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)=0
Convert the transient object to the requested representation.
PersistencySvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to data provider service.
Definition: PersistencySvc.h:227
IConverter::conversionSvc
virtual SmartIF< IConversionSvc > & conversionSvc() const =0
Get conversion service the converter is connected to.
PersistencySvc::service
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
Definition: PersistencySvc.cpp:194
PersistencySvc::m_addrCreator
SmartIF< IAddressCreator > m_addrCreator
Pointer to the IAddressCreator interface of this, for addressCreator().
Definition: PersistencySvc.h:250
PersistencySvc::ServiceEntry::addrCreator
SmartIF< IAddressCreator > & addrCreator() const
Definition: PersistencySvc.h:81
POOL_ROOT_StorageType
const long POOL_ROOT_StorageType
Definition: ClassID.h:78
std::string::c_str
T c_str(T... args)
CREATE_REP
@ CREATE_REP
Definition: PersistencySvc.cpp:30
POOL_ROOTKEY_StorageType
const long POOL_ROOTKEY_StorageType
Definition: ClassID.h:79
IConverter::updateObj
virtual StatusCode updateObj(IOpaqueAddress *pAddress, DataObject *refpObject)=0
Update the transient object from the other representation.
IOpaqueAddress::clID
virtual const CLID & clID() const =0
Retrieve class information from link.
Gaudi::Property::value
const ValueType & value() const
Definition: Property.h:237
POOL_ORACLE_StorageType
const long POOL_ORACLE_StorageType
Definition: ClassID.h:83
GaudiPython.Bindings.nullptr
nullptr
Definition: Bindings.py:87
PersistencySvc::addressCreator
SmartIF< IAddressCreator > & addressCreator() const override
Retrieve address creator facility.
Definition: PersistencySvc.cpp:401
std::map::erase
T erase(T... args)
POOL_StorageType
const long POOL_StorageType
Definition: ClassID.h:77
POOL_ACCESS_StorageType
const long POOL_ACCESS_StorageType
Definition: ClassID.h:81
SmartIF< IAddressCreator >
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
IConversionSvc::addConverter
virtual StatusCode addConverter(IConverter *pConverter)=0
Add converter object to conversion service.
PersistencySvc::connectOutput
StatusCode connectOutput(const std::string &outputFile, const std::string &openMode) override
Connect the output file to the service with open mode.
Definition: PersistencySvc.cpp:282
ORACLE_StorageType
const long ORACLE_StorageType
Definition: ClassID.h:75
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
ROOT_StorageType
const long ROOT_StorageType
Definition: ClassID.h:62
PersistencySvc::m_svcNames
Gaudi::Property< std::vector< std::string > > m_svcNames
Definition: PersistencySvc.h:236
IConverter::repSvcType
virtual long repSvcType() const =0
Retrieve the class type of the data store the converter uses.
UPDATE_REP
@ UPDATE_REP
Definition: PersistencySvc.cpp:32
StatusCode::ignore
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition: StatusCode.h:139
std::swap
T swap(T... args)
std::string::substr
T substr(T... args)
gaudirun.type
type
Definition: gaudirun.py:160
make_SmartIF
SmartIF< IFace > make_SmartIF(IFace *iface)
Definition: SmartIF.h:150
UPDATE_OBJ_REFS
@ UPDATE_OBJ_REFS
Definition: PersistencySvc.cpp:29
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
SQLSERVER_StorageType
const long SQLSERVER_StorageType
Definition: ClassID.h:73
IAddressCreator::createAddress
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.
IConverter::updateObjRefs
virtual StatusCode updateObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the references of an updated transient object.
POOL_ROOTTREE_StorageType
const long POOL_ROOTTREE_StorageType
Definition: ClassID.h:80
PersistencySvc::makeCall
StatusCode makeCall(int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
Implementation helper.
Definition: PersistencySvc.cpp:36
std::map::begin
T begin(T... args)
IConverter::updateRep
virtual StatusCode updateRep(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the converted representation of a transient object.
PersistencySvc::m_servicesMutex
std::recursive_mutex m_servicesMutex
Mutex to protect accesses to m_cnvServices.
Definition: PersistencySvc.h:231
PersistencySvc::m_enable
bool m_enable
Flag to indicate that the service is enabled.
Definition: PersistencySvc.h:247
UPDATE_OBJ
@ UPDATE_OBJ
Definition: PersistencySvc.cpp:28
std::istringstream::str
T str(T... args)
IConverter::fillObjRefs
virtual StatusCode fillObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the created transient object.
std::map::end
T end(T... args)
IOTest.end
end
Definition: IOTest.py:125
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
OBJY_StorageType
const long OBJY_StorageType
Definition: ClassID.h:63
SICB_StorageType
const long SICB_StorageType
Definition: ClassID.h:61
FILL_REP_REFS
@ FILL_REP_REFS
Definition: PersistencySvc.cpp:31
PersistencySvc::getService
StatusCode getService(long service_type, IConversionSvc *&refpSvc) override
Retrieve conversion service identified by technology.
Definition: PersistencySvc.cpp:404
IConversionSvc
Definition: IConversionSvc.h:47