The Gaudi Framework  master (37c0b60a)
IConversionSvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIKERNEL_ICONVERSIONSVC_H
12 #define GAUDIKERNEL_ICONVERSIONSVC_H
13 
14 // Include files
15 #include <string>
16 
17 #include <GaudiKernel/IConverter.h>
18 
19 // Forward declarations
20 class ICnvFactory;
21 
47 class GAUDI_API IConversionSvc : virtual public IConverter {
48 public:
51 
56  virtual StatusCode addConverter( IConverter* pConverter ) = 0;
57 
62  virtual StatusCode addConverter( const CLID& clid ) = 0;
63 
69  virtual StatusCode removeConverter( const CLID& clid ) = 0;
70 
75  virtual IConverter* converter( const CLID& clid ) = 0;
76 
81  virtual StatusCode connectOutput( const std::string& outputFile ) = 0;
82 
88  virtual StatusCode connectOutput( const std::string& outputFile, const std::string& openMode ) = 0;
89 
99  virtual StatusCode commitOutput( const std::string& outputFile, bool do_commit ) = 0;
100 
102  enum class Status : StatusCode::code_t {
104  INVALID_ADDRESS = static_cast<StatusCode::code_t>( IInterface::Status::LAST_ERROR ) + 1,
106  INVALID_OBJECT,
108  NO_MEMORY,
110  BAD_STORAGE_TYPE,
112  NO_SOURCE_OBJECT,
114  NO_CONVERTER
115  };
116 };
117 
119 
120 #endif // GAUDIKERNEL_ICONVERSIONSVC_H
std::string
STL class.
IConversionSvc::commitOutput
virtual StatusCode commitOutput(const std::string &outputFile, bool do_commit)=0
Commit pending output.
IConverter
Definition: IConverter.h:68
StatusCode::code_t
unsigned long code_t
type of StatusCode value
Definition: StatusCode.h:67
IConversionSvc::removeConverter
virtual StatusCode removeConverter(const CLID &clid)=0
Remove converter object from conversion service (if present).
StatusCode
Definition: StatusCode.h:65
IConversionSvc::connectOutput
virtual StatusCode connectOutput(const std::string &outputFile, const std::string &openMode)=0
Connect the output file to the service with open mode.
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
IConversionSvc::addConverter
virtual StatusCode addConverter(IConverter *pConverter)=0
Add converter object to conversion service.
IInterface::Status::LAST_ERROR
@ LAST_ERROR
Last error.
IConverter.h
IConversionSvc::connectOutput
virtual StatusCode connectOutput(const std::string &outputFile)=0
Connect the output file to the service.
STATUSCODE_ENUM_DECL
#define STATUSCODE_ENUM_DECL(ENUM)
Declare an enum to be used as StatusCode value.
Definition: StatusCode.h:286
IConversionSvc::DeclareInterfaceID
DeclareInterfaceID(IConversionSvc, 4, 0)
InterfaceID.
IConversionSvc::converter
virtual IConverter * converter(const CLID &clid)=0
Retrieve converter from list.
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81
IConversionSvc::addConverter
virtual StatusCode addConverter(const CLID &clid)=0
Add converter object to conversion service.
IConversionSvc::Status
Status
Status code definitions.
Definition: IConversionSvc.h:102
IConversionSvc
Definition: IConversionSvc.h:47