ATLAS Offline Software
Loading...
Searching...
No Matches
MuonCalibStreamCnvSvc Class Reference

#include <MuonCalibStreamCnvSvc.h>

Inheritance diagram for MuonCalibStreamCnvSvc:
Collaboration diagram for MuonCalibStreamCnvSvc:

Public Types

typedef std::unordered_map< CLID, WorkerEntry > Workers

Public Member Functions

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

Protected Attributes

std::vector< std::string > m_initCnvs

@c IAddressCreator interface implementation

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

Detailed Description

Definition at line 7 of file MuonCalibStreamCnvSvc.h.

Member Typedef Documentation

◆ CallMutex

typedef std::recursive_mutex AthCnvSvc::CallMutex
protectedinherited

Mutex to protect Converter creation.

Definition at line 318 of file AthCnvSvc.h.

◆ Workers

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

Definition at line 105 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}
AthCnvSvc()
Default constructor:
static constexpr long storageType()
std::vector< std::string > m_initCnvs

◆ ~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 496 of file AthCnvSvc.cxx.

498{
499 if (cnv) {
500 return StatusCode::SUCCESS;
501 }
502 return Status::NO_CONVERTER;
503}

◆ addConverter() [1/2]

StatusCode AthCnvSvc::addConverter ( const CLID & clid)
overridevirtualinherited

Add converter object to conversion service.

Definition at line 296 of file AthCnvSvc.cxx.

297{
298 // First look for the more specific converter
299 long typ = repSvcType();
300 IConverter* pConverter = createConverter(typ, clid, 0);
301 if ( 0 != pConverter ) {
302 StatusCode status = configureConverter( typ, clid, pConverter );
303 if ( status.isSuccess() ) {
304 status = initializeConverter( typ, clid, pConverter );
305 if ( status.isSuccess() ) {
306 status = activateConverter( typ, clid, pConverter );
307 if ( status.isSuccess() ) {
308 long conv_typ = pConverter->repSvcType();
309 const CLID& conv_clid = pConverter->objType();
310 typ = (typ<0xFF) ? typ : typ&0xFFFFFF00;
311 conv_typ = (conv_typ<0xFF) ? conv_typ : conv_typ&0xFFFFFF00;
312 if ( conv_typ == typ && conv_clid == clid ) {
313 return addConverter(pConverter);
314 }
315 }
316 }
317 }
318 pConverter->release();
319 }
320 return Status::NO_CONVERTER;
321}
uint32_t CLID
The Class ID type.
virtual StatusCode activateConverter(long typ, const CLID &clid, IConverter *cnv)
Activate the new converter after initialization.
virtual IConverter * createConverter(long typ, const CLID &clid, const ICnvFactory *fac)
Create new Converter using factory.
virtual long repSvcType() const override
Retrieve the class type of the data store the converter uses.
virtual StatusCode addConverter(const CLID &clid) override
Add converter object to conversion service.
virtual StatusCode initializeConverter(long typ, const CLID &clid, IConverter *cnv)
Initialize the new converter.
virtual StatusCode configureConverter(long typ, const CLID &clid, IConverter *cnv)
Configure the new converter before initialize is called.
::StatusCode StatusCode
StatusCode definition for legacy code.
status
Definition merge.py:16

◆ addConverter() [2/2]

StatusCode AthCnvSvc::addConverter ( IConverter * pConverter)
overridevirtualinherited

Add converter object to conversion service.

Definition at line 325 of file AthCnvSvc.cxx.

326{
327 if ( 0 != pConverter ) {
328 const CLID& clid = pConverter->objType();
329 removeConverter(clid).ignore();
330 m_workers.insert (std::make_pair(clid,WorkerEntry(clid, pConverter)));
331 pConverter->addRef();
332 return StatusCode::SUCCESS;
333 }
334 return Status::NO_CONVERTER;
335}
virtual StatusCode removeConverter(const CLID &clid) override
Remove converter object from conversion service (if present).
Workers m_workers
List of conversion workers.
Definition AthCnvSvc.h:316

◆ addressCreator() [1/2]

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

Retrieve address creation interface.

Definition at line 297 of file AthCnvSvc.h.

298 {
299 return m_addressCreator;
300 }
SmartIF< IAddressCreator > m_addressCreator
Pointer to the address creation service interface.
Definition AthCnvSvc.h:312

◆ addressCreator() [2/2]

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

Retrieve address creator facility.

Definition at line 221 of file AthCnvSvc.cxx.

222{
223 // FIXME: Ideally the return type should be const, but that would require
224 // changes in the Gaudi IConverter base class.
225 SmartIF<IAddressCreator>& svc ATLAS_THREAD_SAFE =
226 const_cast<SmartIF<IAddressCreator>&>(m_addressCreator);
227 return svc;
228}
#define ATLAS_THREAD_SAFE
AthROOTErrorHandlerSvc * svc

◆ commitOutput()

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

Commit pending output.

Definition at line 389 of file AthCnvSvc.cxx.

390{
391 return StatusCode::SUCCESS;
392}

◆ configureConverter()

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

Configure the new converter before initialize is called.

Definition at line 470 of file AthCnvSvc.cxx.

472{
473 if (cnv) {
474 cnv->setConversionSvc(this).ignore();
475 cnv->setAddressCreator(m_addressCreator).ignore();
476 cnv->setDataProvider(m_dataSvc).ignore();
477 return StatusCode::SUCCESS;
478 }
479 return Status::NO_CONVERTER;
480
481}
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to data provider service.
Definition AthCnvSvc.h:310

◆ connectOutput() [1/2]

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

Connect the output file to the service.

Definition at line 382 of file AthCnvSvc.cxx.

383{
384 return StatusCode::SUCCESS;
385}

◆ connectOutput() [2/2]

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

Connect the output file to the service with open mode.

Definition at line 374 of file AthCnvSvc.cxx.

376{
377 return connectOutput (outputFile);
378}
virtual StatusCode connectOutput(const std::string &outputFile, const std::string &openMode) override
Connect the output file to the service with open mode.

◆ conversionSvc()

SmartIF< IConversionSvc > AthCnvSvc::conversionSvc ( )
overridevirtualinherited

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

Definition at line 196 of file AthCnvSvc.cxx.

197{
198 return SmartIF<IConversionSvc>(this);
199}

◆ convertAddress()

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

Convert an address to string form.

Definition at line 419 of file AthCnvSvc.cxx.

421{
422 refAddress = "";
423 return StatusCode::FAILURE;
424}

◆ converter()

IConverter * AthCnvSvc::converter ( const CLID & wanted)
overridevirtualinherited

Retrieve converter from list.

Definition at line 354 of file AthCnvSvc.cxx.

355{
356 std::lock_guard<CallMutex> lock(m_convsvc_mut);
357 Workers::iterator worker = m_workers.find (clid);
358 if ( worker != m_workers.end() ) {
359 return worker->second.converter();
360 }
361 if (addConverter (clid).isSuccess()) {
362 worker = m_workers.find (clid);
363 if (worker != m_workers.end()) {
364 return worker->second.converter();
365 }
366 } else {
367 ATH_MSG_INFO("problem adding converter for CLID [{}]", clid);
368 }
369 return 0;
370}
#define ATH_MSG_INFO(x,...)
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
CallMutex m_convsvc_mut
Definition AthCnvSvc.h:319

◆ createAddress() [1/2]

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

Convert an address in string form to object form.

Definition at line 428 of file AthCnvSvc.cxx.

432{
433 refpAddress = 0;
434 return StatusCode::FAILURE;
435}

◆ createAddress() [2/2]

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

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

Definition at line 407 of file AthCnvSvc.cxx.

412{
413 refpAddress = 0;
414 return StatusCode::FAILURE;
415}

◆ createConverter()

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

Create new Converter using factory.

Definition at line 451 of file AthCnvSvc.cxx.

454{
455
456 std::unique_ptr<IConverter> cnv{Converter::Factory::create
457 (ConverterID(typ,clid), serviceLocator().get() )};
458
459 if (!cnv) {
460 typ = (typ<0xFF) ? typ : typ&0xFFFFFF00;
461 cnv = Converter::Factory::create
462 (ConverterID(typ,clid), serviceLocator().get() );
463 }
464 return cnv.release();
465
466}
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:132

◆ createObj()

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

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

Definition at line 233 of file AthCnvSvc.cxx.

234{
235 return makeCall (CREATE_OBJ, false, true, false, pAddress, refpObject);
236}
@ CREATE_OBJ
Definition AthCnvSvc.cxx:30
StatusCode makeCall(int typ, bool ignore_add, bool ignore_obj, bool update, IOpaqueAddress *&pAddress, DataObject *&pObject)

◆ createRep()

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

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

Definition at line 265 of file AthCnvSvc.cxx.

266{
267 return makeCall (CREATE_REP, true, false, false, refpAddress, pObject);
268}
@ CREATE_REP
Definition AthCnvSvc.cxx:34

◆ dataProvider()

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

Implementation of IConverter: Get Data provider service.

Returns
Pointer to data provider service

Definition at line 176 of file AthCnvSvc.cxx.

177{
178 // FIXME: Ideally the return type should be const, but that would require
179 // changes in the Gaudi IConverter base class.
180 SmartIF<IDataProviderSvc>& svc ATLAS_THREAD_SAFE =
181 const_cast<SmartIF<IDataProviderSvc>&>(m_dataSvc);
182 return svc;
183}

◆ disconnectOutput()

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

Disconnect output files from the service.

Definition at line 397 of file AthCnvSvc.cxx.

398{
399 return StatusCode::SUCCESS;
400}

◆ fillObjRefs()

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

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

Definition at line 241 of file AthCnvSvc.cxx.

242{
243 return makeCall (FILL_OBJ_REFS, false, true, true, pAddress, pObject);
244}
@ FILL_OBJ_REFS
Definition AthCnvSvc.cxx:31

◆ fillRepRefs()

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

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

Definition at line 273 of file AthCnvSvc.cxx.

274{
275 return makeCall (FILL_REP_REFS, true, false, false, pAddress, pObject);
276}
@ FILL_REP_REFS
Definition AthCnvSvc.cxx:35

◆ finalize()

StatusCode AthCnvSvc::finalize ( )
overridevirtualinherited

Definition at line 107 of file AthCnvSvc.cxx.

108{
109 ATH_MSG_DEBUG ("releasing all workers");
110 for ( Workers::iterator
111 i = m_workers.begin(),
112 iend = m_workers.end();
113 i != iend;
114 ++i ) {
115 if (!i->second.converter()->finalize().isSuccess()) {
116 ATH_MSG_ERROR ("finalizing worker w/ clid=[{}]", i->first);
117 }
118 i->second.converter()->release();
119 }
120 //m_workers.clear();
121 Workers().swap (m_workers);
122
123 if (m_addressCreator) m_addressCreator->addRef();
124 if (m_dataSvc) m_dataSvc->addRef();
125
127 m_dataSvc = 0;
128
129 return StatusCode::SUCCESS;
130}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
std::unordered_map< CLID, WorkerEntry > Workers
Definition AthCnvSvc.h:105

◆ initialize()

StatusCode MuonCalibStreamCnvSvc::initialize ( )
overridevirtual

Initialize the service.

Reimplemented from AthCnvSvc.

Definition at line 31 of file MuonCalibStreamCnvSvc.cxx.

31 {
32 ATH_MSG_INFO("Initializing MuonCalibStreamCnvSvc");
33
35
36 SmartIF<IClassIDSvc> clidSvc{service("ClassIDSvc")};
37 ATH_CHECK( clidSvc.isValid() );
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}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x,...)
virtual StatusCode initialize() override
Gaudi Service Implementation.
virtual IConverter * converter(const CLID &wanted) override
Retrieve converter from list.

◆ initializeConverter()

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

Initialize the new converter.

Definition at line 485 of file AthCnvSvc.cxx.

487{
488 if (cnv) {
489 return cnv->initialize();
490 }
491 return Status::NO_CONVERTER;
492}

◆ loadConverter()

void AthCnvSvc::loadConverter ( DataObject * pObject)
protectedvirtualinherited

Load converter or dictionary needed by the converter.

Definition at line 507 of file AthCnvSvc.cxx.

508{
509}

◆ makeCall()

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

Definition at line 513 of file AthCnvSvc.cxx.

519{
520 if ( 0 != pAddress || ignore_add ) {
521 if ( 0 != pObject || ignore_obj ) {
522 const CLID& obj_class =
523 (0 != pObject && !ignore_obj) ? pObject->clID()
524 : (0 != pAddress && !ignore_add)
525 ? pAddress->clID()
526 : CLID_NULL;
527 IConverter* cnv = converter(obj_class);
528 if ( !cnv && pObject ) {
529 //Give it a try to autoload the class (dictionary) for which the converter is needed
530 loadConverter( pObject);
531 cnv = converter(obj_class);
532 }
533
534 StatusCode status(StatusCode::FAILURE);
535 if ( 0 != cnv ) {
536 switch(typ) {
537 case CREATE_OBJ:
538 status = cnv->createObj(pAddress, pObject);
539 break;
540 case FILL_OBJ_REFS:
541 status = cnv->fillObjRefs(pAddress, pObject);
542 break;
543 case UPDATE_OBJ:
544 status = cnv->updateObj(pAddress, pObject);
545 break;
546 case UPDATE_OBJ_REFS:
547 status = cnv->updateObjRefs(pAddress, pObject);
548 break;
549 case CREATE_REP:
550 status = cnv->createRep(pObject, pAddress);
551 break;
552 case FILL_REP_REFS:
553 status = cnv->fillRepRefs(pAddress, pObject);
554 break;
555 case UPDATE_REP:
556 status = cnv->updateRep(pAddress, pObject);
557 break;
558 case UPDATE_REP_REFS:
559 status = cnv->updateRepRefs(pAddress, pObject);
560 break;
561 default:
562 status = StatusCode::FAILURE;
563 break;
564 }
565 if ( status.isSuccess() && update ) {
566 status = updateServiceState(pAddress);
567 }
568 return status;
569 }
570 status.ignore();
571 ATH_MSG_INFO("No converter for object {} CLID={}",
572 pObject != 0 ? System::typeinfoName(typeid(*pObject)) : "",
573 obj_class);
574 return Status::NO_CONVERTER;
575 }
576 return Status::INVALID_OBJECT;
577 }
578 return Status::INVALID_ADDRESS;
579}
@ UPDATE_OBJ
Definition AthCnvSvc.cxx:32
@ UPDATE_REP
Definition AthCnvSvc.cxx:36
@ UPDATE_REP_REFS
Definition AthCnvSvc.cxx:37
@ UPDATE_OBJ_REFS
Definition AthCnvSvc.cxx:33
virtual StatusCode updateServiceState(IOpaqueAddress *pAddress)
Update state of the service.
virtual void loadConverter(DataObject *pObject)
Load converter or dictionary needed by the converter.

◆ objType()

const CLID & AthCnvSvc::objType ( ) const
overridevirtualinherited

Implementation of IConverter: dummy call.

Definition at line 143 of file AthCnvSvc.cxx.

144{
145 return CLID_NULL;
146}

◆ removeConverter()

StatusCode AthCnvSvc::removeConverter ( const CLID & clid)
overridevirtualinherited

Remove converter object from conversion service (if present).

Definition at line 339 of file AthCnvSvc.cxx.

340{
341 Workers::iterator worker = m_workers.find (clid);
342 if ( worker != m_workers.end() ) {
343 worker->second.converter()->finalize().ignore();
344 worker->second.converter()->release();
345
346 m_workers.erase (worker);
347 return StatusCode::SUCCESS;
348 }
349 return Status::NO_CONVERTER;
350}

◆ repSvcType()

long AthCnvSvc::repSvcType ( ) const
overridevirtualinherited

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

Definition at line 136 of file AthCnvSvc.cxx.

137{
138 return m_type;
139}
long m_type
Conversion service type.
Definition AthCnvSvc.h:314

◆ setAddressCreator()

StatusCode AthCnvSvc::setAddressCreator ( IAddressCreator * creator)
overridevirtualinherited

Set address creator facility.

Definition at line 203 of file AthCnvSvc.cxx.

204{
205 m_addressCreator = creator;
206 Workers::iterator stop = m_workers.end();
207 Workers::iterator start = m_workers.begin();
208 for(Workers::iterator i=start; i != stop; ++i ) {
209 IConverter* cnv = i->second.converter();
210 if ( 0 != cnv ) {
211 if (cnv->setAddressCreator(m_addressCreator).isFailure()) {
212 ATH_MSG_ERROR ("setting Address Creator");
213 }
214 }
215 }
216 return StatusCode::SUCCESS;
217}

◆ setConversionSvc()

StatusCode AthCnvSvc::setConversionSvc ( IConversionSvc * svc)
overridevirtualinherited

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

Definition at line 188 of file AthCnvSvc.cxx.

189{
190 return StatusCode::FAILURE;
191}

◆ setDataProvider()

StatusCode AthCnvSvc::setDataProvider ( IDataProviderSvc * pDataSvc)
overridevirtualinherited

Implementation of IConverter: Set Data provider service.

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

Definition at line 153 of file AthCnvSvc.cxx.

154{
155 if ( !pDataSvc ) return StatusCode::SUCCESS; //Atlas does not use DataSvc
156 if ( m_dataSvc ) m_dataSvc->release();
157 m_dataSvc = pDataSvc;
158 m_dataSvc->addRef();
159 Workers::iterator stop = m_workers.end();
160 Workers::iterator start = m_workers.begin();
161 for(Workers::iterator i=start; i != stop; ++i ) {
162 IConverter* cnv = i->second.converter();
163 if ( 0 != cnv ) {
164 if (cnv->setDataProvider(m_dataSvc).isFailure()) {
165 ATH_MSG_ERROR ("setting Data Provider");
166 }
167 }
168 }
169 return StatusCode::SUCCESS;
170}

◆ updateObj()

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

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

Definition at line 249 of file AthCnvSvc.cxx.

250{
251 return makeCall (UPDATE_OBJ, false, true, false, pAddress, pObject);
252}

◆ updateObjRefs()

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

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

Definition at line 257 of file AthCnvSvc.cxx.

258{
259 return makeCall (UPDATE_OBJ_REFS, false, true, true, pAddress, pObject);
260}

◆ updateRep()

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

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

Definition at line 281 of file AthCnvSvc.cxx.

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

◆ updateRepRefs()

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

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

Definition at line 289 of file AthCnvSvc.cxx.

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

◆ updateServiceState()

StatusCode MuonCalibStreamCnvSvc::updateServiceState ( IOpaqueAddress * pAddress)
overridevirtual

Update state of the service.

Reimplemented from AthCnvSvc.

Definition at line 59 of file MuonCalibStreamCnvSvc.cxx.

59 {
60 if (pAddress != 0) {
61 GenericAddress *pAddr = dynamic_cast<GenericAddress *>(pAddress);
62 if (pAddr != 0) { return StatusCode::SUCCESS; }
63 }
64 return StatusCode::FAILURE;
65}

Member Data Documentation

◆ m_addressCreator

SmartIF<IAddressCreator> AthCnvSvc::m_addressCreator
protectedinherited

Pointer to the address creation service interface.

Definition at line 312 of file AthCnvSvc.h.

◆ m_convsvc_mut

CallMutex AthCnvSvc::m_convsvc_mut
protectedinherited

Definition at line 319 of file AthCnvSvc.h.

◆ m_dataSvc

SmartIF<IDataProviderSvc> AthCnvSvc::m_dataSvc
protectedinherited

Pointer to data provider service.

Definition at line 310 of file AthCnvSvc.h.

◆ m_initCnvs

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

Definition at line 18 of file MuonCalibStreamCnvSvc.h.

◆ m_type

long AthCnvSvc::m_type
protectedinherited

Conversion service type.

Definition at line 314 of file AthCnvSvc.h.

◆ m_workers

Workers AthCnvSvc::m_workers
protectedinherited

List of conversion workers.

Definition at line 316 of file AthCnvSvc.h.


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