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

This class is an object reference used in Athena persistent data model. More...

#include <TPObjRef.h>

Collaboration diagram for TPObjRef:

Classes

class  typeID_t
 This structure holds an ID of a persistent type. More...

Public Member Functions

 TPObjRef ()
 Default constructor - generates and empty reference (like a NULL pointer)
 TPObjRef (const typeID_t &typeID, int index)
 Constructor with parameters.
bool isNull () const
 Tests if the reference is NULL.
unsigned typeID () const
 returns the type ID (as integer) of the referenced object
unsigned short topLevelCnvID () const
 returns the ID if the top-level converter for the referenced object
unsigned index () const
 returns the position of the referenced object in the storage vector

Protected Attributes

typeID_t m_typeID
 the type ID of the referenced object
unsigned m_index
 the position of the referenced object in the storage vecto

Detailed Description

This class is an object reference used in Athena persistent data model.

It replaces transient pointers and can also replace embedding and inheritance. Works only inside a single top-level persistent object or group of objects created by a given AthenaPool converter.

Author
Marci.nosp@m.n.No.nosp@m.wak@c.nosp@m.ern..nosp@m.ch

Definition at line 20 of file TPObjRef.h.

Constructor & Destructor Documentation

◆ TPObjRef() [1/2]

TPObjRef::TPObjRef ( )
inline

Default constructor - generates and empty reference (like a NULL pointer)

Definition at line 56 of file TPObjRef.h.

56: m_index(0) {}
unsigned m_index
the position of the referenced object in the storage vecto
Definition TPObjRef.h:81

◆ TPObjRef() [2/2]

TPObjRef::TPObjRef ( const typeID_t & typeID,
int index )
inline

Constructor with parameters.

Parameters
[in]typeIDtype ID of the persistent object the reference is pointing to
[in]indexposition of the object in the storage vector in the top-level persistent object

Definition at line 62 of file TPObjRef.h.

65 { }
unsigned index() const
returns the position of the referenced object in the storage vector
Definition TPObjRef.h:77
unsigned typeID() const
returns the type ID (as integer) of the referenced object
Definition TPObjRef.h:71
typeID_t m_typeID
the type ID of the referenced object
Definition TPObjRef.h:80

Member Function Documentation

◆ index()

unsigned TPObjRef::index ( ) const
inline

returns the position of the referenced object in the storage vector

Definition at line 77 of file TPObjRef.h.

77{ return m_index; }

◆ isNull()

bool TPObjRef::isNull ( ) const
inline

Tests if the reference is NULL.

Definition at line 68 of file TPObjRef.h.

68{ return m_typeID.isNull(); }

◆ topLevelCnvID()

unsigned short TPObjRef::topLevelCnvID ( ) const
inline

returns the ID if the top-level converter for the referenced object

Definition at line 74 of file TPObjRef.h.

74{ return m_typeID.topLevelCnvID(); }

◆ typeID()

unsigned TPObjRef::typeID ( ) const
inline

returns the type ID (as integer) of the referenced object

Definition at line 71 of file TPObjRef.h.

71{ return m_typeID.value(); }

Member Data Documentation

◆ m_index

unsigned TPObjRef::m_index
protected

the position of the referenced object in the storage vecto

Definition at line 81 of file TPObjRef.h.

◆ m_typeID

typeID_t TPObjRef::m_typeID
protected

the type ID of the referenced object

Definition at line 80 of file TPObjRef.h.


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