11 #ifndef PERSISTENCYSVC_PERSISTENCYSVC_H
12 #define PERSISTENCYSVC_PERSISTENCYSVC_H 1
15 #include "GaudiKernel/Service.h"
16 #include "GaudiKernel/IConversionSvc.h"
17 #include "GaudiKernel/IPersistencySvc.h"
18 #include "GaudiKernel/IAddressCreator.h"
19 #include "GaudiKernel/IDataProviderSvc.h"
66 : m_serviceType ( type ),
67 m_service (
std::move(svc) ),
68 m_cnvService (
std::move(cnv) ),
69 m_addrCreator (
std::move(cr) )
174 const std::string& openMode)
override;
184 const std::string* pars,
185 const unsigned long* ipars,
190 std::string& refAddress)
override;
195 const std::string& refAddress,
247 std::string& address)
const;
253 std::string& address_trailer)
const;
284 #endif // PERSISTENCYSVC_PERSISTENCYSVC_H
SmartIF< IAddressCreator > m_addrCreator
Pointer to the IAddressCreator interface of this, for addressCreator().
SmartIF< IAddressCreator > & addressCreator() const override
Retrieve address creator facility.
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
SmartIF< IConversionSvc > & conversionSvc() const
SmartIF< IAddressCreator > & addrCreator() const
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
The data converters are responsible to translate data from one representation into another...
long m_cnvDefType
Default service type.
StatusCode initialize() override
Initialize the service.
StatusCode connectOutput(const std::string &outputFile, const std::string &openMode) override
Connect the output file to the service with open mode.
SmartIF< IService > & service() const
IAddressCreator interface definition.
bool m_enable
Flag to indicate that the service is enabled.
StatusCode setConversionSvc(IConversionSvc *svc) override
Set conversion service the converter is connected to.
StatusCode makeCall(int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
Implementation helper.
SmartIF< IService > m_service
StringArrayProperty m_svcNames
Names of services to be requested from the service locator and added by default.
Data provider interface definition.
StatusCode removeConverter(const CLID &clid) override
Remove converter object from conversion service (if present).
PersistencySvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
StatusCode updateRep(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Update the converted representation of a transient object.
StatusCode updateObjRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Update the references of an updated transient object.
StatusCode addConverter(IConverter *pConverter) override
Add converter object to conversion service.
StatusCode convertAddress(const IOpaqueAddress *pAddress, std::string &refAddress) override
Convert an address to string form.
long repSvcType() const override
Return default service type.
StatusCode fillObjRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Resolve the references of the created transient object.
bool enable(bool value)
Set enabled flag.
std::map< long, ServiceEntry > Services
StatusCode setDataProvider(IDataProviderSvc *pStore) override
Define transient datastore.
void encodeAddrHdr(long service_type, const CLID &clid, std::string &address) const
Retrieve string from storage type and clid.
void svcNamesHandler(Property &theProp)
Handlers for Service Names Property.
const CLID & objType() const override
Retrieve the class type of objects the converter produces. (DUMMY)
General service interface definition.
This class is used for returning status codes from appropriate routines.
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
StatusCode finalize() override
stop the service.
const long TEST_StorageType
StatusCode getService(long service_type, IConversionSvc *&refpSvc) override
Retrieve conversion service identified by technology.
ServiceEntry(long type, IService *svc, IConversionSvc *cnv, IAddressCreator *cr)
ServiceEntry(long type, SmartIF< IService > svc, SmartIF< IConversionSvc > cnv, SmartIF< IAddressCreator > cr)
SmartIF< IConversionSvc > m_cnvDefault
Default output service.
StatusCode commitOutput(const std::string &output, bool do_commit) override
Commit pending output.
PersistencySvc class implementation definition.
StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Resolve the references of the converted object.
SmartIF< IConversionSvc > m_cnvService
StatusCode addCnvService(IConversionSvc *service) override
Add a new Service.
StatusCode removeCnvService(long type) override
Remove a Service.
StatusCode updateObj(IOpaqueAddress *pAddress, DataObject *refpObject) override
Implementation of IConverter: Update the transient object from the other representation.
~PersistencySvc() override=default
Standard Destructor.
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.
SmartIF< IConversionSvc > & conversionSvc() const override
Get conversion service the converter is connected to.
Property base class allowing Property* collections to be "homogeneous".
SmartIF< IDataProviderSvc > & dataProvider() const override
Access reference to transient datastore.
Base class used to extend a class implementing other interfaces.
StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject) override
Implementation of IConverter: Create the transient representation of an object.
Services m_cnvServices
List of convermsion workers.
StatusCode setAddressCreator(IAddressCreator *creator) override
Set address creator facility.
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.
SmartIF< IAddressCreator > m_addrCreator
Opaque address interface definition.
unsigned int CLID
Class ID definition.
StatusCode setDefaultCnvService(long type) override
Set default service type.
A DataObject is the base class of any identifiable object on any data store.
StatusCode updateRepRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Update the references of an already converted object.
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to datma provider service.
IConverter * converter(const CLID &clid) override
Retrieve converter from list.