ATLAS Offline Software
Classes | Public Types | Public Member Functions | Friends | List of all members
AthCnvSvc Class Reference

#include <AthenaBaseComps/AthCnvSvc.h>

Inheritance diagram for AthCnvSvc:
Collaboration diagram for AthCnvSvc:

Classes

class  WorkerEntry
 

Public Types

typedef std::unordered_map< CLID, WorkerEntryWorkers
 

Public Member Functions

 AthCnvSvc (const std::string &name, ISvcLocator *pSvcLocator, long type)
 Constructor with parameters: More...
 
virtual StatusCode initialize () override
 Gaudi Service Implementation. More...
 
virtual StatusCode finalize () override
 

Friends

class SvcFactory< AthCnvSvc >
 

@c IAddressCreator interface implementation

typedef std::recursive_mutex CallMutex
 Mutex to protect Converter creation. More...
 
SmartIF< IDataProviderSvc > m_dataSvc
 Pointer to data provider service. More...
 
SmartIF< IAddressCreator > m_addressCreator
 Pointer to the address creation service interface. More...
 
SmartIF< IConversionSvc > m_cnvSvc
 Pointer to the IConversionSvc interface of this. More...
 
long m_type
 Conversion service type. More...
 
Workers m_workers
 List of conversion workers. More...
 
CallMutex m_conv_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. More...
 
virtual StatusCode convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress) override
 Convert an address to string form. More...
 
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. More...
 
virtual StatusCode updateServiceState (IOpaqueAddress *pAddress)
 Update state of the service. More...
 
 AthCnvSvc ()
 Default constructor: More...
 
 AthCnvSvc (const AthCnvSvc &)
 
AthCnvSvcoperator= (const AthCnvSvc &)
 
virtual ~AthCnvSvc ()
 Destructor: More...
 
virtual IConverter * createConverter (long typ, const CLID &clid, const ICnvFactory *fac)
 Create new Converter using factory. More...
 
virtual StatusCode configureConverter (long typ, const CLID &clid, IConverter *cnv)
 Configure the new converter before initialize is called. More...
 
virtual StatusCode initializeConverter (long typ, const CLID &clid, IConverter *cnv)
 Initialize the new converter. More...
 
virtual StatusCode activateConverter (long typ, const CLID &clid, IConverter *cnv)
 Activate the new converter after initialization. More...
 
virtual void loadConverter (DataObject *pObject)
 Load converter or dictionary needed by the converter. More...
 
virtual SmartIF< IAddressCreator > & addressCreator ()
 Retrieve address creation interface. More...
 
StatusCode makeCall (int typ, bool ignore_add, bool ignore_obj, bool update, IOpaqueAddress *&pAddress, DataObject *&pObject)
 

Detailed Description

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.

Author
Markus Frank
Version
1.0

Definition at line 63 of file AthCnvSvc.h.

Member Typedef Documentation

◆ CallMutex

typedef std::recursive_mutex AthCnvSvc::CallMutex
protected

Mutex to protect Converter creation.

Definition at line 320 of file AthCnvSvc.h.

◆ Workers

typedef std::unordered_map<CLID,WorkerEntry> AthCnvSvc::Workers

Definition at line 105 of file AthCnvSvc.h.

Constructor & Destructor Documentation

◆ AthCnvSvc() [1/3]

AthCnvSvc::AthCnvSvc ( const std::string &  name,
ISvcLocator *  pSvcLocator,
long  type 
)

Constructor with parameters:

Definition at line 46 of file AthCnvSvc.cxx.

48  :
49  base_class (name, pSvcLocator),
50  m_dataSvc (0),
52  m_type (type),
53  m_workers ( )
54 {
55 }

◆ AthCnvSvc() [2/3]

AthCnvSvc::AthCnvSvc ( )
private

Default constructor:

◆ AthCnvSvc() [3/3]

AthCnvSvc::AthCnvSvc ( const AthCnvSvc )
private

◆ ~AthCnvSvc()

AthCnvSvc::~AthCnvSvc ( )
protectedvirtual

Destructor:

Definition at line 59 of file AthCnvSvc.cxx.

60 {
61  // the following is hopefully (!) temporary hack to prevent deleting
62  // services we hold a reference count to.
63  // the problem is that these references might point back to us (so we
64  // end up recursively calling the d-tor) or be double-deleted later on
65  // by the ServiceManager.
66  // the correct fix is to have everybody use SmartIF<T> all over the code...
67  //
68  // "temporary hack" ha ha! (CGL 5/2014)
69  //
70  if (m_cnvSvc) {
71  m_cnvSvc->addRef();
72  m_cnvSvc = 0;
73  }
74  if (m_addressCreator) {
75  m_addressCreator->addRef();
76  m_addressCreator = 0;
77  }
78  if (m_dataSvc) {
79  m_dataSvc->addRef();
80  m_dataSvc = 0;
81  }
82 
83  ATH_MSG_DEBUG ("release-ing all workers (" << m_workers.size() << ")...");
84  for ( Workers::iterator
85  i = m_workers.begin(),
86  iend = m_workers.end();
87  i != iend;
88  ++i ) {
89  IConverter *cnv = i->second.m_converter;
90  if (cnv) {
91 
92  if (!cnv->release()) {
93  i->second.m_converter = 0;
94  }
95  }
96  }
97  ATH_MSG_DEBUG ("release-ing all workers (" << m_workers.size() << ")... [done]");
98  m_workers.clear();
99 
100 }

Member Function Documentation

◆ activateConverter()

StatusCode AthCnvSvc::activateConverter ( long  typ,
const CLID clid,
IConverter *  cnv 
)
protectedvirtual

Activate the new converter after initialization.

Definition at line 507 of file AthCnvSvc.cxx.

509 {
510  if (cnv) {
511  return StatusCode::SUCCESS;
512  }
513  return Status::NO_CONVERTER;
514 }

◆ addConverter() [1/2]

StatusCode AthCnvSvc::addConverter ( const CLID clid)
overridevirtual

Add converter object to conversion service.

Definition at line 307 of file AthCnvSvc.cxx.

308 {
309  // First look for the more specific converter
310  long typ = repSvcType();
311  IConverter* pConverter = createConverter(typ, clid, 0);
312  if ( 0 != pConverter ) {
313  StatusCode status = configureConverter( typ, clid, pConverter );
314  if ( status.isSuccess() ) {
315  status = initializeConverter( typ, clid, pConverter );
316  if ( status.isSuccess() ) {
317  status = activateConverter( typ, clid, pConverter );
318  if ( status.isSuccess() ) {
319  long conv_typ = pConverter->repSvcType();
320  const CLID& conv_clid = pConverter->objType();
321  typ = (typ<0xFF) ? typ : typ&0xFFFFFF00;
322  conv_typ = (conv_typ<0xFF) ? conv_typ : conv_typ&0xFFFFFF00;
323  if ( conv_typ == typ && conv_clid == clid ) {
324  return addConverter(pConverter);
325  }
326  }
327  }
328  }
329  pConverter->release();
330  }
331  return Status::NO_CONVERTER;
332 }

◆ addConverter() [2/2]

StatusCode AthCnvSvc::addConverter ( IConverter *  pConverter)
overridevirtual

Add converter object to conversion service.

Definition at line 336 of file AthCnvSvc.cxx.

337 {
338  if ( 0 != pConverter ) {
339  const CLID& clid = pConverter->objType();
340  removeConverter(clid).ignore();
341  m_workers.insert (std::make_pair(clid,WorkerEntry(clid, pConverter)));
342  pConverter->addRef();
343  return StatusCode::SUCCESS;
344  }
345  return Status::NO_CONVERTER;
346 }

◆ addressCreator() [1/2]

virtual SmartIF<IAddressCreator>& AthCnvSvc::addressCreator ( )
inlineprotectedvirtual

Retrieve address creation interface.

Definition at line 297 of file AthCnvSvc.h.

298  {
299  return m_addressCreator;
300  }

◆ addressCreator() [2/2]

SmartIF< IAddressCreator > & AthCnvSvc::addressCreator ( ) const
overridevirtual

Retrieve address creator facility.

Definition at line 232 of file AthCnvSvc.cxx.

233 {
234  // FIXME: Ideally the return type should be const, but that would require
235  // changes in the Gaudi IConverter base class.
236  SmartIF<IAddressCreator>& svc ATLAS_THREAD_SAFE =
237  const_cast<SmartIF<IAddressCreator>&>(m_addressCreator);
238  return svc;
239 }

◆ commitOutput()

StatusCode AthCnvSvc::commitOutput ( const std::string &  output,
bool  do_commit 
)
overridevirtual

Commit pending output.

Definition at line 400 of file AthCnvSvc.cxx.

401 {
402  return StatusCode::SUCCESS;
403 }

◆ configureConverter()

StatusCode AthCnvSvc::configureConverter ( long  typ,
const CLID clid,
IConverter *  cnv 
)
protectedvirtual

Configure the new converter before initialize is called.

Definition at line 481 of file AthCnvSvc.cxx.

483 {
484  if (cnv) {
485  cnv->setConversionSvc(this).ignore();
486  cnv->setAddressCreator(m_addressCreator).ignore();
487  cnv->setDataProvider(m_dataSvc).ignore();
488  return StatusCode::SUCCESS;
489  }
490  return Status::NO_CONVERTER;
491 
492 }

◆ connectOutput() [1/2]

StatusCode AthCnvSvc::connectOutput ( const std::string &  output)
overridevirtual

Connect the output file to the service.

Definition at line 393 of file AthCnvSvc.cxx.

394 {
395  return StatusCode::SUCCESS;
396 }

◆ connectOutput() [2/2]

StatusCode AthCnvSvc::connectOutput ( const std::string &  outputFile,
const std::string &  openMode 
)
overridevirtual

Connect the output file to the service with open mode.

Definition at line 385 of file AthCnvSvc.cxx.

387 {
388  return connectOutput (outputFile);
389 }

◆ conversionSvc()

SmartIF< IConversionSvc > & AthCnvSvc::conversionSvc ( ) const
overridevirtual

Implementation of IConverter: Get conversion service the converter is connected to.

Definition at line 203 of file AthCnvSvc.cxx.

204 {
205  // FIXME: Ideally the return type should be const, but that would require
206  // changes in the Gaudi IConverter base class.
207  SmartIF<IConversionSvc>& svc ATLAS_THREAD_SAFE =
208  const_cast<SmartIF<IConversionSvc>&>(m_cnvSvc);
209  return svc;
210 }

◆ convertAddress()

StatusCode AthCnvSvc::convertAddress ( const IOpaqueAddress *  pAddress,
std::string &  refAddress 
)
overridevirtual

Convert an address to string form.

Definition at line 430 of file AthCnvSvc.cxx.

432 {
433  refAddress = "";
434  return StatusCode::FAILURE;
435 }

◆ converter()

IConverter * AthCnvSvc::converter ( const CLID wanted)
overridevirtual

Retrieve converter from list.

Definition at line 365 of file AthCnvSvc.cxx.

366 {
367  std::lock_guard<CallMutex> lock(m_conv_mut);
368  Workers::iterator worker = m_workers.find (clid);
369  if ( worker != m_workers.end() ) {
370  return worker->second.converter();
371  }
372  if (addConverter (clid).isSuccess()) {
373  worker = m_workers.find (clid);
374  if (worker != m_workers.end()) {
375  return worker->second.converter();
376  }
377  } else {
378  ATH_MSG_INFO("problem adding converter for CLID [" << clid << "]");
379  }
380  return 0;
381 }

◆ createAddress() [1/2]

StatusCode AthCnvSvc::createAddress ( long  svc_type,
const CLID clid,
const std::string &  refAddress,
IOpaqueAddress *&  refpAddress 
)
overridevirtual

Convert an address in string form to object form.

Definition at line 439 of file AthCnvSvc.cxx.

443 {
444  refpAddress = 0;
445  return StatusCode::FAILURE;
446 }

◆ createAddress() [2/2]

StatusCode AthCnvSvc::createAddress ( long  svc_type,
const CLID clid,
const std::string *  par,
const unsigned long *  ip,
IOpaqueAddress *&  refpAddress 
)
overridevirtual

Create a Generic address using explicit arguments to identify a single object.

Definition at line 418 of file AthCnvSvc.cxx.

423 {
424  refpAddress = 0;
425  return StatusCode::FAILURE;
426 }

◆ createConverter()

IConverter * AthCnvSvc::createConverter ( long  typ,
const CLID clid,
const ICnvFactory *  fac 
)
protectedvirtual

Create new Converter using factory.

Definition at line 462 of file AthCnvSvc.cxx.

465 {
466 
467  std::unique_ptr<IConverter> cnv{Converter::Factory::create
468  (ConverterID(typ,clid), serviceLocator().get() )};
469 
470  if (!cnv) {
471  typ = (typ<0xFF) ? typ : typ&0xFFFFFF00;
472  cnv = Converter::Factory::create
473  (ConverterID(typ,clid), serviceLocator().get() );
474  }
475  return cnv.release();
476 
477 }

◆ createObj()

StatusCode AthCnvSvc::createObj ( IOpaqueAddress *  pAddress,
DataObject *&  refpObject 
)
overridevirtual

Implementation of IConverter: Create the transient representation of an object.

Definition at line 244 of file AthCnvSvc.cxx.

245 {
246  return makeCall (CREATE_OBJ, false, true, false, pAddress, refpObject);
247 }

◆ createRep()

StatusCode AthCnvSvc::createRep ( DataObject *  pObject,
IOpaqueAddress *&  refpAddress 
)
overridevirtual

Implementation of IConverter: Convert the transient object to the requested representation.

Definition at line 276 of file AthCnvSvc.cxx.

277 {
278  return makeCall (CREATE_REP, true, false, false, refpAddress, pObject);
279 }

◆ dataProvider()

SmartIF< IDataProviderSvc > & AthCnvSvc::dataProvider ( ) const
overridevirtual

Implementation of IConverter: Get Data provider service.

Returns
Pointer to data provider service

Definition at line 183 of file AthCnvSvc.cxx.

184 {
185  // FIXME: Ideally the return type should be const, but that would require
186  // changes in the Gaudi IConverter base class.
187  SmartIF<IDataProviderSvc>& svc ATLAS_THREAD_SAFE =
188  const_cast<SmartIF<IDataProviderSvc>&>(m_dataSvc);
189  return svc;
190 }

◆ disconnectOutput()

StatusCode AthCnvSvc::disconnectOutput ( const std::string &  output)
virtual

Disconnect output files from the service.

Definition at line 408 of file AthCnvSvc.cxx.

409 {
410  return StatusCode::SUCCESS;
411 }

◆ fillObjRefs()

StatusCode AthCnvSvc::fillObjRefs ( IOpaqueAddress *  pAddress,
DataObject *  pObject 
)
overridevirtual

Implementation of IConverter: Resolve the references of the created transient object.

Definition at line 252 of file AthCnvSvc.cxx.

253 {
254  return makeCall (FILL_OBJ_REFS, false, true, true, pAddress, pObject);
255 }

◆ fillRepRefs()

StatusCode AthCnvSvc::fillRepRefs ( IOpaqueAddress *  pAddress,
DataObject *  pObject 
)
overridevirtual

Implementation of IConverter: Resolve the references of the converted object.


Definition at line 284 of file AthCnvSvc.cxx.

285 {
286  return makeCall (FILL_REP_REFS, true, false, false, pAddress, pObject);
287 }

◆ finalize()

StatusCode AthCnvSvc::finalize ( )
overridevirtual

Definition at line 112 of file AthCnvSvc.cxx.

113 {
114  ATH_MSG_DEBUG ("releasing all workers");
115  for ( Workers::iterator
116  i = m_workers.begin(),
117  iend = m_workers.end();
118  i != iend;
119  ++i ) {
120  if (!i->second.converter()->finalize().isSuccess()) {
121  ATH_MSG_ERROR ("finalizing worker w/ clid=[" << i->first << "]");
122  }
123  i->second.converter()->release();
124  }
125  //m_workers.clear();
126  Workers().swap (m_workers);
127 
128  if (m_addressCreator) m_addressCreator->addRef();
129  if (m_dataSvc) m_dataSvc->addRef();
130  if (m_cnvSvc) m_cnvSvc->addRef();
131 
132  m_addressCreator = 0;
133  m_dataSvc = 0;
134  m_cnvSvc = 0;
135 
136  return StatusCode::SUCCESS;
137 }

◆ initialize()

StatusCode AthCnvSvc::initialize ( )
overridevirtual

Gaudi Service Implementation.

Reimplemented in MuonCalibStreamCnvSvc.

Definition at line 104 of file AthCnvSvc.cxx.

105 {
106  m_cnvSvc = this; // needed for conversionSvc()
108 
109  return StatusCode::SUCCESS;
110 }

◆ initializeConverter()

StatusCode AthCnvSvc::initializeConverter ( long  typ,
const CLID clid,
IConverter *  cnv 
)
protectedvirtual

Initialize the new converter.

Definition at line 496 of file AthCnvSvc.cxx.

498 {
499  if (cnv) {
500  return cnv->initialize();
501  }
502  return Status::NO_CONVERTER;
503 }

◆ loadConverter()

void AthCnvSvc::loadConverter ( DataObject *  pObject)
protectedvirtual

Load converter or dictionary needed by the converter.

Definition at line 518 of file AthCnvSvc.cxx.

519 {
520 }

◆ makeCall()

StatusCode AthCnvSvc::makeCall ( int  typ,
bool  ignore_add,
bool  ignore_obj,
bool  update,
IOpaqueAddress *&  pAddress,
DataObject *&  pObject 
)
protected

Definition at line 524 of file AthCnvSvc.cxx.

530 {
531  if ( 0 != pAddress || ignore_add ) {
532  if ( 0 != pObject || ignore_obj ) {
533  const CLID& obj_class =
534  (0 != pObject && !ignore_obj) ? pObject->clID()
535  : (0 != pAddress && !ignore_add)
536  ? pAddress->clID()
537  : CLID_NULL;
538  IConverter* cnv = converter(obj_class);
539  if ( !cnv && pObject ) {
540  //Give it a try to autoload the class (dictionary) for which the converter is needed
541  loadConverter( pObject);
542  cnv = converter(obj_class);
543  }
544 
545  StatusCode status(StatusCode::FAILURE);
546  if ( 0 != cnv ) {
547  switch(typ) {
548  case CREATE_OBJ:
549  status = cnv->createObj(pAddress, pObject);
550  break;
551  case FILL_OBJ_REFS:
552  status = cnv->fillObjRefs(pAddress, pObject);
553  break;
554  case UPDATE_OBJ:
555  status = cnv->updateObj(pAddress, pObject);
556  break;
557  case UPDATE_OBJ_REFS:
558  status = cnv->updateObjRefs(pAddress, pObject);
559  break;
560  case CREATE_REP:
561  status = cnv->createRep(pObject, pAddress);
562  break;
563  case FILL_REP_REFS:
564  status = cnv->fillRepRefs(pAddress, pObject);
565  break;
566  case UPDATE_REP:
567  status = cnv->updateRep(pAddress, pObject);
568  break;
569  case UPDATE_REP_REFS:
570  status = cnv->updateRepRefs(pAddress, pObject);
571  break;
572  default:
573  status = StatusCode::FAILURE;
574  break;
575  }
576  if ( status.isSuccess() && update ) {
577  status = updateServiceState(pAddress);
578  }
579  return status;
580  }
581  status.ignore();
582  msg(MSG::INFO) << "No converter for object ";
583  if ( pObject != 0 ) {
584  msg(MSG::INFO) << System::typeinfoName(typeid(*pObject));
585  }
586  msg(MSG::INFO) << " CLID= " << obj_class << endmsg;
587  return Status::NO_CONVERTER;
588  }
589  return Status::INVALID_OBJECT;
590  }
591  return Status::INVALID_ADDRESS;
592 }

◆ objType()

const CLID & AthCnvSvc::objType ( ) const
overridevirtual

Implementation of IConverter: dummy call.

Definition at line 150 of file AthCnvSvc.cxx.

151 {
152  return CLID_NULL;
153 }

◆ operator=()

AthCnvSvc& AthCnvSvc::operator= ( const AthCnvSvc )
private

◆ removeConverter()

StatusCode AthCnvSvc::removeConverter ( const CLID clid)
overridevirtual

Remove converter object from conversion service (if present).

Definition at line 350 of file AthCnvSvc.cxx.

351 {
352  Workers::iterator worker = m_workers.find (clid);
353  if ( worker != m_workers.end() ) {
354  worker->second.converter()->finalize().ignore();
355  worker->second.converter()->release();
356 
357  m_workers.erase (worker);
358  return StatusCode::SUCCESS;
359  }
360  return Status::NO_CONVERTER;
361 }

◆ repSvcType()

long AthCnvSvc::repSvcType ( ) const
overridevirtual

Retrieve the class type of the data store the converter uses.

Definition at line 143 of file AthCnvSvc.cxx.

144 {
145  return m_type;
146 }

◆ setAddressCreator()

StatusCode AthCnvSvc::setAddressCreator ( IAddressCreator *  creator)
overridevirtual

Set address creator facility.

Definition at line 214 of file AthCnvSvc.cxx.

215 {
216  m_addressCreator = creator;
219  for(Workers::iterator i=start; i != stop; ++i ) {
220  IConverter* cnv = i->second.converter();
221  if ( 0 != cnv ) {
222  if (cnv->setAddressCreator(m_addressCreator).isFailure()) {
223  ATH_MSG_ERROR ("setting Address Creator");
224  }
225  }
226  }
227  return StatusCode::SUCCESS;
228 }

◆ setConversionSvc()

StatusCode AthCnvSvc::setConversionSvc ( IConversionSvc *  svc)
overridevirtual

Implementation of IConverter: Set conversion service the converter is connected to.

Definition at line 195 of file AthCnvSvc.cxx.

196 {
197  return StatusCode::FAILURE;
198 }

◆ setDataProvider()

StatusCode AthCnvSvc::setDataProvider ( IDataProviderSvc *  pDataSvc)
overridevirtual

Implementation of IConverter: Set Data provider service.

Returns
Status code indicating success or failure
Parameters
pServicePointer to data provider service

Definition at line 160 of file AthCnvSvc.cxx.

161 {
162  if ( !pDataSvc ) return StatusCode::SUCCESS; //Atlas does not use DataSvc
163  if ( m_dataSvc ) m_dataSvc->release();
164  m_dataSvc = pDataSvc;
165  m_dataSvc->addRef();
168  for(Workers::iterator i=start; i != stop; ++i ) {
169  IConverter* cnv = i->second.converter();
170  if ( 0 != cnv ) {
171  if (cnv->setDataProvider(m_dataSvc).isFailure()) {
172  ATH_MSG_ERROR ("setting Data Provider");
173  }
174  }
175  }
176  return StatusCode::SUCCESS;
177 }

◆ updateObj()

StatusCode AthCnvSvc::updateObj ( IOpaqueAddress *  pAddress,
DataObject *  refpObject 
)
overridevirtual

Implementation of IConverter: Update the transient object from the other representation.

Definition at line 260 of file AthCnvSvc.cxx.

261 {
262  return makeCall (UPDATE_OBJ, false, true, false, pAddress, pObject);
263 }

◆ updateObjRefs()

StatusCode AthCnvSvc::updateObjRefs ( IOpaqueAddress *  pAddress,
DataObject *  pObject 
)
overridevirtual

Implementation of IConverter: Update the references of an updated transient object.

Definition at line 268 of file AthCnvSvc.cxx.

269 {
270  return makeCall (UPDATE_OBJ_REFS, false, true, true, pAddress, pObject);
271 }

◆ updateRep()

StatusCode AthCnvSvc::updateRep ( IOpaqueAddress *  pAddress,
DataObject *  pObject 
)
overridevirtual

Implementation of IConverter: Update the converted representation of a transient object.

Definition at line 292 of file AthCnvSvc.cxx.

293 {
294  return makeCall (UPDATE_REP, true, false, false, pAddress, pObject);
295 }

◆ updateRepRefs()

StatusCode AthCnvSvc::updateRepRefs ( IOpaqueAddress *  pAddress,
DataObject *  pObject 
)
overridevirtual

Implementation of IConverter: Update the references of an already converted object.

Definition at line 300 of file AthCnvSvc.cxx.

301 {
302  return makeCall (UPDATE_REP_REFS, true, false, false, pAddress, pObject);
303 }

◆ updateServiceState()

StatusCode AthCnvSvc::updateServiceState ( IOpaqueAddress *  pAddress)
virtual

Update state of the service.

Reimplemented in MuonCalibStreamCnvSvc.

Definition at line 450 of file AthCnvSvc.cxx.

451 {
452  return StatusCode::SUCCESS;
453 }

Friends And Related Function Documentation

◆ SvcFactory< AthCnvSvc >

friend class SvcFactory< AthCnvSvc >
friend

Definition at line 1 of file AthCnvSvc.h.

Member Data Documentation

◆ m_addressCreator

SmartIF<IAddressCreator> AthCnvSvc::m_addressCreator
protected

Pointer to the address creation service interface.

Definition at line 312 of file AthCnvSvc.h.

◆ m_cnvSvc

SmartIF<IConversionSvc> AthCnvSvc::m_cnvSvc
protected

Pointer to the IConversionSvc interface of this.

Definition at line 314 of file AthCnvSvc.h.

◆ m_conv_mut

CallMutex AthCnvSvc::m_conv_mut
protected

Definition at line 321 of file AthCnvSvc.h.

◆ m_dataSvc

SmartIF<IDataProviderSvc> AthCnvSvc::m_dataSvc
protected

Pointer to data provider service.

Definition at line 310 of file AthCnvSvc.h.

◆ m_type

long AthCnvSvc::m_type
protected

Conversion service type.

Definition at line 316 of file AthCnvSvc.h.

◆ m_workers

Workers AthCnvSvc::m_workers
protected

List of conversion workers.

Definition at line 318 of file AthCnvSvc.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
AthCnvSvc::makeCall
StatusCode makeCall(int typ, bool ignore_add, bool ignore_obj, bool update, IOpaqueAddress *&pAddress, DataObject *&pObject)
Definition: AthCnvSvc.cxx:524
AthCnvSvc::addConverter
virtual StatusCode addConverter(const CLID &clid) override
Add converter object to conversion service.
Definition: AthCnvSvc.cxx:307
UPDATE_REP
@ UPDATE_REP
Definition: AthCnvSvc.cxx:36
CREATE_REP
@ CREATE_REP
Definition: AthCnvSvc.cxx:34
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthCnvSvc::m_conv_mut
CallMutex m_conv_mut
Definition: AthCnvSvc.h:321
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
AthCnvSvc::activateConverter
virtual StatusCode activateConverter(long typ, const CLID &clid, IConverter *cnv)
Activate the new converter after initialization.
Definition: AthCnvSvc.cxx:507
AthCnvSvc::updateServiceState
virtual StatusCode updateServiceState(IOpaqueAddress *pAddress)
Update state of the service.
Definition: AthCnvSvc.cxx:450
AthCnvSvc::setAddressCreator
virtual StatusCode setAddressCreator(IAddressCreator *creator) override
Set address creator facility.
Definition: AthCnvSvc.cxx:214
AthCnvSvc::m_addressCreator
SmartIF< IAddressCreator > m_addressCreator
Pointer to the address creation service interface.
Definition: AthCnvSvc.h:312
FILL_OBJ_REFS
@ FILL_OBJ_REFS
Definition: AthCnvSvc.cxx:31
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
AthCnvSvc::removeConverter
virtual StatusCode removeConverter(const CLID &clid) override
Remove converter object from conversion service (if present).
Definition: AthCnvSvc.cxx:350
compareGeometries.outputFile
string outputFile
Definition: compareGeometries.py:25
AthCnvSvc::configureConverter
virtual StatusCode configureConverter(long typ, const CLID &clid, IConverter *cnv)
Configure the new converter before initialize is called.
Definition: AthCnvSvc.cxx:481
UPDATE_REP_REFS
@ UPDATE_REP_REFS
Definition: AthCnvSvc.cxx:37
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Athena::typeinfoName
std::string typeinfoName(const std::type_info &ti)
Convert a type_info to a demangled string.
Definition: AthenaKernel/src/ClassName.cxx:23
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCnvSvc::m_cnvSvc
SmartIF< IConversionSvc > m_cnvSvc
Pointer to the IConversionSvc interface of this.
Definition: AthCnvSvc.h:314
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
AthCnvSvc::m_workers
Workers m_workers
List of conversion workers.
Definition: AthCnvSvc.h:318
AthCnvSvc::initializeConverter
virtual StatusCode initializeConverter(long typ, const CLID &clid, IConverter *cnv)
Initialize the new converter.
Definition: AthCnvSvc.cxx:496
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
UPDATE_OBJ_REFS
@ UPDATE_OBJ_REFS
Definition: AthCnvSvc.cxx:33
AthCnvSvc::createConverter
virtual IConverter * createConverter(long typ, const CLID &clid, const ICnvFactory *fac)
Create new Converter using factory.
Definition: AthCnvSvc.cxx:462
AthCnvSvc::converter
virtual IConverter * converter(const CLID &wanted) override
Retrieve converter from list.
Definition: AthCnvSvc.cxx:365
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
AthCnvSvc::loadConverter
virtual void loadConverter(DataObject *pObject)
Load converter or dictionary needed by the converter.
Definition: AthCnvSvc.cxx:518
AthCnvSvc::Workers
std::unordered_map< CLID, WorkerEntry > Workers
Definition: AthCnvSvc.h:105
AthCnvSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to data provider service.
Definition: AthCnvSvc.h:310
AthCnvSvc::repSvcType
virtual long repSvcType() const override
Retrieve the class type of the data store the converter uses.
Definition: AthCnvSvc.cxx:143
merge.status
status
Definition: merge.py:17
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
FILL_REP_REFS
@ FILL_REP_REFS
Definition: AthCnvSvc.cxx:35
AthCnvSvc::connectOutput
virtual StatusCode connectOutput(const std::string &outputFile, const std::string &openMode) override
Connect the output file to the service with open mode.
Definition: AthCnvSvc.cxx:385
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
WriteBchToCool.update
update
Definition: WriteBchToCool.py:67
CREATE_OBJ
@ CREATE_OBJ
Definition: AthCnvSvc.cxx:30
AthCnvSvc::m_type
long m_type
Conversion service type.
Definition: AthCnvSvc.h:316
UPDATE_OBJ
@ UPDATE_OBJ
Definition: AthCnvSvc.cxx:32