![]() |
ATLAS Offline Software
|
Base class for all conversion services. More...
#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: | |
| virtual StatusCode | initialize () override |
| Gaudi Service Implementation. | |
| virtual StatusCode | finalize () override |
@c IConversionSvc implementation | |
| virtual long | repSvcType () const override |
| Retrieve the class type of the data store the converter uses. | |
| virtual const CLID & | objType () const override |
| Implementation of IConverter: dummy call. | |
| virtual StatusCode | setDataProvider (IDataProviderSvc *pService) override |
| Implementation of IConverter: Set Data provider service. | |
| virtual SmartIF< IDataProviderSvc > & | dataProvider () const override |
| Implementation of IConverter: Get Data provider service. | |
| virtual StatusCode | setConversionSvc (IConversionSvc *svc) override |
| Implementation of IConverter: Set conversion service the converter is connected to. | |
| virtual SmartIF< IConversionSvc > | conversionSvc () override |
| Implementation of IConverter: Get conversion service the converter is connected to. | |
| virtual StatusCode | setAddressCreator (IAddressCreator *creator) override |
| Set address creator facility. | |
| virtual SmartIF< IAddressCreator > & | addressCreator () const override |
| Retrieve address creator facility. | |
| virtual StatusCode | createObj (IOpaqueAddress *pAddress, DataObject *&refpObject) override |
| Implementation of IConverter: Create the transient representation of an object. | |
| virtual StatusCode | fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) override |
| Implementation of IConverter: Resolve the references of the created transient object. | |
| virtual StatusCode | updateObj (IOpaqueAddress *pAddress, DataObject *refpObject) override |
| Implementation of IConverter: Update the transient object from the other representation. | |
| virtual StatusCode | updateObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) override |
| Implementation of IConverter: Update the references of an updated transient object. | |
| virtual StatusCode | createRep (DataObject *pObject, IOpaqueAddress *&refpAddress) override |
| Implementation of IConverter: Convert the transient object to the requested representation. | |
| virtual StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) override |
| Implementation of IConverter: Resolve the references of the converted object. | |
| virtual StatusCode | updateRep (IOpaqueAddress *pAddress, DataObject *pObject) override |
| Implementation of IConverter: Update the converted representation of a transient object. | |
| virtual StatusCode | updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) override |
| Implementation of IConverter: Update the references of an already converted object. | |
| virtual StatusCode | addConverter (const CLID &clid) override |
| Add converter object to conversion service. | |
| virtual StatusCode | addConverter (IConverter *pConverter) override |
| Add converter object to conversion service. | |
| virtual StatusCode | removeConverter (const CLID &clid) override |
| Remove converter object from conversion service (if present). | |
| virtual IConverter * | converter (const CLID &wanted) override |
| Retrieve converter from list. | |
| virtual StatusCode | connectOutput (const std::string &outputFile, const std::string &openMode) override |
| Connect the output file to the service with open mode. | |
| virtual StatusCode | connectOutput (const std::string &output) override |
| Connect the output file to the service. | |
| virtual StatusCode | commitOutput (const std::string &output, bool do_commit) override |
| Commit pending output. | |
| virtual StatusCode | disconnectOutput (const std::string &output) |
| Disconnect output files from the service. | |
Friends | |
| class | SvcFactory< AthCnvSvc > |
@c IAddressCreator interface implementation | |
| typedef std::recursive_mutex | CallMutex |
| Mutex to protect Converter creation. | |
| SmartIF< IDataProviderSvc > | m_dataSvc |
| Pointer to data provider service. | |
| SmartIF< IAddressCreator > | m_addressCreator |
| Pointer to the address creation service interface. | |
| long | m_type |
| Conversion service type. | |
| Workers | m_workers |
| List of conversion workers. | |
| CallMutex | m_convsvc_mut |
| virtual StatusCode | createAddress (long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress) override |
| Create a Generic address using explicit arguments to identify a single object. | |
| virtual StatusCode | convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress) override |
| Convert an address to string form. | |
| virtual StatusCode | createAddress (long svc_type, const CLID &clid, const std::string &refAddress, IOpaqueAddress *&refpAddress) override |
| Convert an address in string form to object form. | |
| virtual StatusCode | updateServiceState (IOpaqueAddress *pAddress) |
| Update state of the service. | |
| AthCnvSvc () | |
| Default constructor: | |
| AthCnvSvc (const AthCnvSvc &) | |
| AthCnvSvc & | operator= (const AthCnvSvc &) |
| virtual | ~AthCnvSvc () |
| Destructor: | |
| virtual IConverter * | createConverter (long typ, const CLID &clid, const ICnvFactory *fac) |
| Create new Converter using factory. | |
| virtual StatusCode | configureConverter (long typ, const CLID &clid, IConverter *cnv) |
| Configure the new converter before initialize is called. | |
| virtual StatusCode | initializeConverter (long typ, const CLID &clid, IConverter *cnv) |
| Initialize the new converter. | |
| virtual StatusCode | activateConverter (long typ, const CLID &clid, IConverter *cnv) |
| Activate the new converter after initialization. | |
| virtual void | loadConverter (DataObject *pObject) |
| Load converter or dictionary needed by the converter. | |
| virtual SmartIF< IAddressCreator > & | addressCreator () |
| Retrieve address creation interface. | |
| 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 318 of file AthCnvSvc.h.
| typedef std::unordered_map<CLID,WorkerEntry> AthCnvSvc::Workers |
Definition at line 105 of file AthCnvSvc.h.
| AthCnvSvc::AthCnvSvc | ( | const std::string & | name, |
| ISvcLocator * | pSvcLocator, | ||
| long | type ) |
Constructor with parameters:
Definition at line 46 of file AthCnvSvc.cxx.
|
private |
Default constructor:
|
protectedvirtual |
Destructor:
Definition at line 59 of file AthCnvSvc.cxx.
|
protectedvirtual |
Activate the new converter after initialization.
Definition at line 496 of file AthCnvSvc.cxx.
Add converter object to conversion service.
Definition at line 296 of file AthCnvSvc.cxx.
|
overridevirtual |
Add converter object to conversion service.
Definition at line 325 of file AthCnvSvc.cxx.
|
inlineprotectedvirtual |
Retrieve address creation interface.
Definition at line 297 of file AthCnvSvc.h.
|
overridevirtual |
Retrieve address creator facility.
Definition at line 221 of file AthCnvSvc.cxx.
|
overridevirtual |
Commit pending output.
Definition at line 389 of file AthCnvSvc.cxx.
|
protectedvirtual |
Configure the new converter before initialize is called.
Definition at line 470 of file AthCnvSvc.cxx.
|
overridevirtual |
Connect the output file to the service.
Definition at line 382 of file AthCnvSvc.cxx.
|
overridevirtual |
Connect the output file to the service with open mode.
Definition at line 374 of file AthCnvSvc.cxx.
|
overridevirtual |
Implementation of IConverter: Get conversion service the converter is connected to.
Definition at line 196 of file AthCnvSvc.cxx.
|
overridevirtual |
Convert an address to string form.
Definition at line 419 of file AthCnvSvc.cxx.
Retrieve converter from list.
Definition at line 354 of file AthCnvSvc.cxx.
|
overridevirtual |
Convert an address in string form to object form.
Definition at line 428 of file AthCnvSvc.cxx.
|
overridevirtual |
Create a Generic address using explicit arguments to identify a single object.
Definition at line 407 of file AthCnvSvc.cxx.
|
protectedvirtual |
Create new Converter using factory.
Definition at line 451 of file AthCnvSvc.cxx.
|
overridevirtual |
Implementation of IConverter: Create the transient representation of an object.
Definition at line 233 of file AthCnvSvc.cxx.
|
overridevirtual |
Implementation of IConverter: Convert the transient object to the requested representation.
Definition at line 265 of file AthCnvSvc.cxx.
|
overridevirtual |
Implementation of IConverter: Get Data provider service.
Definition at line 176 of file AthCnvSvc.cxx.
|
virtual |
Disconnect output files from the service.
Definition at line 397 of file AthCnvSvc.cxx.
|
overridevirtual |
Implementation of IConverter: Resolve the references of the created transient object.
Definition at line 241 of file AthCnvSvc.cxx.
|
overridevirtual |
Implementation of IConverter: Resolve the references of the converted object.
Definition at line 273 of file AthCnvSvc.cxx.
|
overridevirtual |
Definition at line 107 of file AthCnvSvc.cxx.
|
overridevirtual |
Gaudi Service Implementation.
Reimplemented in MuonCalibStreamCnvSvc.
Definition at line 100 of file AthCnvSvc.cxx.
|
protectedvirtual |
Initialize the new converter.
Definition at line 485 of file AthCnvSvc.cxx.
|
protectedvirtual |
Load converter or dictionary needed by the converter.
Definition at line 507 of file AthCnvSvc.cxx.
|
protected |
Definition at line 513 of file AthCnvSvc.cxx.
Implementation of IConverter: dummy call.
Definition at line 143 of file AthCnvSvc.cxx.
Remove converter object from conversion service (if present).
Definition at line 339 of file AthCnvSvc.cxx.
|
overridevirtual |
Retrieve the class type of the data store the converter uses.
Definition at line 136 of file AthCnvSvc.cxx.
|
overridevirtual |
Set address creator facility.
Definition at line 203 of file AthCnvSvc.cxx.
|
overridevirtual |
Implementation of IConverter: Set conversion service the converter is connected to.
Definition at line 188 of file AthCnvSvc.cxx.
|
overridevirtual |
Implementation of IConverter: Set Data provider service.
| pService | Pointer to data provider service |
Definition at line 153 of file AthCnvSvc.cxx.
|
overridevirtual |
Implementation of IConverter: Update the transient object from the other representation.
Definition at line 249 of file AthCnvSvc.cxx.
|
overridevirtual |
Implementation of IConverter: Update the references of an updated transient object.
Definition at line 257 of file AthCnvSvc.cxx.
|
overridevirtual |
Implementation of IConverter: Update the converted representation of a transient object.
Definition at line 281 of file AthCnvSvc.cxx.
|
overridevirtual |
Implementation of IConverter: Update the references of an already converted object.
Definition at line 289 of file AthCnvSvc.cxx.
|
virtual |
Update state of the service.
Reimplemented in MuonCalibStreamCnvSvc.
Definition at line 439 of file AthCnvSvc.cxx.
|
friend |
Definition at line 1 of file AthCnvSvc.h.
|
protected |
Pointer to the address creation service interface.
Definition at line 312 of file AthCnvSvc.h.
|
protected |
Definition at line 319 of file AthCnvSvc.h.
|
protected |
Pointer to data provider service.
Definition at line 310 of file AthCnvSvc.h.
|
protected |
Conversion service type.
Definition at line 314 of file AthCnvSvc.h.
|
protected |
List of conversion workers.
Definition at line 316 of file AthCnvSvc.h.