| # Gaudi Framework, version v21r8 |

Home |  | Generated: 17 Mar 2010

# IConversionSvc Class Reference

`#include <GaudiKernel/IConversionSvc.h>`

Inheritance diagram for IConversionSvc:

[legend]
Collaboration diagram for IConversionSvc:

[legend]

List of all members.

## Public Types
enum | Status { CONVERSIONSVC_NO_ERROR = ICONVERSIONSVC_LAST_ERROR+1, NO_CONVERTER }
| Status code definitions. More...
## Public Member Functions
| DeclareInterfaceID (IConversionSvc, 4, 0)
| InterfaceID.
virtual StatusCode | addConverter (IConverter *pConverter)=0
| Add converter object to conversion service.
virtual StatusCode | addConverter (const CLID &clid)=0
| Add converter object to conversion service.
virtual StatusCode | removeConverter (const CLID &clid)=0
| Remove converter object from conversion service (if present).
virtual IConverter * | converter (const CLID &clid)=0
| Retrieve converter from list.
virtual StatusCode | connectOutput (const std::string &outputFile)=0
| Connect the output file to the service.
virtual StatusCode | connectOutput (const std::string &outputFile, const std::string &openMode)=0
| Connect the output file to the service with open mode.
virtual StatusCode | commitOutput (const std::string &outputFile, bool do_commit)=0
| Commit pending output.

## Detailed Description

The conversion service interface allows to:

- Add, get and remove data converters from the sercvice.
- Create objects using converters: e.g. create the transient representation of a persistent object.
- convert objects - the opposite of create: e.g. convert transient objects into the persistent representation of these objects. The objects to be converted are defined by a data selector object.
- update objects which already exist: e.g. update the existing persistent representation of objects which were read from the persistent store and should be modified. The objects to be converted are defined by a data selector object.
- Class specific aspects of the creation/update/conversion mechanism must be handled by the converters, the common aspects will be handled by the service.

Author:
  Markus Frank

Version:
  1.2

- Version 1.2 Remove createReps, updateReps - replaced by interface IConverter

Definition at line 38 of file IConversionSvc.h.

## Member Enumeration Documentation

enum IConversionSvc::Status

Status code definitions.

Enumerator:

  CONVERSIONSVC_NO_ERROR | Success.
  NO_CONVERTER | No proper converter is availible to the service.

Reimplemented from IConverter.

Definition at line 95 of file IConversionSvc.h.

    00095                {
    00097    CONVERSIONSVC_NO_ERROR = ICONVERSIONSVC_LAST_ERROR+1,
    00099    NO_CONVERTER
    00100   };

## Member Function Documentation

IConversionSvc::DeclareInterfaceID | ( | IConversionSvc | ,
|  | 4 | ,
|  | 0 |  |
| ) |  |  |

InterfaceID.

virtual StatusCode IConversionSvc::addConverter | ( | IConverter * | pConverter | ) | `[pure virtual]`

Add converter object to conversion service.

Parameters:

  | pConverter | Pointer to converter object

Returns:
  Status code indicating success or failure.

virtual StatusCode IConversionSvc::addConverter | ( | const CLID & | clid | ) | `[pure virtual]`

Add converter object to conversion service.

Parameters:

  | clid | Class ID of the converter needed

Returns:
  Status code indicating success or failure.

virtual StatusCode IConversionSvc::removeConverter | ( | const CLID & | clid | ) | `[pure virtual]`

Remove converter object from conversion service (if present).

The converter is defined by the class type of the objects created.

Parameters:

  | clid | Class ID of the converter

Returns:
  Status code indicating success or failure.

virtual IConverter* IConversionSvc::converter | ( | const CLID & | clid | ) | `[pure virtual]`

Retrieve converter from list.

Parameters:

  | clid | the clid of the converter

Returns:
  the converter corresponding to clid or 0 if non wasa found

virtual StatusCode IConversionSvc::connectOutput | ( | const std::string & | outputFile | ) | `[pure virtual]`

Connect the output file to the service.

Parameters:

  | outputFile | String containig output file

Returns:
  Status code indicating success or failure.

virtual StatusCode IConversionSvc::connectOutput | ( | const std::string & | outputFile,
|  | const std::string & | openMode |
| ) |  |  | `[pure virtual]`

Connect the output file to the service with open mode.

Parameters:

  | outputFile | String containig output file
  | openMode | String containig opening mode of the output file

Returns:
  Status code indicating success or failure.

virtual StatusCode IConversionSvc::commitOutput | ( | const std::string & | outputFile,
|  | bool | do_commit |
| ) |  |  | `[pure virtual]`

Commit pending output.

Parameters:

  | outputFile | String containig output file
  | do_commit | if true commit the output and flush eventually pending items to the database if false, discard pending buffers. Note: The possibility to commit or rollback depends on the database technology used!

Returns:
  Status code indicating success or failure.

The documentation for this class was generated from the following file:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r8/GaudiKernel/GaudiKernel/IConversionSvc.h