ATLAS Offline Software
Loading...
Searching...
No Matches
TPObjRef.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TPObjRef_H
6#define TPObjRef_H
7
18
19
20class TPObjRef {
21public:
22
31 struct typeID_t {
36 typeID_t( unsigned short tlCnvID=0, unsigned short cnvID=0 )
37 : m_TLCnvID(tlCnvID), m_cnvID(cnvID) {}
38
40 unsigned short topLevelCnvID() const { return m_TLCnvID; }
41
43 unsigned short cnvID() const { return m_cnvID; }
44
46 unsigned value() const { return m_TLCnvID<<16 | m_cnvID; }
47
49 bool isNull() const { return !(m_TLCnvID | m_cnvID); }
50
51 unsigned short m_TLCnvID;
52 unsigned short m_cnvID;
53 };
54
56 TPObjRef() : m_index(0) {}
57
65 { }
66
68 bool isNull() const { return m_typeID.isNull(); }
69
71 unsigned typeID() const { return m_typeID.value(); }
72
74 unsigned short topLevelCnvID() const { return m_typeID.topLevelCnvID(); }
75
77 unsigned index() const { return m_index; }
78
79protected:
81 unsigned m_index;
82};
83
84
85#endif
86
87
88
89
90
91
bool isNull() const
Tests if the reference is NULL.
Definition TPObjRef.h:68
TPObjRef(const typeID_t &typeID, int index)
Constructor with parameters.
Definition TPObjRef.h:62
unsigned index() const
returns the position of the referenced object in the storage vector
Definition TPObjRef.h:77
TPObjRef()
Default constructor - generates and empty reference (like a NULL pointer)
Definition TPObjRef.h:56
unsigned m_index
the position of the referenced object in the storage vecto
Definition TPObjRef.h:81
unsigned short topLevelCnvID() const
returns the ID if the top-level converter for the referenced object
Definition TPObjRef.h:74
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
Definition index.py:1
This structure holds an ID of a persistent type.
Definition TPObjRef.h:31
unsigned short cnvID() const
Returns the ID of the basic TP converter.
Definition TPObjRef.h:43
unsigned short m_TLCnvID
ID of the top-level TP converter.
Definition TPObjRef.h:51
bool isNull() const
Tests if the type is defined.
Definition TPObjRef.h:49
typeID_t(unsigned short tlCnvID=0, unsigned short cnvID=0)
Constructor:
Definition TPObjRef.h:36
unsigned value() const
Returns the type ID as an integer.
Definition TPObjRef.h:46
unsigned short topLevelCnvID() const
Returns the ID of the top-level TP converter.
Definition TPObjRef.h:40
unsigned short m_cnvID
ID if the basic TP converter (inside the TL converter)
Definition TPObjRef.h:52