ATLAS Offline Software
Loading...
Searching...
No Matches
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
13
14
#ifndef ATHENAPOOLTESTDATA_ATHENAPOOLTESTMAPDATALINK_H
15
# define ATHENAPOOLTESTDATA_ATHENAPOOLTESTMAPDATALINK_H
16
23
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::ExtendedBarCode
Definition
AthenaPoolTestMapDataLink.h:50
AthenaPoolTestMapDataLink::ExtendedBarCode::m_evtIndex
unsigned short m_evtIndex
Definition
AthenaPoolTestMapDataLink.h:60
AthenaPoolTestMapDataLink::ExtendedBarCode::m_BC
unsigned long m_BC
Definition
AthenaPoolTestMapDataLink.h:59
AthenaPoolTestMapDataLink::ExtendedBarCode::eventIndex
unsigned short eventIndex() const
Definition
AthenaPoolTestMapDataLink.h:83
AthenaPoolTestMapDataLink::ExtendedBarCode::barcode
unsigned long barcode() const
Definition
AthenaPoolTestMapDataLink.h:77
AthenaPoolTestMapDataLink::ExtendedBarCode::ExtendedBarCode
ExtendedBarCode()
Definition
AthenaPoolTestMapDataLink.h:68
AthenaPoolTestMapDataLink::m_particle
MyDummyClass * m_particle
Definition
AthenaPoolTestMapDataLink.h:63
AthenaPoolTestMapDataLink::cptr
const MyDummyClass * cptr() const
Definition
AthenaPoolTestMapDataLink.h:104
AthenaPoolTestMapDataLink::AthenaPoolTestMapDataLink
AthenaPoolTestMapDataLink()
Definition
AthenaPoolTestMapDataLink.h:89
AthenaPoolTestMapDataLink::barcode
int barcode() const
Definition
AthenaPoolTestMapDataLink.h:100
AthenaPoolTestMapDataLink::eventIndex
index_type eventIndex() const
Definition
AthenaPoolTestMapDataLink.h:111
AthenaPoolTestMapDataLink::index_type
unsigned int index_type
Definition
AthenaPoolTestMapDataLink.h:33
AthenaPoolTestMapDataLink::m_extBarcode
ExtendedBarCode m_extBarcode
Definition
AthenaPoolTestMapDataLink.h:64
Generated on
for ATLAS Offline Software by
1.14.0