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

This class provides the converter for the AthenaAttributeList class. More...

#include <CondAttrListVecCnv.h>

Inheritance diagram for CondAttrListVecCnv:
Collaboration diagram for CondAttrListVecCnv:

Public Member Functions

virtual ~CondAttrListVecCnv ()
 Destructor.
virtual StatusCode initialize ()
 Gaudi Service Interface method implementations:
virtual StatusCode createObj (IOpaqueAddress *pAddr, DataObject *&pObj)
 Create a transient object from a POOL persistent representation.
virtual StatusCode createRep (DataObject *pObj, IOpaqueAddress *&pAddr)
 Create a POOL persistent representation for a transient object.
virtual long int repSvcType () const
 CondAttrListVecCnv (ISvcLocator *svcloc)
 Constructor.

Static Public Member Functions

static long storageType ()
static CLID classID ()

Detailed Description

This class provides the converter for the AthenaAttributeList class.

Definition at line 28 of file CondAttrListVecCnv.h.

Constructor & Destructor Documentation

◆ ~CondAttrListVecCnv()

CondAttrListVecCnv::~CondAttrListVecCnv ( )
virtual

Destructor.

Definition at line 32 of file CondAttrListVecCnv.cxx.

32 {
33}

◆ CondAttrListVecCnv()

CondAttrListVecCnv::CondAttrListVecCnv ( ISvcLocator * svcloc)

Constructor.

Definition at line 103 of file CondAttrListVecCnv.cxx.

103 :
104 Converter(storageType(), classID(), svcloc) {
105}

Member Function Documentation

◆ classID()

CLID CondAttrListVecCnv::classID ( )
static
Returns
class ID.

Definition at line 99 of file CondAttrListVecCnv.cxx.

◆ createObj()

StatusCode CondAttrListVecCnv::createObj ( IOpaqueAddress * pAddr,
DataObject *& pObj )
virtual

Create a transient object from a POOL persistent representation.

Parameters
pAddr[IN] IOpaqueAddress of POOL persistent representation.
pObj[OUT] pointer to the transient object.

Definition at line 47 of file CondAttrListVecCnv.cxx.

47 {
48
49 // This is the "read" method for an AttributeList. Here we only
50 // extract an AthenaAttributeList pointer from an
51 // AthenaAttrListAddress and return it
52
53 MsgStream log(msgSvc(), "CondAttrListVecCnv");
54 log << MSG::DEBUG << "Creating CondAttrListVecAddress Object" << endmsg;
55
56 CondAttrListVecAddress* addr = dynamic_cast<CondAttrListVecAddress*>(pAddr);
57
58 if (addr) {
59 // Successful cast
60 pObj = SG::asStorable(addr->attrListVec());
61 if (!pObj) {
62 log << MSG::ERROR << "CondAttrListVec ptr is 0 from CondAttrListVecAddress " << endmsg;
63 return(StatusCode::FAILURE);
64 }
65 } else {
66 log << MSG::ERROR << "Could not extract ptr for CondAttrListVecAddress " << endmsg;
67 return(StatusCode::FAILURE);
68 }
69
70 return(StatusCode::SUCCESS);
71}
#define endmsg
CondAttrListVec * attrListVec()
Access to CondAttrListVec.
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)

◆ createRep()

StatusCode CondAttrListVecCnv::createRep ( DataObject * pObj,
IOpaqueAddress *& pAddr )
virtual

Create a POOL persistent representation for a transient object.

Parameters
pObj[IN] pointer to the transient object.
pAddr[OUT] IOpaqueAddress of POOL persistent representation.

Definition at line 73 of file CondAttrListVecCnv.cxx.

73 {
74
75 // This is the "write" method for an AttributeList. Here we only
76 // create an AthenaAttrListAddress and fill it with a pointer to
77 // the AthenaAttributeList
78
79 MsgStream log(msgSvc(), "CondAttrListVecCnv");
80 log << MSG::DEBUG << "Copy CondAttrListVec ptr into CondAttrListVecAddress" << endmsg;
81
82 CondAttrListVec* list = 0; //dynamic_cast<AthenaAttributeList*>(pObj);
83 SG::fromStorable(pObj, list);
84 if ( pAddr != nullptr ) pAddr->release();
85 CondAttrListVecAddress* addr = new CondAttrListVecAddress(storageType(),
86 classID(),
87 "POOLContainer_CondAttrListVec][CLID=x");
88 addr->setAttrListVec(list);
89 pAddr = addr;
90 pAddr->addRef();
91 log << MSG::DEBUG << "Created CondAttrListVec with list ptr: " << list << endmsg;
92 return(StatusCode::SUCCESS);
93}
void setAttrListVec(CondAttrListVec *attrListVec)
Add CondAttrListVec.
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
list(name, path='/')
Definition histSizes.py:38

◆ initialize()

StatusCode CondAttrListVecCnv::initialize ( )
virtual

Gaudi Service Interface method implementations:

Definition at line 35 of file CondAttrListVecCnv.cxx.

35 {
36 MsgStream log(msgSvc(), "CondAttrListVecCnv");
37
38 log << MSG::DEBUG << "initialize() in CondAttrListVecCnv" << endmsg;
39 StatusCode status = Converter::initialize();
40 if (!status.isSuccess()) {
41 log << MSG::ERROR << "Can not initialize Converter base class." << endmsg;
42 return(status);
43 }
44 return(status);
45}
::StatusCode StatusCode
StatusCode definition for legacy code.
status
Definition merge.py:16

◆ repSvcType()

long int CondAttrListVecCnv::repSvcType ( ) const
virtual
Returns
storage type.

Definition at line 27 of file CondAttrListVecCnv.cxx.

27 {
28 return(storageType());
29}

◆ storageType()

long CondAttrListVecCnv::storageType ( )
static
Returns
storage type.

Definition at line 95 of file CondAttrListVecCnv.cxx.

95 {
97}
int type() const
Access to full type.
Definition DbType.h:65
static const DbType POOL_StorageType
Definition DbType.h:84

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