Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
PersistencySvc.cpp
Go to the documentation of this file.
1 //====================================================================
2 // PersistencySvc.cpp
3 //--------------------------------------------------------------------
4 //
5 // Package : System ( The LHCb Offline System)
6 //
7 // Description: implementation of the PersistencySvc
8 //
9 // Author : M.Frank
10 // History :
11 // +---------+----------------------------------------------+---------
12 // | Date | Comment | Who
13 // +---------+----------------------------------------------+---------
14 // | 29/10/98| Initial version | MF
15 // +---------+----------------------------------------------+---------
16 //
17 //====================================================================
18 #define PERSISTENCYSVC_PERSISTENCYSVC_CPP
19 
20 // Interface definitions
21 #include "GaudiKernel/DataObject.h"
22 #include "GaudiKernel/IConverter.h"
27 #include "GaudiKernel/MsgStream.h"
28 #include "GaudiKernel/SmartIF.h"
30 #include "GaudiKernel/strcasecmp.h"
31 
32 // Implementation specific definitions
33 #include "PersistencySvc.h"
34 
35 // Instantiation of a static factory class used by clients to create
36 // instances of this service
38 
48 };
49 
50 StatusCode PersistencySvc::makeCall( int typ, IOpaqueAddress*& pAddress, DataObject*& pObject ) {
51  if ( m_enable ) {
52  IConversionSvc* svc = nullptr;
53  switch ( typ ) {
54  case CREATE_REP:
55  case FILL_REP_REFS:
56  case UPDATE_REP:
57  case UPDATE_REP_REFS:
58  svc = m_cnvDefault;
59  break;
60  default:
61  if ( !pAddress ) return Status::INVALID_ADDRESS;
62  svc = service( pAddress->svcType() );
63  if ( !svc ) return Status::BAD_STORAGE_TYPE;
64  break;
65  }
66 
67  StatusCode status( StatusCode::FAILURE, true );
68  switch ( typ ) {
69  case CREATE_OBJ:
70  pObject = nullptr;
71  status = svc->createObj( pAddress, pObject );
72  break;
73  case FILL_OBJ_REFS:
74  status = svc->fillObjRefs( pAddress, pObject );
75  break;
76  case UPDATE_OBJ:
77  status = svc->updateObj( pAddress, pObject );
78  break;
79  case UPDATE_OBJ_REFS:
80  status = svc->updateObjRefs( pAddress, pObject );
81  break;
82  case CREATE_REP:
83  status = svc->createRep( pObject, pAddress );
84  break;
85  case FILL_REP_REFS:
86  status = svc->fillRepRefs( pAddress, pObject );
87  break;
88  case UPDATE_REP:
89  status = svc->updateRep( pAddress, pObject );
90  break;
91  case UPDATE_REP_REFS:
92  status = svc->updateRepRefs( pAddress, pObject );
93  break;
94  default:
95  status = StatusCode::FAILURE;
96  break;
97  }
98  status.ignore();
99  return status;
100  }
101  return StatusCode::SUCCESS;
102 }
103 
106  return makeCall( CREATE_OBJ, pAddr, refpObj );
107 }
108 
111  return makeCall( FILL_OBJ_REFS, pAddr, pObj );
112 }
113 
116  return makeCall( UPDATE_OBJ, pAddr, pObj );
117 }
118 
121  return makeCall( UPDATE_OBJ_REFS, pAddr, pObj );
122 }
123 
126  return makeCall( CREATE_REP, refpAddr, pObj );
127 }
128 
131  return makeCall( FILL_REP_REFS, pAddr, pObj );
132 }
133 
136  return makeCall( UPDATE_REP, pAddr, pObj );
137 }
138 
141  return makeCall( UPDATE_REP_REFS, pAddr, pObj );
142 }
143 
146  long typ = type;
147  auto it = m_cnvServices.find( typ );
148  if ( it == m_cnvServices.end() ) {
149  IConversionSvc* s = service( type );
150  if ( s ) {
151  it = m_cnvServices.find( typ );
152  if ( it != m_cnvServices.end() ) return it->second.addrCreator();
153  }
154  static SmartIF<IAddressCreator> no_creator;
155  return no_creator;
156  }
157  return it->second.addrCreator();
158 }
159 
162  m_dataSvc = pDataSvc;
163  for ( auto& i : m_cnvServices ) { i.second.conversionSvc()->setDataProvider( m_dataSvc ).ignore(); }
164  return StatusCode( StatusCode::SUCCESS, true );
165 }
166 
169 
172  m_cnvDefault = svc;
173  return StatusCode( StatusCode::SUCCESS, true );
174 }
175 
178 
181 
184  if ( !pConverter ) return Status::NO_CONVERTER;
185  IConversionSvc* svc = service( pConverter->repSvcType() );
186  return svc ? svc->addConverter( pConverter ) : Status::BAD_STORAGE_TYPE;
187 }
188 
191  // Remove converter type from all services
192  StatusCode status = Status::NO_CONVERTER, iret = StatusCode::SUCCESS;
193  for ( auto& i : m_cnvServices ) {
194  iret = i.second.conversionSvc()->removeConverter( clid );
195  if ( iret.isSuccess() ) status = iret;
196  }
197  return status;
198 }
199 
201 IConverter* PersistencySvc::converter( const CLID& /*clid*/ ) { return nullptr; }
202 
207  [&]( Services::const_reference i ) { return i.second.service()->name() == tn.name(); } );
208  if ( it != m_cnvServices.end() ) return it->second.conversionSvc();
209 
210  auto svc = Service::service<IConversionSvc>( nam, true );
211  if ( svc && addCnvService( svc.get() ).isSuccess() ) {
212  return service( nam ); // now it is in the list
213  }
214 
215  info() << "Cannot access Conversion service:" << nam << endmsg;
216  static SmartIF<IConversionSvc> no_svc;
217  return no_svc;
218 }
219 
222  // Check wether this is already an active service
223  auto it = m_cnvServices.find( type );
224  if ( it != m_cnvServices.end() ) return it->second.conversionSvc();
225  // if not, check if the service is in the list and may be requested
226  for ( const auto& i : m_svcNames.value() ) {
227  auto& svc = service( i );
228  if ( svc && svc->repSvcType() == type ) return svc;
229  }
230  static SmartIF<IConversionSvc> no_svc;
231  return no_svc;
232 }
233 
236  if ( !servc ) return Status::BAD_STORAGE_TYPE;
237  long type = servc->repSvcType();
238  long def_typ = ( m_cnvDefault ? m_cnvDefault->repSvcType() : 0 );
239  auto it = m_cnvServices.find( type );
240  auto cnv_svc = ( it != m_cnvServices.end() ? it->second.conversionSvc() : nullptr );
241  if ( type == def_typ ) m_cnvDefault = servc;
242  if ( cnv_svc == servc ) return StatusCode::SUCCESS;
243 
244  auto iservc = make_SmartIF( servc );
245  auto icr = iservc.as<IAddressCreator>();
246  if ( icr ) {
247  auto isvc = iservc.as<IService>();
248  if ( isvc ) {
249  if ( cnv_svc ) removeCnvService( type ).ignore();
250  auto p = m_cnvServices.emplace( type, ServiceEntry( type, isvc, iservc, icr ) );
251  if ( !p.second ) {
252  info() << "Cannot add Conversion service of type " << isvc->name() << endmsg;
253  return StatusCode::FAILURE;
254  }
255  info() << "Added successfully Conversion service:" << isvc->name() << endmsg;
256  iservc->setAddressCreator( this ).ignore();
257  iservc->setDataProvider( m_dataSvc ).ignore();
258  return StatusCode::SUCCESS;
259  }
260  }
261  info() << "Cannot add Conversion service of type " << type << endmsg;
262  return StatusCode::FAILURE;
263 }
264 
267  auto it = m_cnvServices.find( svctype );
268  if ( it == m_cnvServices.end() ) return Status::BAD_STORAGE_TYPE;
269  it->second.service()->release();
270  it->second.addrCreator()->release();
271  m_cnvServices.erase( it );
272  return StatusCode::SUCCESS;
273 }
274 
277 
280  m_cnvDefault = service( type );
281  return StatusCode::SUCCESS;
282 }
283 
285 StatusCode PersistencySvc::connectOutput( const std::string& outputFile, const std::string& /* openMode */ ) {
286  return connectOutput( outputFile );
287 }
288 
291 
294 
296 StatusCode PersistencySvc::createAddress( long svc_type, const CLID& clid, const std::string* pars,
297  const unsigned long* ipars, IOpaqueAddress*& refpAddress ) {
298  refpAddress = nullptr;
299  IAddressCreator* svc = addressCreator( svc_type );
300  return svc ? svc->createAddress( svc_type, clid, pars, ipars, refpAddress ) : Status::BAD_STORAGE_TYPE;
301 }
302 
305  // Assumuption is that the Persistency service prepends a header
306  // and requests the conversion service refered to by the service
307  // type to encode the rest
308  long svc_type = 0;
309  CLID clid = 0;
310  if ( pAddress ) {
311  svc_type = pAddress->svcType();
312  clid = pAddress->clID();
313  }
314  IAddressCreator* svc = addressCreator( svc_type );
315  StatusCode status = Status::BAD_STORAGE_TYPE; // Preset error
316  refAddress.clear();
317 
318  if ( svc ) {
319  // Found service, set header
320  encodeAddrHdr( svc_type, clid, refAddress );
321  std::string address;
322  // Get rest of address from conversion service
323  status = svc->convertAddress( pAddress, address );
324  refAddress += address;
325  }
326  return status;
327 }
328 
330 StatusCode PersistencySvc::createAddress( long /* svc_type */, const CLID& /* clid */, const std::string& refAddress,
331  IOpaqueAddress*& refpAddress ) {
332  // Assumption is that the Persistency service decodes that header
333  // and requests the conversion service referred to by the service
334  // type to decode the rest
335  long new_svc_type = 0;
336  CLID new_clid = 0;
337  std::string address_trailer;
338  decodeAddrHdr( refAddress, new_svc_type, new_clid, address_trailer );
339  IAddressCreator* svc = addressCreator( new_svc_type );
340  return svc ? svc->createAddress( new_svc_type, new_clid, address_trailer, refpAddress ) : Status::BAD_STORAGE_TYPE;
341 }
342 
344 void PersistencySvc::encodeAddrHdr( long service_type, const CLID& clid, std::string& address ) const {
345  // For address header, use xml-style format of
346  // <addrhdr service_type="xxx" clid="yyy" />
347  std::stringstream stream;
348  int svctyp = service_type; // must put int into stream, not char
349  stream << "<address_header service_type=\"" << svctyp << "\" clid=\"" << clid << "\" /> ";
350  address = stream.str();
351 }
352 
354 void PersistencySvc::decodeAddrHdr( const std::string& address, long& service_type, CLID& clid,
355  std::string& address_trailer ) const {
356  // For address header, use xml-style format of
357  // <address_header service_type="xxx" clid="yyy" />
358  service_type = 0;
359  clid = 0;
360  address_trailer.clear();
361 
362  // Check for address_header tag
363  size_t pos = address.find( "<address_header" );
364  if ( std::string::npos != pos ) {
365  // Get service_type
366  pos = address.find( "service_type=\"" );
367  if ( std::string::npos != pos ) {
368  pos += 14;
369  size_t end = address.find( '"', pos );
370  if ( std::string::npos != end ) {
371  service_type = std::stol( address.substr( pos, end - pos ) );
372  // Get clid
373  pos = address.find( "clid=\"" );
374  if ( std::string::npos != pos ) {
375  pos += 6;
376  end = address.find( '\"', pos );
377  if ( std::string::npos != end ) {
378  std::istringstream str;
379  str.str( address.substr( pos, end - pos ) );
380  str >> clid;
381  // Get trailer_address
382  pos = address.find( '>' );
383  if ( pos < ( address.size() - 2 ) ) { // this means that '>' was found (pos != npos)
384  // it is before the last char
385  address_trailer = address.substr( pos + 1 );
386  }
387  }
388  }
389  }
390  }
391  }
392 }
393 
396  // The persistency service is a address creation dispatcher istelf.
397  // The persistency service can NEVER create addresses itself.
398  // The entry point must only be provided in order to fulfill the needs of the
399  // implementing interfaces.
400  return StatusCode::FAILURE;
401 }
402 
405 
407 StatusCode PersistencySvc::getService( long service_type, IConversionSvc*& refpSvc ) {
408  refpSvc = service( service_type );
409  return refpSvc ? StatusCode::SUCCESS : StatusCode::FAILURE;
410 }
411 
414  const char* imp = service_type.c_str();
415  long len = service_type.length();
416  if ( ::strncasecmp( imp, "SICB", len ) == 0 )
417  return getService( SICB_StorageType, refpSvc );
418  else if ( ::strncasecmp( imp, "ZEBRA", len ) == 0 )
419  return getService( SICB_StorageType, refpSvc );
420  else if ( ::strncasecmp( imp, "MS Access", len ) == 0 )
421  return getService( ACCESS_StorageType, refpSvc );
422  else if ( ::strncasecmp( imp, "Microsoft Access", strlen( "Microsoft Access" ) ) == 0 )
423  return getService( ACCESS_StorageType, refpSvc );
424  else if ( ::strncasecmp( imp, "SQL Server", len ) == 0 )
425  return getService( SQLSERVER_StorageType, refpSvc );
426  else if ( ::strncasecmp( imp, "Microsoft ODBC for Oracle", len ) == 0 )
427  return getService( ORACLE_StorageType, refpSvc );
428  else if ( ::strncasecmp( imp, "Oracle ODBC", strlen( "Oracle ODBC" ) ) == 0 )
429  return getService( ORACLE_StorageType, refpSvc );
430  else if ( ::strncasecmp( imp, "Oracle OCI", strlen( "Oracle OCI" ) ) == 0 )
431  return getService( ORACLE_StorageType, refpSvc );
432  else if ( ::strncasecmp( imp, "MySQL", len ) == 0 )
433  return getService( MYSQL_StorageType, refpSvc );
434  else if ( ::strncasecmp( imp, "ROOT", len ) == 0 )
435  return getService( ROOT_StorageType, refpSvc );
436  else if ( ::strncasecmp( imp, "OBJY", len ) == 0 )
437  return getService( OBJY_StorageType, refpSvc );
438  else if ( ::strncasecmp( imp, "OBJYECTI", 7 ) == 0 )
439  return getService( OBJY_StorageType, refpSvc );
440  else if ( ::strncasecmp( imp, "POOL_ROOTKEY", 12 ) == 0 )
441  return getService( POOL_ROOTKEY_StorageType, refpSvc );
442  else if ( ::strncasecmp( imp, "POOL_ROOTTREE", 12 ) == 0 )
443  return getService( POOL_ROOTTREE_StorageType, refpSvc );
444  else if ( ::strncasecmp( imp, "POOL_ROOT", 9 ) == 0 )
445  return getService( POOL_ROOT_StorageType, refpSvc );
446  else if ( ::strncasecmp( imp, "POOL_MySQL", 8 ) == 0 )
447  return getService( POOL_MYSQL_StorageType, refpSvc );
448  else if ( ::strncasecmp( imp, "POOL_ORACLE", 8 ) == 0 )
449  return getService( POOL_ORACLE_StorageType, refpSvc );
450  else if ( ::strncasecmp( imp, "POOL_ACCESS", 8 ) == 0 )
451  return getService( POOL_ACCESS_StorageType, refpSvc );
452  else if ( ::strncasecmp( imp, "POOL", 4 ) == 0 )
453  return getService( POOL_StorageType, refpSvc );
454 
455  for ( const auto& i : m_cnvServices ) {
456  SmartIF<IService> svc( i.second.conversionSvc() );
457  if ( svc ) {
458  // Check wether this is already an active service: first check by service name
459  if ( svc->name() == service_type ) {
460  refpSvc = i.second.conversionSvc();
461  return StatusCode::SUCCESS;
462  }
463  // Check wether this is already an active service: now check by service type
464  auto instance = svc.get();
465  if ( System::typeinfoName( typeid( *instance ) ) == service_type ) {
466  refpSvc = i.second.conversionSvc();
467  return StatusCode::SUCCESS;
468  }
469  }
470  }
471  // if not, check if the service is in the list and may be requested
472  for ( const auto& i : m_svcNames.value() ) {
474  if ( itm.name() == service_type || itm.type() == service_type ) {
475  IConversionSvc* svc = service( i );
476  if ( svc ) {
477  refpSvc = svc;
478  return StatusCode::SUCCESS;
479  }
480  }
481  }
482  return StatusCode::FAILURE;
483 }
484 
486 const CLID& PersistencySvc::objType() const { return CLID_NULL; }
487 
490  m_addrCreator = this; // initialize internal pointer to IAddressCreator interface
491  // Initialize basic service
492  StatusCode status = Service::initialize();
493  if ( UNLIKELY( !status.isSuccess() ) ) { error() << "Error initializing Service base class." << endmsg; }
494  return status;
495 }
496 
499  // Release all workers
501  // Release references to this to avoid loops
502  m_addrCreator = nullptr;
503  return StatusCode::SUCCESS;
504 }
505 
507 bool PersistencySvc::enable( bool value ) {
508  std::swap( value, m_enable );
509  return value;
510 }
SmartIF< IAddressCreator > m_addrCreator
Pointer to the IAddressCreator interface of this, for addressCreator().
#define UNLIKELY(x)
Definition: Kernel.h:89
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
SmartIF< IConversionSvc > & conversionSvc() const
SmartIF< IAddressCreator > & addressCreator() const override
Retrieve address creator facility.
StatusCode initialize() override
Definition: Service.cpp:60
SmartIF< IAddressCreator > & addrCreator() const
The data converters are responsible to translate data from one representation into another...
Definition: IConverter.h:58
virtual const CLID & clID() const =0
Retrieve class information from link.
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject)=0
Create the transient representation of an object.
StatusCode initialize() override
Initialize the service.
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
StatusCode connectOutput(const std::string &outputFile, const std::string &openMode) override
Connect the output file to the service with open mode.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:309
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ipar, IOpaqueAddress *&refpAddress)=0
Create a Generic address using explicit arguments to identify a single object.
T swap(T...args)
Gaudi::Property< std::vector< std::string > > m_svcNames
bool isSuccess() const
Definition: StatusCode.h:267
const long ACCESS_StorageType
Definition: ClassID.h:60
IAddressCreator interface definition.
SmartIF< IService > & service() const
bool m_enable
Flag to indicate that the service is enabled.
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
StatusCode setConversionSvc(IConversionSvc *svc) override
Set conversion service the converter is connected to.
virtual StatusCode addConverter(IConverter *pConverter)=0
Add converter object to conversion service.
StatusCode makeCall(int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
Implementation helper.
T end(T...args)
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)=0
Convert the transient object to the requested representation.
const long MYSQL_StorageType
Definition: ClassID.h:64
Data provider interface definition.
StatusCode removeConverter(const CLID &clid) override
Remove converter object from conversion service (if present).
virtual StatusCode updateRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the references of an already converted object.
const long POOL_MYSQL_StorageType
Definition: ClassID.h:72
StatusCode updateRep(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Update the converted representation of a transient object.
StatusCode updateObjRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Update the references of an updated transient object.
StatusCode addConverter(IConverter *pConverter) override
Add converter object to conversion service.
virtual StatusCode updateObj(IOpaqueAddress *pAddress, DataObject *refpObject)=0
Update the transient object from the other representation.
StatusCode convertAddress(const IOpaqueAddress *pAddress, std::string &refAddress) override
Convert an address to string form.
STL class.
const long POOL_ROOTKEY_StorageType
Definition: ClassID.h:69
#define DECLARE_COMPONENT(type)
StatusCode fillObjRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Resolve the references of the created transient object.
bool enable(bool value)
Set enabled flag.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
StatusCode setDataProvider(IDataProviderSvc *pStore) override
Define transient datastore.
const long POOL_ACCESS_StorageType
Definition: ClassID.h:71
Helper class to parse a string of format "type/name".
void encodeAddrHdr(long service_type, const CLID &clid, std::string &address) const
Retrieve string from storage type and clid.
General service interface definition.
Definition: IService.h:18
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
StatusCode finalize() override
stop the service.
virtual StatusCode updateObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the references of an updated transient object.
StatusCode getService(long service_type, IConversionSvc *&refpSvc) override
Retrieve conversion service identified by technology.
T erase(T...args)
CnvSvcAction
const long POOL_ORACLE_StorageType
Definition: ClassID.h:73
SmartIF< IConversionSvc > m_cnvDefault
Default output service.
StatusCode commitOutput(const std::string &output, bool do_commit) override
Commit pending output.
T str(T...args)
PersistencySvc class implementation definition.
const long ROOT_StorageType
Definition: ClassID.h:52
StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Resolve the references of the converted object.
SmartIF< IConversionSvc > & conversionSvc() const override
Get conversion service the converter is connected to.
virtual long svcType() const =0
Retrieve service type.
SmartIF< IDataProviderSvc > & dataProvider() const override
Access reference to transient datastore.
virtual StatusCode updateRep(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the converted representation of a transient object.
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
T clear(T...args)
const long ORACLE_StorageType
Definition: ClassID.h:65
const long POOL_ROOT_StorageType
Definition: ClassID.h:68
StatusCode addCnvService(IConversionSvc *service) override
Add a new Service.
StatusCode removeCnvService(long type) override
Remove a Service.
StatusCode updateObj(IOpaqueAddress *pAddress, DataObject *refpObject) override
Implementation of IConverter: Update the transient object from the other representation.
StatusCode createAddress(long svc_type, const CLID &clid, const std::string *pars, const unsigned long *ipars, IOpaqueAddress *&refpAddress) override
Create a Generic address using explicit arguments to identify a single object.
const long POOL_StorageType
Definition: ClassID.h:67
T find(T...args)
T size(T...args)
virtual StatusCode fillObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the created transient object.
virtual long repSvcType() const =0
Retrieve the class type of the data store the converter uses.
const long POOL_ROOTTREE_StorageType
Definition: ClassID.h:70
virtual StatusCode convertAddress(const IOpaqueAddress *pAddress, std::string &refAddress)=0
Convert an address to string form.
T begin(T...args)
StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject) override
Implementation of IConverter: Create the transient representation of an object.
const std::string & type() const
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:153
T c_str(T...args)
Services m_cnvServices
List of convermsion workers.
T emplace(T...args)
string s
Definition: gaudirun.py:312
constexpr static const auto FAILURE
Definition: StatusCode.h:86
StatusCode setAddressCreator(IAddressCreator *creator) override
Set address creator facility.
T substr(T...args)
SmartIF< IFace > make_SmartIF(IFace *iface)
Definition: SmartIF.h:140
void decodeAddrHdr(const std::string &address, long &service_type, CLID &clid, std::string &address_trailer) const
Retrieve storage type and clid from address header of string.
const long SQLSERVER_StorageType
Definition: ClassID.h:63
const std::string & name() const
virtual SmartIF< IConversionSvc > & conversionSvc() const =0
Get conversion service the converter is connected to.
Opaque address interface definition.
const long OBJY_StorageType
Definition: ClassID.h:53
StatusCode setDefaultCnvService(long type) override
Set default service type.
const long SICB_StorageType
Definition: ClassID.h:51
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
const CLID & objType() const override
Retrieve the class type of objects the converter produces. (DUMMY)
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the converted object.
StatusCode updateRepRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Update the references of an already converted object.
T stol(T...args)
long repSvcType() const override
Return default service type.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to datma provider service.
IConverter * converter(const CLID &clid) override
Retrieve converter from list.