class IConverter : public IInterface

Converter interface definition

Inheritance:


Public

Services
virtual StatusCode initialize() throw(exception)
Initialize the converter
virtual const Class* getObjDataType()
Retrieve the class type of objects the converter produces
virtual unsigned char getRepSvcType() throw(exception)
Retrieve the class type of the data store the converter uses
virtual StatusCode createObj(IOpaqueAddress* pAddress, DataObject*& refpObject) throw(exception)
Create the transient representation of an object
virtual StatusCode fillObjRefs(DataObject* pObject) throw(exception)
Resolve the references of the created transient object
virtual StatusCode updateObj(IOpaqueAddress* pAddress, DataObject* refpObject) throw(exception)
Update the transient object from the other representation
virtual StatusCode updateObjRefs(DataObject* pObject) throw(exception)
Update the references of an updated transient object
virtual StatusCode createRep(DataObject* pObject, IOpaqueAddress*& refpAddress) throw(exception)
Convert the transient object to the requested representation
virtual StatusCode fillRepRefs(IOpaqueAddress* pAddress, DataObject* pObject) throw(exception)
Resolve the references of the converted object
virtual StatusCode updateRep(IOpaqueAddress* pAddress, DataObject* pObject) throw(exception)
Update the converted representation of a transient object
virtual StatusCode updateRepRefs(IOpaqueAddress* pAddress, DataObject* pObject) throw(exception)
Update the references of an already converted object
Status codes
enum Status
Status code
NO_ERROR
Success
INVALID_ADDRESS
Invalid address information
NO_MEMORY
No more memory availible
NO_SOURCE_OBJECT
Error retrieving source data from source store

Documentation

Converter interface definition.

System: The LHCb Offline System

Package: Converter

Purpose and functionality of data converters

The data converters are reposible to translate data from one representation into another. Concrete examples are e.g. converters creating transient objects representing parts of an event from the persistent (and disk based) representations. Converters will have to deal with the technology both representations are based on: in the upper example they have to know about the database internals as well as the structure of the transient representations. The converters know about the mechanism to retrieve persistent objects (ZEBRA, Objty, ) and only pass abstract instances of the converted objects, hence shielding the calling service from internals.

Data converters are meant to be light. This means there should not be all-in-one converters, which are able to convert the "world", but rather many converters. Each converter is then able to create a representation of a given type.

In order to function a converter must be able to

The interface should cover the entry points of concrete converter instances in order to serve conversion requests.

Dependencies:

History:
+---------+----------------------------------------------+---------+
|    Date |                 Comment                      | Who     |
+---------+----------------------------------------------+---------+
| 3/11/98 | Initial version                              | M.Frank |
+---------+----------------------------------------------+---------+
Services

virtual StatusCode initialize() throw(exception)
Initialize the converter
Throws:
exception (STL standard) in case of fatal errors
Returns:
Status code indicating success or failure

virtual const Class* getObjDataType()
Retrieve the class type of objects the converter produces
Returns:
Class type of the created object.

virtual unsigned char getRepSvcType() throw(exception)
Retrieve the class type of the data store the converter uses
Returns:
Class type information about the source data store type the converter will use to retrieve the information.

virtual StatusCode createObj(IOpaqueAddress* pAddress, DataObject*& refpObject) throw(exception)
Create the transient representation of an object. The transient representation is created by loading the persistent object using the source information contained in the address.
Throws:
exception (STL standard) in case of fatal errors
Returns:
Status code indicating success or failure
Parameters:
pAddress - Opaque address information to retrieve the requested object from the store in order to produce the transient object.
refpObject - Reference to location of pointer of the created object.

virtual StatusCode fillObjRefs(DataObject* pObject) throw(exception)
Resolve the references of the created transient object. After the object creation references of the objects pointing to objects outside its scope will have to be filled. The actual objects will not be loaded, but the recipe to load them will be present.
Throws:
exception (STL standard) in case of fatal errors
Returns:
Status code indicating success or failure
Parameters:
pObject - Pointer to location of the object

virtual StatusCode updateObj(IOpaqueAddress* pAddress, DataObject* refpObject) throw(exception)
Update the transient object from the other representation. The transient representation will be updated by loading the persistent object using the source information contained in the address and then refill transient data.
Throws:
exception (STL standard) in case of fatal errors
Returns:
Status code indicating success or failure
Parameters:
pAddress - Opaque address information to retrieve the requested object from the store in order to produce the transient object.
pObject - Pointer to the object to be updated.

virtual StatusCode updateObjRefs(DataObject* pObject) throw(exception)
Update the references of an updated transient object. After the object was updated alse the references of the objects pointing to objects outside its scope will have to be filled. The actual pointers to objects will only be filled if already present. Otherwise only the recipe to load them will be present.
Throws:
exception (STL standard) in case of fatal errors
Returns:
Status code indicating success or failure
Parameters:
pObject - Pointer to location of the object

virtual StatusCode createRep(DataObject* pObject, IOpaqueAddress*& refpAddress) throw(exception)
Convert the transient object to the requested representation. e.g. conversion to persistent objects.
Throws:
exception (STL standard) in case of fatal errors
Returns:
Status code indicating success or failure
Parameters:
pObject - Pointer to location of the object
refpAddress - Reference to location of pointer with the object address.

virtual StatusCode fillRepRefs(IOpaqueAddress* pAddress, DataObject* pObject) throw(exception)
Resolve the references of the converted object. After the requested representation was created the references in this representation must be resolved.
Throws:
exception (STL standard) in case of fatal errors
Returns:
Status code indicating success or failure
Parameters:
pObject - Pointer to location of the object

virtual StatusCode updateRep(IOpaqueAddress* pAddress, DataObject* pObject) throw(exception)
Update the converted representation of a transient object
Throws:
exception (STL standard) in case of fatal errors
Returns:
Status code indicating success or failure
Parameters:
pObject - Pointer to location of the object
refpAddress - Reference to location of pointer with the object address.

virtual StatusCode updateRepRefs(IOpaqueAddress* pAddress, DataObject* pObject) throw(exception)
Update the references of an already converted object. The object must be retrieved before it can be updated.
Throws:
exception (STL standard) in case of fatal errors
Returns:
Status code indicating success or failure
Parameters:
pAddress - Pointer to location of object address with the store.
pObject - Pointer to location of the object

Status codes

enum Status
Status code

NO_ERROR
Success

INVALID_ADDRESS
Invalid address information

NO_MEMORY
No more memory availible

NO_SOURCE_OBJECT
Error retrieving source data from source store


This class has no child classes.
Author:
Markus Frank
Version:
1.0


The New Software