ATLAS Offline Software
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
MuonCalibStreamCnvSvc Class Reference

#include <MuonCalibStreamCnvSvc.h>

Inheritance diagram for MuonCalibStreamCnvSvc:
Collaboration diagram for MuonCalibStreamCnvSvc:

Public Types

typedef std::unordered_map< CLID, WorkerEntryWorkers
 

Public Member Functions

 MuonCalibStreamCnvSvc (const std::string &name, ISvcLocator *svc)
 Standard constructor. More...
 
virtual ~MuonCalibStreamCnvSvc ()
 Standard Destructor. More...
 
virtual StatusCode initialize ()
 Initialize the service. More...
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
 Query interface. More...
 
virtual StatusCode updateServiceState (IOpaqueAddress *pAddress)
 Update state of the service. More...
 
virtual StatusCode finalize ()
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Attributes

std::vector< std::string > m_initCnvs
 

Friends

class SvcFactory< MuonCalibStreamCnvSvc >
 Allow the factory class access to the constructor. More...
 

@c IConversionSvc implementation

virtual long repSvcType () const
 Retrieve the class type of the data store the converter uses. More...
 
const CLIDobjType () const
 Implementation of IConverter: dummy call. More...
 
virtual StatusCode setDataProvider (IDataProviderSvc *pService)
 Implementation of IConverter: Set Data provider service. More...
 
virtual SmartIF< IDataProviderSvc > & dataProvider () const
 Implementation of IConverter: Get Data provider service. More...
 
virtual StatusCode setConversionSvc (IConversionSvc *svc)
 Implementation of IConverter: Set conversion service the converter is connected to. More...
 
virtual SmartIF< IConversionSvc > & conversionSvc () const
 Implementation of IConverter: Get conversion service the converter is connected to. More...
 
virtual StatusCode setAddressCreator (IAddressCreator *creator)
 Set address creator facility. More...
 
virtual SmartIF< IAddressCreator > & addressCreator () const
 Retrieve address creator facility. More...
 
virtual StatusCode createObj (IOpaqueAddress *pAddress, DataObject *&refpObject)
 Implementation of IConverter: Create the transient representation of an object. More...
 
virtual StatusCode fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Implementation of IConverter: Resolve the references of the created transient object. More...
 
virtual StatusCode updateObj (IOpaqueAddress *pAddress, DataObject *refpObject)
 Implementation of IConverter: Update the transient object from the other representation. More...
 
virtual StatusCode updateObjRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Implementation of IConverter: Update the references of an updated transient object. More...
 
virtual StatusCode createRep (DataObject *pObject, IOpaqueAddress *&refpAddress)
 Implementation of IConverter: Convert the transient object to the requested representation. More...
 
virtual StatusCode fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Implementation of IConverter: Resolve the references of the converted object. More...
 
virtual StatusCode updateRep (IOpaqueAddress *pAddress, DataObject *pObject)
 Implementation of IConverter: Update the converted representation of a transient object. More...
 
virtual StatusCode updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Implementation of IConverter: Update the references of an already converted object. More...
 
virtual StatusCode addConverter (const CLID &clid)
 Add converter object to conversion service. More...
 
virtual StatusCode addConverter (IConverter *pConverter)
 Add converter object to conversion service. More...
 
virtual StatusCode removeConverter (const CLID &clid)
 Remove converter object from conversion service (if present). More...
 
virtual IConverter * converter (const CLID &wanted)
 Retrieve converter from list. More...
 
virtual StatusCode connectOutput (const std::string &outputFile, const std::string &openMode)
 Connect the output file to the service with open mode. More...
 
virtual StatusCode connectOutput (const std::string &output)
 Connect the output file to the service. More...
 
virtual StatusCode commitOutput (const std::string &output, bool do_commit)
 Commit pending output. More...
 
virtual StatusCode disconnectOutput (const std::string &output)
 Disconnect output files from the service. More...
 

@c IAddressCreator interface implementation

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)
 Create a Generic address using explicit arguments to identify a single object. More...
 
virtual StatusCode createAddress (long svc_type, const CLID &clid, const std::string &refAddress, IOpaqueAddress *&refpAddress)
 Convert an address in string form to object form. More...
 
virtual StatusCode convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress)
 Convert an address to string form. More...
 
typedef std::recursive_mutex CallMutex
 Mutex to protect Converter creation. More...
 
virtual SmartIF< IAddressCreator > & addressCreator ()
 Retrieve address creation interface. 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...
 
StatusCode makeCall (int typ, bool ignore_add, bool ignore_obj, bool update, IOpaqueAddress *&pAddress, DataObject *&pObject)
 

Detailed Description

Definition at line 10 of file MuonCalibStreamCnvSvc.h.

Member Typedef Documentation

◆ CallMutex

typedef std::recursive_mutex AthCnvSvc::CallMutex
protectedinherited

Mutex to protect Converter creation.

Definition at line 323 of file AthCnvSvc.h.

◆ Workers

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

Definition at line 106 of file AthCnvSvc.h.

Constructor & Destructor Documentation

◆ MuonCalibStreamCnvSvc()

MuonCalibStreamCnvSvc::MuonCalibStreamCnvSvc ( const std::string &  name,
ISvcLocator *  svc 
)

Standard constructor.

Definition at line 19 of file MuonCalibStreamCnvSvc.cxx.

19  :
20  AthCnvSvc(name, svc, MuonCalibStreamAddress::storageType()) //, m_calibEvent(nullptr)
21 {
22  m_initCnvs.push_back("xAOD::EventInfo");
23 
24  declareProperty("InitCnvs", m_initCnvs);
25 }

◆ ~MuonCalibStreamCnvSvc()

MuonCalibStreamCnvSvc::~MuonCalibStreamCnvSvc ( )
virtual

Standard Destructor.

Definition at line 28 of file MuonCalibStreamCnvSvc.cxx.

28 {}

Member Function Documentation

◆ activateConverter()

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

Activate the new converter after initialization.

Definition at line 536 of file AthCnvSvc.cxx.

538 {
539  if (cnv) {
540  return StatusCode::SUCCESS;
541  }
542  return Status::NO_CONVERTER;
543 }

◆ addConverter() [1/2]

StatusCode AthCnvSvc::addConverter ( const CLID clid)
virtualinherited

Add converter object to conversion service.

Definition at line 336 of file AthCnvSvc.cxx.

337 {
338  // First look for the more specific converter
339  long typ = repSvcType();
340  IConverter* pConverter = createConverter(typ, clid, 0);
341  if ( 0 != pConverter ) {
342  StatusCode status = configureConverter( typ, clid, pConverter );
343  if ( status.isSuccess() ) {
344  status = initializeConverter( typ, clid, pConverter );
345  if ( status.isSuccess() ) {
346  status = activateConverter( typ, clid, pConverter );
347  if ( status.isSuccess() ) {
348  long conv_typ = pConverter->repSvcType();
349  const CLID& conv_clid = pConverter->objType();
350  typ = (typ<0xFF) ? typ : typ&0xFFFFFF00;
351  conv_typ = (conv_typ<0xFF) ? conv_typ : conv_typ&0xFFFFFF00;
352  if ( conv_typ == typ && conv_clid == clid ) {
353  return addConverter(pConverter);
354  }
355  }
356  }
357  }
358  pConverter->release();
359  }
360  return Status::NO_CONVERTER;
361 }

◆ addConverter() [2/2]

StatusCode AthCnvSvc::addConverter ( IConverter *  pConverter)
virtualinherited

Add converter object to conversion service.

Definition at line 365 of file AthCnvSvc.cxx.

366 {
367  if ( 0 != pConverter ) {
368  const CLID& clid = pConverter->objType();
369  removeConverter(clid).ignore();
370  m_workers.insert (std::make_pair(clid,WorkerEntry(clid, pConverter)));
371  pConverter->addRef();
372  return StatusCode::SUCCESS;
373  }
374  return Status::NO_CONVERTER;
375 }

◆ addressCreator() [1/2]

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

Retrieve address creation interface.

Definition at line 300 of file AthCnvSvc.h.

301  {
302  return m_addressCreator;
303  }

◆ addressCreator() [2/2]

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

Retrieve address creator facility.

Definition at line 261 of file AthCnvSvc.cxx.

262 {
263  // FIXME: Ideally the return type should be const, but that would require
264  // changes in the Gaudi IConverter base class.
265  SmartIF<IAddressCreator>& svc ATLAS_THREAD_SAFE =
266  const_cast<SmartIF<IAddressCreator>&>(m_addressCreator);
267  return svc;
268 }

◆ commitOutput()

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

Commit pending output.

Reimplemented in TrigByteStreamCnvSvc, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, AthenaPoolCnvSvc, ByteStreamCnvSvc, and Athena::RootCnvSvc.

Definition at line 429 of file AthCnvSvc.cxx.

430 {
431  return StatusCode::SUCCESS;
432 }

◆ configureConverter()

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

Configure the new converter before initialize is called.

Definition at line 510 of file AthCnvSvc.cxx.

512 {
513  if (cnv) {
514  cnv->setConversionSvc(this).ignore();
515  cnv->setAddressCreator(m_addressCreator).ignore();
516  cnv->setDataProvider(m_dataSvc).ignore();
517  return StatusCode::SUCCESS;
518  }
519  return Status::NO_CONVERTER;
520 
521 }

◆ connectOutput() [1/2]

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

Connect the output file to the service.

Reimplemented in ByteStreamCnvSvc, TrigByteStreamCnvSvc, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, AthenaPoolCnvSvc, and Athena::RootCnvSvc.

Definition at line 422 of file AthCnvSvc.cxx.

423 {
424  return StatusCode::SUCCESS;
425 }

◆ connectOutput() [2/2]

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

Connect the output file to the service with open mode.

Reimplemented in ByteStreamCnvSvc, TrigByteStreamCnvSvc, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, AthenaPoolCnvSvc, and Athena::RootCnvSvc.

Definition at line 414 of file AthCnvSvc.cxx.

416 {
417  return connectOutput (outputFile);
418 }

◆ conversionSvc()

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

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

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<IConversionSvc>& svc ATLAS_THREAD_SAFE =
237  const_cast<SmartIF<IConversionSvc>&>(m_cnvSvc);
238  return svc;
239 }

◆ convertAddress()

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

Convert an address to string form.

Reimplemented in AthenaPoolCnvSvc, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and Athena::RootCnvSvc.

Definition at line 459 of file AthCnvSvc.cxx.

461 {
462  refAddress = "";
463  return StatusCode::FAILURE;
464 }

◆ converter()

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

Retrieve converter from list.

Definition at line 394 of file AthCnvSvc.cxx.

395 {
396  std::lock_guard<CallMutex> lock(m_conv_mut);
397  Workers::iterator worker = m_workers.find (clid);
398  if ( worker != m_workers.end() ) {
399  return worker->second.converter();
400  }
401  if (addConverter (clid).isSuccess()) {
402  worker = m_workers.find (clid);
403  if (worker != m_workers.end()) {
404  return worker->second.converter();
405  }
406  } else {
407  ATH_MSG_INFO("problem adding converter for CLID [" << clid << "]");
408  }
409  return 0;
410 }

◆ createAddress() [1/2]

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

Convert an address in string form to object form.

Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, AthenaPoolCnvSvc, and Athena::RootCnvSvc.

Definition at line 468 of file AthCnvSvc.cxx.

472 {
473  refpAddress = 0;
474  return StatusCode::FAILURE;
475 }

◆ createAddress() [2/2]

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

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

Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, AthenaPoolCnvSvc, and Athena::RootCnvSvc.

Definition at line 447 of file AthCnvSvc.cxx.

452 {
453  refpAddress = 0;
454  return StatusCode::FAILURE;
455 }

◆ createConverter()

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

Create new Converter using factory.

Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and Athena::RootCnvSvc.

Definition at line 491 of file AthCnvSvc.cxx.

494 {
495 
496  std::unique_ptr<IConverter> cnv{Converter::Factory::create
497  (ConverterID(typ,clid), serviceLocator().get() )};
498 
499  if (!cnv) {
500  typ = (typ<0xFF) ? typ : typ&0xFFFFFF00;
501  cnv = Converter::Factory::create
502  (ConverterID(typ,clid), serviceLocator().get() );
503  }
504  return cnv.release();
505 
506 }

◆ createObj()

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

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

Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and AthenaPoolCnvSvc.

Definition at line 273 of file AthCnvSvc.cxx.

274 {
275  return makeCall (CREATE_OBJ, false, true, false, pAddress, refpObject);
276 }

◆ createRep()

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

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

Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and AthenaPoolCnvSvc.

Definition at line 305 of file AthCnvSvc.cxx.

306 {
307  return makeCall (CREATE_REP, true, false, false, refpAddress, pObject);
308 }

◆ dataProvider()

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

Implementation of IConverter: Get Data provider service.

Returns
Pointer to data provider service

Definition at line 212 of file AthCnvSvc.cxx.

213 {
214  // FIXME: Ideally the return type should be const, but that would require
215  // changes in the Gaudi IConverter base class.
216  SmartIF<IDataProviderSvc>& svc ATLAS_THREAD_SAFE =
217  const_cast<SmartIF<IDataProviderSvc>&>(m_dataSvc);
218  return svc;
219 }

◆ disconnectOutput()

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

Disconnect output files from the service.

Reimplemented in AthenaPoolCnvSvc.

Definition at line 437 of file AthCnvSvc.cxx.

438 {
439  return StatusCode::SUCCESS;
440 }

◆ fillObjRefs()

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

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

Definition at line 281 of file AthCnvSvc.cxx.

282 {
283  return makeCall (FILL_OBJ_REFS, false, true, true, pAddress, pObject);
284 }

◆ fillRepRefs()

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

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


Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and AthenaPoolCnvSvc.

Definition at line 313 of file AthCnvSvc.cxx.

314 {
315  return makeCall (FILL_REP_REFS, true, false, false, pAddress, pObject);
316 }

◆ finalize()

StatusCode AthCnvSvc::finalize ( )
virtualinherited

Reimplemented in ByteStreamCnvSvc, TrigByteStreamCnvSvc, AthenaPoolCnvSvc, Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and Athena::RootCnvSvc.

Definition at line 116 of file AthCnvSvc.cxx.

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

◆ initialize()

StatusCode MuonCalibStreamCnvSvc::initialize ( )
virtual

Initialize the service.

Reimplemented from AthCnvSvc.

Definition at line 31 of file MuonCalibStreamCnvSvc.cxx.

31  {
32  ATH_MSG_INFO("Initializing MuonCalibStreamCnvSvc");
33 
35 
36  IClassIDSvc *clidSvc;
37  ATH_CHECK(service("ClassIDSvc", clidSvc));
38 
39  // Initialize the converters
40  std::vector<std::string>::const_iterator it = m_initCnvs.begin();
41  std::vector<std::string>::const_iterator it_e = m_initCnvs.end();
42  for (; it != it_e; ++it) {
43  CLID id;
44  ATH_MSG_DEBUG(" Try to obtain CLID for " << (*it));
45  ATH_CHECK(clidSvc->getIDOfTypeName(*it, id));
46 
47  ATH_MSG_DEBUG(" " << *it << " has CLID " << id);
48  IConverter *cnv = converter(id);
49  if (!cnv) {
50  ATH_MSG_WARNING(" Cannot get converter for " << (*it));
51  } else {
52  ATH_MSG_DEBUG(" Converter " << cnv->objType() << " for " << (*it));
53  }
54  }
55  return StatusCode::SUCCESS;
56 }

◆ initializeConverter()

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

Initialize the new converter.

Definition at line 525 of file AthCnvSvc.cxx.

527 {
528  if (cnv) {
529  return cnv->initialize();
530  }
531  return Status::NO_CONVERTER;
532 }

◆ loadConverter()

void AthCnvSvc::loadConverter ( DataObject *  pObject)
protectedvirtualinherited

Load converter or dictionary needed by the converter.

Definition at line 547 of file AthCnvSvc.cxx.

548 {
549 }

◆ makeCall()

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

Definition at line 553 of file AthCnvSvc.cxx.

559 {
560  if ( 0 != pAddress || ignore_add ) {
561  if ( 0 != pObject || ignore_obj ) {
562  const CLID& obj_class =
563  (0 != pObject && !ignore_obj) ? pObject->clID()
564  : (0 != pAddress && !ignore_add)
565  ? pAddress->clID()
566  : CLID_NULL;
567  IConverter* cnv = converter(obj_class);
568  if ( !cnv && pObject ) {
569  //Give it a try to autoload the class (dictionary) for which the converter is needed
570  loadConverter( pObject);
571  cnv = converter(obj_class);
572  }
573 
574  StatusCode status(StatusCode::FAILURE);
575  if ( 0 != cnv ) {
576  switch(typ) {
577  case CREATE_OBJ:
578  status = cnv->createObj(pAddress, pObject);
579  break;
580  case FILL_OBJ_REFS:
581  status = cnv->fillObjRefs(pAddress, pObject);
582  break;
583  case UPDATE_OBJ:
584  status = cnv->updateObj(pAddress, pObject);
585  break;
586  case UPDATE_OBJ_REFS:
587  status = cnv->updateObjRefs(pAddress, pObject);
588  break;
589  case CREATE_REP:
590  status = cnv->createRep(pObject, pAddress);
591  break;
592  case FILL_REP_REFS:
593  status = cnv->fillRepRefs(pAddress, pObject);
594  break;
595  case UPDATE_REP:
596  status = cnv->updateRep(pAddress, pObject);
597  break;
598  case UPDATE_REP_REFS:
599  status = cnv->updateRepRefs(pAddress, pObject);
600  break;
601  default:
602  status = StatusCode::FAILURE;
603  break;
604  }
605  if ( status.isSuccess() && update ) {
606  status = updateServiceState(pAddress);
607  }
608  return status;
609  }
610  status.ignore();
611  msg(MSG::INFO) << "No converter for object ";
612  if ( pObject != 0 ) {
613  msg(MSG::INFO) << System::typeinfoName(typeid(*pObject));
614  }
615  msg(MSG::INFO) << " CLID= " << obj_class << endmsg;
616  return Status::NO_CONVERTER;
617  }
618  return Status::INVALID_OBJECT;
619  }
620  return Status::INVALID_ADDRESS;
621 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Service >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Service >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Service >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ objType()

const CLID & AthCnvSvc::objType ( ) const
inherited

Implementation of IConverter: dummy call.

Definition at line 179 of file AthCnvSvc.cxx.

180 {
181  return CLID_NULL;
182 }

◆ queryInterface()

StatusCode MuonCalibStreamCnvSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)
virtual

Query interface.

Reimplemented from AthCnvSvc.

Definition at line 59 of file MuonCalibStreamCnvSvc.cxx.

59  {
60  // if ( IMuonCalibStreamEventAccess::interfaceID().versionMatch(riid) ) {
61  // *ppvInterface = (IMuonCalibStreamEventAccess*)this;
62  //}
63  // else {
64  return AthCnvSvc::queryInterface(riid, ppvInterface);
65  //}
66 
67  // addRef();
68  // return StatusCode::SUCCESS;
69 }

◆ removeConverter()

StatusCode AthCnvSvc::removeConverter ( const CLID clid)
virtualinherited

Remove converter object from conversion service (if present).

Definition at line 379 of file AthCnvSvc.cxx.

380 {
381  Workers::iterator worker = m_workers.find (clid);
382  if ( worker != m_workers.end() ) {
383  worker->second.converter()->finalize().ignore();
384  worker->second.converter()->release();
385 
386  m_workers.erase (worker);
387  return StatusCode::SUCCESS;
388  }
389  return Status::NO_CONVERTER;
390 }

◆ repSvcType()

long AthCnvSvc::repSvcType ( ) const
virtualinherited

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

Definition at line 172 of file AthCnvSvc.cxx.

173 {
174  return m_type;
175 }

◆ setAddressCreator()

StatusCode AthCnvSvc::setAddressCreator ( IAddressCreator *  creator)
virtualinherited

Set address creator facility.

Definition at line 243 of file AthCnvSvc.cxx.

244 {
245  m_addressCreator = creator;
248  for(Workers::iterator i=start; i != stop; ++i ) {
249  IConverter* cnv = i->second.converter();
250  if ( 0 != cnv ) {
251  if (cnv->setAddressCreator(m_addressCreator).isFailure()) {
252  ATH_MSG_ERROR ("setting Address Creator");
253  }
254  }
255  }
256  return StatusCode::SUCCESS;
257 }

◆ setConversionSvc()

StatusCode AthCnvSvc::setConversionSvc ( IConversionSvc *  svc)
virtualinherited

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

Definition at line 224 of file AthCnvSvc.cxx.

225 {
226  return StatusCode::FAILURE;
227 }

◆ setDataProvider()

StatusCode AthCnvSvc::setDataProvider ( IDataProviderSvc *  pDataSvc)
virtualinherited

Implementation of IConverter: Set Data provider service.

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

Definition at line 189 of file AthCnvSvc.cxx.

190 {
191  if ( !pDataSvc ) return StatusCode::SUCCESS; //Atlas does not use DataSvc
192  if ( m_dataSvc ) m_dataSvc->release();
193  m_dataSvc = pDataSvc;
194  m_dataSvc->addRef();
197  for(Workers::iterator i=start; i != stop; ++i ) {
198  IConverter* cnv = i->second.converter();
199  if ( 0 != cnv ) {
200  if (cnv->setDataProvider(m_dataSvc).isFailure()) {
201  ATH_MSG_ERROR ("setting Data Provider");
202  }
203  }
204  }
205  return StatusCode::SUCCESS;
206 }

◆ updateObj()

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

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

Definition at line 289 of file AthCnvSvc.cxx.

290 {
291  return makeCall (UPDATE_OBJ, false, true, false, pAddress, pObject);
292 }

◆ updateObjRefs()

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

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

Definition at line 297 of file AthCnvSvc.cxx.

298 {
299  return makeCall (UPDATE_OBJ_REFS, false, true, true, pAddress, pObject);
300 }

◆ updateRep()

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

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

Definition at line 321 of file AthCnvSvc.cxx.

322 {
323  return makeCall (UPDATE_REP, true, false, false, pAddress, pObject);
324 }

◆ updateRepRefs()

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

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

Definition at line 329 of file AthCnvSvc.cxx.

330 {
331  return makeCall (UPDATE_REP_REFS, true, false, false, pAddress, pObject);
332 }

◆ updateServiceState()

StatusCode MuonCalibStreamCnvSvc::updateServiceState ( IOpaqueAddress *  pAddress)
virtual

Update state of the service.

Reimplemented from AthCnvSvc.

Definition at line 72 of file MuonCalibStreamCnvSvc.cxx.

72  {
73  if (pAddress != 0) {
74  GenericAddress *pAddr = dynamic_cast<GenericAddress *>(pAddress);
75  if (pAddr != 0) { return StatusCode::SUCCESS; }
76  }
77  return StatusCode::FAILURE;
78 }

Friends And Related Function Documentation

◆ SvcFactory< MuonCalibStreamCnvSvc >

friend class SvcFactory< MuonCalibStreamCnvSvc >
friend

Allow the factory class access to the constructor.

Definition at line 1 of file MuonCalibStreamCnvSvc.h.

Member Data Documentation

◆ m_addressCreator

SmartIF<IAddressCreator> AthCnvSvc::m_addressCreator
protectedinherited

Pointer to the address creation service interface.

Definition at line 315 of file AthCnvSvc.h.

◆ m_cnvSvc

SmartIF<IConversionSvc> AthCnvSvc::m_cnvSvc
protectedinherited

Pointer to the IConversionSvc interface of this.

Definition at line 317 of file AthCnvSvc.h.

◆ m_conv_mut

CallMutex AthCnvSvc::m_conv_mut
protectedinherited

Definition at line 324 of file AthCnvSvc.h.

◆ m_dataSvc

SmartIF<IDataProviderSvc> AthCnvSvc::m_dataSvc
protectedinherited

Pointer to data provider service.

Definition at line 313 of file AthCnvSvc.h.

◆ m_initCnvs

std::vector<std::string> MuonCalibStreamCnvSvc::m_initCnvs
protected

Definition at line 25 of file MuonCalibStreamCnvSvc.h.

◆ m_type

long AthCnvSvc::m_type
protectedinherited

Conversion service type.

Definition at line 319 of file AthCnvSvc.h.

◆ m_workers

Workers AthCnvSvc::m_workers
protectedinherited

List of conversion workers.

Definition at line 321 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:553
UPDATE_REP
@ UPDATE_REP
Definition: AthCnvSvc.cxx:36
CREATE_REP
@ CREATE_REP
Definition: AthCnvSvc.cxx:34
AthCnvSvc::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
Definition: AthCnvSvc.cxx:149
AthCnvSvc::removeConverter
virtual StatusCode removeConverter(const CLID &clid)
Remove converter object from conversion service (if present).
Definition: AthCnvSvc.cxx:379
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthCnvSvc::m_conv_mut
CallMutex m_conv_mut
Definition: AthCnvSvc.h:324
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:536
AthCnvSvc::updateServiceState
virtual StatusCode updateServiceState(IOpaqueAddress *pAddress)
Update state of the service.
Definition: AthCnvSvc.cxx:479
skel.it
it
Definition: skel.GENtoEVGEN.py:423
AthCnvSvc::m_addressCreator
SmartIF< IAddressCreator > m_addressCreator
Pointer to the address creation service interface.
Definition: AthCnvSvc.h:315
AthCnvSvc::initialize
virtual StatusCode initialize()
Gaudi Service Implementation.
Definition: AthCnvSvc.cxx:111
FILL_OBJ_REFS
@ FILL_OBJ_REFS
Definition: AthCnvSvc.cxx:31
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
AthCnvSvc::AthCnvSvc
AthCnvSvc()
Default constructor:
AthCnvSvc::connectOutput
virtual StatusCode connectOutput(const std::string &outputFile, const std::string &openMode)
Connect the output file to the service with open mode.
Definition: AthCnvSvc.cxx:414
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:510
UPDATE_REP_REFS
@ UPDATE_REP_REFS
Definition: AthCnvSvc.cxx:37
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:92
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
MuonCalibStreamCnvSvc::m_initCnvs
std::vector< std::string > m_initCnvs
Definition: MuonCalibStreamCnvSvc.h:25
AthCnvSvc::m_cnvSvc
SmartIF< IConversionSvc > m_cnvSvc
Pointer to the IConversionSvc interface of this.
Definition: AthCnvSvc.h:317
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:321
AthCnvSvc::initializeConverter
virtual StatusCode initializeConverter(long typ, const CLID &clid, IConverter *cnv)
Initialize the new converter.
Definition: AthCnvSvc.cxx:525
MuonCalibStreamAddress::storageType
static constexpr long storageType()
Definition: MuonCalibStreamAddress.h:25
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AthCnvSvc::addConverter
virtual StatusCode addConverter(const CLID &clid)
Add converter object to conversion service.
Definition: AthCnvSvc.cxx:336
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:491
AthCnvSvc::converter
virtual IConverter * converter(const CLID &wanted)
Retrieve converter from list.
Definition: AthCnvSvc.cxx:394
dqt_zlumi_pandas.update
update
Definition: dqt_zlumi_pandas.py:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthCommonMsg< Service >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
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:547
AthCnvSvc::Workers
std::unordered_map< CLID, WorkerEntry > Workers
Definition: AthCnvSvc.h:106
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
AthCnvSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to data provider service.
Definition: AthCnvSvc.h:313
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::repSvcType
virtual long repSvcType() const
Retrieve the class type of the data store the converter uses.
Definition: AthCnvSvc.cxx:172
CREATE_OBJ
@ CREATE_OBJ
Definition: AthCnvSvc.cxx:30
AthCnvSvc::m_type
long m_type
Conversion service type.
Definition: AthCnvSvc.h:319
UPDATE_OBJ
@ UPDATE_OBJ
Definition: AthCnvSvc.cxx:32