![]() |
ATLAS Offline Software
|
#include <AthenaBaseComps/AthCnvSvc.h>
Classes | |
class | WorkerEntry |
Public Types | |
typedef std::unordered_map< CLID, WorkerEntry > | Workers |
Public Member Functions | |
AthCnvSvc (const std::string &name, ISvcLocator *pSvcLocator, long type) | |
Constructor with parameters: More... | |
virtual StatusCode | initialize () |
Gaudi Service Implementation. More... | |
virtual StatusCode | finalize () |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
MsgStream & | msg () const |
MsgStream & | msg (const MSG::Level lvl) const |
bool | msgLvl (const MSG::Level lvl) const |
Friends | |
class | SvcFactory< AthCnvSvc > |
@c IConversionSvc implementation | |
virtual long | repSvcType () const |
Retrieve the class type of the data store the converter uses. More... | |
const CLID & | objType () const |
Implementation of IConverter: dummy call. More... | |
virtual StatusCode | setDataProvider (IDataProviderSvc *pService) |
Implementation of IConverter: Set Data provider service. More... | |
virtual SmartIF< IDataProviderSvc > & | dataProvider () const |
Implementation of IConverter: Get Data provider service. More... | |
virtual StatusCode | setConversionSvc (IConversionSvc *svc) |
Implementation of IConverter: Set conversion service the converter is connected to. More... | |
virtual SmartIF< IConversionSvc > & | conversionSvc () const |
Implementation of IConverter: Get conversion service the converter is connected to. More... | |
virtual StatusCode | setAddressCreator (IAddressCreator *creator) |
Set address creator facility. More... | |
virtual SmartIF< IAddressCreator > & | addressCreator () const |
Retrieve address creator facility. More... | |
virtual StatusCode | createObj (IOpaqueAddress *pAddress, DataObject *&refpObject) |
Implementation of IConverter: Create the transient representation of an object. More... | |
virtual StatusCode | fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
Implementation of IConverter: Resolve the references of the created transient object. More... | |
virtual StatusCode | updateObj (IOpaqueAddress *pAddress, DataObject *refpObject) |
Implementation of IConverter: Update the transient object from the other representation. More... | |
virtual StatusCode | updateObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
Implementation of IConverter: Update the references of an updated transient object. More... | |
virtual StatusCode | createRep (DataObject *pObject, IOpaqueAddress *&refpAddress) |
Implementation of IConverter: Convert the transient object to the requested representation. More... | |
virtual StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
Implementation of IConverter: Resolve the references of the converted object. More... | |
virtual StatusCode | updateRep (IOpaqueAddress *pAddress, DataObject *pObject) |
Implementation of IConverter: Update the converted representation of a transient object. More... | |
virtual StatusCode | updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
Implementation of IConverter: Update the references of an already converted object. More... | |
virtual StatusCode | addConverter (const CLID &clid) |
Add converter object to conversion service. More... | |
virtual StatusCode | addConverter (IConverter *pConverter) |
Add converter object to conversion service. More... | |
virtual StatusCode | removeConverter (const CLID &clid) |
Remove converter object from conversion service (if present). More... | |
virtual IConverter * | converter (const CLID &wanted) |
Retrieve converter from list. More... | |
virtual StatusCode | connectOutput (const std::string &outputFile, const std::string &openMode) |
Connect the output file to the service with open mode. More... | |
virtual StatusCode | connectOutput (const std::string &output) |
Connect the output file to the service. More... | |
virtual StatusCode | commitOutput (const std::string &output, bool do_commit) |
Commit pending output. More... | |
virtual StatusCode | disconnectOutput (const std::string &output) |
Disconnect output files from the service. More... | |
@c IAddressCreator interface implementation | |
typedef std::recursive_mutex | CallMutex |
Mutex to protect Converter creation. More... | |
SmartIF< IDataProviderSvc > | m_dataSvc |
Pointer to data provider service. More... | |
SmartIF< IAddressCreator > | m_addressCreator |
Pointer to the address creation service interface. More... | |
SmartIF< IConversionSvc > | m_cnvSvc |
Pointer to the IConversionSvc interface of this. More... | |
long | m_type |
Conversion service type. More... | |
Workers | m_workers |
List of conversion workers. More... | |
CallMutex | m_conv_mut |
virtual StatusCode | createAddress (long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress) |
Create a Generic address using explicit arguments to identify a single object. More... | |
virtual StatusCode | convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress) |
Convert an address to string form. More... | |
virtual StatusCode | createAddress (long svc_type, const CLID &clid, const std::string &refAddress, IOpaqueAddress *&refpAddress) |
Convert an address in string form to object form. More... | |
virtual StatusCode | updateServiceState (IOpaqueAddress *pAddress) |
Update state of the service. More... | |
AthCnvSvc () | |
Default constructor: More... | |
AthCnvSvc (const AthCnvSvc &) | |
AthCnvSvc & | operator= (const AthCnvSvc &) |
virtual | ~AthCnvSvc () |
Destructor: More... | |
virtual IConverter * | createConverter (long typ, const CLID &clid, const ICnvFactory *fac) |
Create new Converter using factory. More... | |
virtual StatusCode | configureConverter (long typ, const CLID &clid, IConverter *cnv) |
Configure the new converter before initialize is called. More... | |
virtual StatusCode | initializeConverter (long typ, const CLID &clid, IConverter *cnv) |
Initialize the new converter. More... | |
virtual StatusCode | activateConverter (long typ, const CLID &clid, IConverter *cnv) |
Activate the new converter after initialization. More... | |
virtual void | loadConverter (DataObject *pObject) |
Load converter or dictionary needed by the converter. More... | |
virtual SmartIF< IAddressCreator > & | addressCreator () |
Retrieve address creation interface. More... | |
StatusCode | makeCall (int typ, bool ignore_add, bool ignore_obj, bool update, IOpaqueAddress *&pAddress, DataObject *&pObject) |
Base class for all conversion services. It manages a set of Converters that are specialized for conversions of specific objects.
This supports self learning converters: User hooks include the following (overridable) entries:
configureConverter and activateConverter are user hooks, where the converter can be manipulated by the hosting service and knowledge can be supplied, which a "generic" converter cannot acquire itself.
These hooks allow any sub-classed conversion service to override the calls and create converters, which acquire the knowledge about their persistency type and the object type they convert during the initialization.
Only AFTER these three steps the converter must satisfy the storage type of the hosting service and the class type of the required object type.
Definition at line 63 of file AthCnvSvc.h.
|
protected |
Mutex to protect Converter creation.
Definition at line 323 of file AthCnvSvc.h.
typedef std::unordered_map<CLID,WorkerEntry> AthCnvSvc::Workers |
Definition at line 106 of file AthCnvSvc.h.
AthCnvSvc::AthCnvSvc | ( | const std::string & | name, |
ISvcLocator * | pSvcLocator, | ||
long | type | ||
) |
|
private |
Default constructor:
|
protectedvirtual |
|
protectedvirtual |
Activate the new converter after initialization.
Definition at line 536 of file AthCnvSvc.cxx.
|
virtual |
|
inlineprotectedvirtual |
Retrieve address creation interface.
Definition at line 300 of file AthCnvSvc.h.
|
virtual |
|
virtual |
Commit pending output.
Reimplemented in TrigByteStreamCnvSvc, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, AthenaPoolCnvSvc, ByteStreamCnvSvc, and Athena::RootCnvSvc.
Definition at line 429 of file AthCnvSvc.cxx.
|
protectedvirtual |
Configure the new converter before initialize is called.
Definition at line 510 of file AthCnvSvc.cxx.
|
virtual |
Connect the output file to the service.
Reimplemented in ByteStreamCnvSvc, TrigByteStreamCnvSvc, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, AthenaPoolCnvSvc, and Athena::RootCnvSvc.
Definition at line 422 of file AthCnvSvc.cxx.
|
virtual |
Connect the output file to the service with open mode.
Reimplemented in ByteStreamCnvSvc, TrigByteStreamCnvSvc, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, AthenaPoolCnvSvc, and Athena::RootCnvSvc.
Definition at line 414 of file AthCnvSvc.cxx.
|
virtual |
Implementation of IConverter: Get conversion service the converter is connected to.
Definition at line 232 of file AthCnvSvc.cxx.
|
virtual |
Convert an address to string form.
Reimplemented in AthenaPoolCnvSvc, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and Athena::RootCnvSvc.
Definition at line 459 of file AthCnvSvc.cxx.
|
virtual |
Convert an address in string form to object form.
Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, AthenaPoolCnvSvc, and Athena::RootCnvSvc.
Definition at line 468 of file AthCnvSvc.cxx.
|
virtual |
Create a Generic address using explicit arguments to identify a single object.
Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, AthenaPoolCnvSvc, and Athena::RootCnvSvc.
Definition at line 447 of file AthCnvSvc.cxx.
|
protectedvirtual |
Create new Converter using factory.
Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and Athena::RootCnvSvc.
Definition at line 491 of file AthCnvSvc.cxx.
|
virtual |
Implementation of IConverter: Create the transient representation of an object.
Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and AthenaPoolCnvSvc.
Definition at line 273 of file AthCnvSvc.cxx.
|
virtual |
Implementation of IConverter: Convert the transient object to the requested representation.
Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and AthenaPoolCnvSvc.
Definition at line 305 of file AthCnvSvc.cxx.
|
virtual |
Implementation of IConverter: Get Data provider service.
Definition at line 212 of file AthCnvSvc.cxx.
|
virtual |
Disconnect output files from the service.
Reimplemented in AthenaPoolCnvSvc.
Definition at line 437 of file AthCnvSvc.cxx.
|
virtual |
Implementation of IConverter: Resolve the references of the created transient object.
Definition at line 281 of file AthCnvSvc.cxx.
|
virtual |
Implementation of IConverter: Resolve the references of the converted object.
Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and AthenaPoolCnvSvc.
Definition at line 313 of file AthCnvSvc.cxx.
|
virtual |
Reimplemented in ByteStreamCnvSvc, TrigByteStreamCnvSvc, AthenaPoolCnvSvc, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and Athena::RootCnvSvc.
Definition at line 116 of file AthCnvSvc.cxx.
|
virtual |
Gaudi Service Implementation.
Reimplemented in ByteStreamCnvSvc, TrigByteStreamCnvSvc, ByteStreamCnvSvcBase, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, AthenaPoolCnvSvc, Athena::RootCnvSvc, and MuonCalibStreamCnvSvc.
Definition at line 111 of file AthCnvSvc.cxx.
|
protectedvirtual |
Initialize the new converter.
Definition at line 525 of file AthCnvSvc.cxx.
|
protectedvirtual |
Load converter or dictionary needed by the converter.
Definition at line 547 of file AthCnvSvc.cxx.
|
protected |
Definition at line 553 of file AthCnvSvc.cxx.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 27 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
Implementation of IConverter: dummy call.
Definition at line 179 of file AthCnvSvc.cxx.
|
virtual |
Reimplemented in ByteStreamCnvSvc, ByteStreamCnvSvcBase, AthenaPoolCnvSvc, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, Athena::RootCnvSvc, and MuonCalibStreamCnvSvc.
Definition at line 149 of file AthCnvSvc.cxx.
Remove converter object from conversion service (if present).
Definition at line 379 of file AthCnvSvc.cxx.
|
virtual |
Retrieve the class type of the data store the converter uses.
Definition at line 172 of file AthCnvSvc.cxx.
|
virtual |
|
virtual |
Implementation of IConverter: Set conversion service the converter is connected to.
Definition at line 224 of file AthCnvSvc.cxx.
|
virtual |
Implementation of IConverter: Set Data provider service.
pService | Pointer to data provider service |
Definition at line 189 of file AthCnvSvc.cxx.
|
virtual |
Implementation of IConverter: Update the transient object from the other representation.
Definition at line 289 of file AthCnvSvc.cxx.
|
virtual |
Implementation of IConverter: Update the references of an updated transient object.
Definition at line 297 of file AthCnvSvc.cxx.
|
virtual |
Implementation of IConverter: Update the converted representation of a transient object.
Definition at line 321 of file AthCnvSvc.cxx.
|
virtual |
Implementation of IConverter: Update the references of an already converted object.
Definition at line 329 of file AthCnvSvc.cxx.
|
virtual |
Update state of the service.
Reimplemented in ByteStreamCnvSvcBase, Athena::RootCnvSvc, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and MuonCalibStreamCnvSvc.
Definition at line 479 of file AthCnvSvc.cxx.
|
friend |
Definition at line 1 of file AthCnvSvc.h.
|
protected |
Pointer to the address creation service interface.
Definition at line 315 of file AthCnvSvc.h.
|
protected |
Pointer to the IConversionSvc interface of this.
Definition at line 317 of file AthCnvSvc.h.
|
protected |
Definition at line 324 of file AthCnvSvc.h.
|
protected |
Pointer to data provider service.
Definition at line 313 of file AthCnvSvc.h.
|
protected |
Conversion service type.
Definition at line 319 of file AthCnvSvc.h.
|
protected |
List of conversion workers.
Definition at line 321 of file AthCnvSvc.h.