ATLAS Offline Software
AtlasTest
DatabaseTest
AthenaPoolTestData
AthenaPoolTestData
AthenaPoolTestMapDataLink.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
14
#ifndef ATHENAPOOLTESTDATA_ATHENAPOOLTESTMAPDATALINK_H
15
# define ATHENAPOOLTESTDATA_ATHENAPOOLTESTMAPDATALINK_H
16
24
#include <cassert>
25
#include <iostream>
26
#include <limits>
/* numeric_limits */
27
#include <string>
28
29
class
MyDummyClass;
30
31
class
AthenaPoolTestMapDataLink
{
32
public
:
33
typedef
unsigned
int
index_type
;
34
36
37
AthenaPoolTestMapDataLink
();
38
AthenaPoolTestMapDataLink
(
index_type
barCode,
index_type
eventIndex
= 0);
39
AthenaPoolTestMapDataLink
(
const
MyDummyClass*
p
,
index_type
eventIndex
= 0);
41
43
44
int
barcode
()
const
;
45
index_type
eventIndex
()
const
;
47
48
const
MyDummyClass*
cptr
()
const
;
49
50
class
ExtendedBarCode
{
51
public
:
52
ExtendedBarCode
();
53
ExtendedBarCode
(
index_type
barcode
,
index_type
eventIndex
);
54
55
unsigned
long
barcode
()
const
;
56
unsigned
short
eventIndex
()
const
;
57
58
private
:
59
unsigned
long
m_BC
;
60
unsigned
short
m_evtIndex
;
61
};
62
private
:
63
MyDummyClass*
m_particle
;
/* transient */
64
ExtendedBarCode
m_extBarcode
;
65
};
66
67
68
inline
AthenaPoolTestMapDataLink::ExtendedBarCode::ExtendedBarCode
() : m_BC(0), m_evtIndex(0) {}
69
70
inline
AthenaPoolTestMapDataLink::ExtendedBarCode::ExtendedBarCode
(
index_type
barcode
,
index_type
eventIndex
) :
71
m_BC(
barcode
), m_evtIndex(
eventIndex
)
72
{
73
assert(
eventIndex
<
std::numeric_limits<unsigned short>::max
());
74
}
75
76
inline
unsigned
long \
77
AthenaPoolTestMapDataLink::ExtendedBarCode::barcode
()
const
78
{
79
return
(m_BC);
80
}
81
82
inline
unsigned
short
83
AthenaPoolTestMapDataLink::ExtendedBarCode::eventIndex
()
const
84
{
85
return
(m_evtIndex);
86
}
87
88
inline
89
AthenaPoolTestMapDataLink::AthenaPoolTestMapDataLink
() :
m_particle
(0),
m_extBarcode
() {}
90
91
inline
92
AthenaPoolTestMapDataLink::AthenaPoolTestMapDataLink
(
index_type
barCode,
index_type
eventIndex
) :
93
m_particle(0), m_extBarcode(barCode,
eventIndex
) {}
94
95
inline
96
AthenaPoolTestMapDataLink::AthenaPoolTestMapDataLink
(
const
MyDummyClass*
/*p*/
,
index_type
eventIndex
) :
97
m_particle(0), m_extBarcode(0,
eventIndex
) {}
98
99
inline
int
100
AthenaPoolTestMapDataLink::barcode
()
const
101
{
return
int
(
m_extBarcode
.
barcode
()); }
//FIXME ret type
102
103
inline
const
MyDummyClass*
104
AthenaPoolTestMapDataLink::cptr
()
const
105
{
106
return
(
m_particle
);
107
}
108
109
110
inline
AthenaPoolTestMapDataLink::index_type
111
AthenaPoolTestMapDataLink::eventIndex
()
const
112
{
return
index_type
(
m_extBarcode
.
eventIndex
()); }
113
114
115
//<<<<<< INLINE PUBLIC FUNCTIONS >>>>>>
116
//<<<<<< INLINE MEMBER FUNCTIONS >>>>>>
117
118
#endif // ATHENAPOOLTESTDATA_ATHENAPOOLTESTMAPDATALINK_H
AthenaPoolTestMapDataLink::m_extBarcode
ExtendedBarCode m_extBarcode
Definition:
AthenaPoolTestMapDataLink.h:64
AthenaPoolTestMapDataLink
Definition:
AthenaPoolTestMapDataLink.h:31
AthenaPoolTestMapDataLink::eventIndex
index_type eventIndex() const
Definition:
AthenaPoolTestMapDataLink.h:111
CaloCellPos2Ntuple.int
int
Definition:
CaloCellPos2Ntuple.py:24
max
constexpr double max()
Definition:
ap_fixedTest.cxx:33
AthenaPoolTestMapDataLink::ExtendedBarCode::m_evtIndex
unsigned short m_evtIndex
Definition:
AthenaPoolTestMapDataLink.h:60
AthenaPoolTestMapDataLink::AthenaPoolTestMapDataLink
AthenaPoolTestMapDataLink()
Definition:
AthenaPoolTestMapDataLink.h:89
AthenaPoolTestMapDataLink::ExtendedBarCode::m_BC
unsigned long m_BC
Definition:
AthenaPoolTestMapDataLink.h:59
AthenaPoolTestMapDataLink::ExtendedBarCode::barcode
unsigned long barcode() const
Definition:
AthenaPoolTestMapDataLink.h:77
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
AthenaPoolTestMapDataLink::ExtendedBarCode::eventIndex
unsigned short eventIndex() const
Definition:
AthenaPoolTestMapDataLink.h:83
HepMC::barcode
int barcode(const T *p)
Definition:
Barcode.h:16
AthenaPoolTestMapDataLink::index_type
unsigned int index_type
Definition:
AthenaPoolTestMapDataLink.h:33
AthenaPoolTestMapDataLink::cptr
const MyDummyClass * cptr() const
Definition:
AthenaPoolTestMapDataLink.h:104
AthenaPoolTestMapDataLink::barcode
int barcode() const
Definition:
AthenaPoolTestMapDataLink.h:100
AthenaPoolTestMapDataLink::m_particle
MyDummyClass * m_particle
Definition:
AthenaPoolTestMapDataLink.h:63
AthenaPoolTestMapDataLink::ExtendedBarCode
Definition:
AthenaPoolTestMapDataLink.h:50
AthenaPoolTestMapDataLink::ExtendedBarCode::ExtendedBarCode
ExtendedBarCode()
Definition:
AthenaPoolTestMapDataLink.h:68
EventInfoCnvParams::eventIndex
thread_local event_number_t eventIndex
Definition:
IEvtIdModifierSvc.h:34
Generated on Sun Dec 22 2024 21:07:13 for ATLAS Offline Software by
1.8.18