ATLAS Offline Software
Classes | Public Member Functions | Protected Attributes | List of all members
TPObjRef Class Reference

#include <TPObjRef.h>

Collaboration diagram for TPObjRef:

Classes

class  typeID_t
 

Public Member Functions

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

Protected Attributes

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

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) {}

◆ 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.

63  : m_typeID(typeID),
64  m_index(index)
65  { }

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:
TPObjRef::m_index
unsigned m_index
the position of the referenced object in the storage vecto
Definition: TPObjRef.h:81
TPObjRef::typeID_t::value
unsigned value() const
Returns the type ID as an integer.
Definition: TPObjRef.h:46
index
Definition: index.py:1
TPObjRef::m_typeID
typeID_t m_typeID
the type ID of the referenced object
Definition: TPObjRef.h:80
TPObjRef::typeID_t::isNull
bool isNull() const
Tests if the type is defined.
Definition: TPObjRef.h:49
TPObjRef::typeID_t::topLevelCnvID
unsigned short topLevelCnvID() const
Returns the ID of the top-level TP converter.
Definition: TPObjRef.h:40
TPObjRef::typeID
unsigned typeID() const
returns the type ID (as integer) of the referenced object
Definition: TPObjRef.h:71