ATLAS Offline Software
Loading...
Searching...
No Matches
Control
DataModelAthenaPool
DataModelAthenaPool
ElementLink_p2.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef DATAMODELATHENAPOOL_ELEMENTLINK_P2_H
6
#define DATAMODELATHENAPOOL_ELEMENTLINK_P2_H
7
12
13
#include <string>
14
#include <inttypes.h>
15
25
26
template
<
class
INDEXTYPE>
27
class
ElementLink_p2
{
28
public
:
29
30
ElementLink_p2
()
31
:
m_contIndex
(0),
32
m_elementIndex
()
33
{}
34
35
uint32_t
m_contIndex
;
36
INDEXTYPE
m_elementIndex
;
37
};
38
39
// If you define more ElementLink_pN types, remember to add template instantiations to the Dict file
40
41
typedef
ElementLink_p2<uint32_t>
ElementLinkInt_p2
;
42
typedef
ElementLink_p2<std::string>
ElementLinkStr_p2
;
43
44
45
46
// Helper template for conversion from the index type in transient ElementLink
47
// to the persistent index type
48
49
template
<
typename
ContIndxType>
50
struct
GenerateELinkIndexType_p2
{
51
// typedef MISSING_DEFINITION_OF_GenerateELinkIndexType_FOR_<ContIndxType> type;
52
};
53
54
template
<>
55
struct
GenerateELinkIndexType_p2
<uint32_t> {
56
typedef
uint32_t
type
;
57
};
58
59
template
<>
60
struct
GenerateELinkIndexType_p2
<uint64_t> {
61
typedef
uint32_t
type
;
62
};
63
64
template
<>
65
struct
GenerateELinkIndexType_p2
<int> {
66
typedef
uint32_t
type
;
67
};
68
69
#ifdef __APPLE__
70
template
<>
71
struct
GenerateELinkIndexType_p2
<size_t> {
72
typedef
uint32_t
type
;
73
};
74
#endif
75
76
template
<>
77
struct
GenerateELinkIndexType_p2
<
std
::
string
> {
78
typedef
std::string
type
;
79
};
80
81
82
// Helper template to generate type of the persistent ElementLink_pN
83
// from the type of the transient ElementLink
84
// Used in the ElementlinkCnv_pN
85
86
template
<
class
LINK>
87
struct
GeneratePersELinkType_p2
{
88
typedef
ElementLink_p2<typename GenerateELinkIndexType_p2<typename LINK::index_type>::type
>
type
;
89
};
90
91
#endif
// DATAMODELATHENAPOOL_ELEMENTLINK_P2_H
92
93
ElementLinkInt_p2
ElementLink_p2< uint32_t > ElementLinkInt_p2
Definition
ElementLink_p2.h:41
ElementLinkStr_p2
ElementLink_p2< std::string > ElementLinkStr_p2
Definition
ElementLink_p2.h:42
ElementLink_p2
Definition
ElementLink_p2.h:27
ElementLink_p2< uint32_t >::m_contIndex
uint32_t m_contIndex
Definition
ElementLink_p2.h:35
ElementLink_p2< uint32_t >::m_elementIndex
uint32_t m_elementIndex
Definition
ElementLink_p2.h:36
ElementLink_p2::ElementLink_p2
ElementLink_p2()
Definition
ElementLink_p2.h:30
string
STL class.
std
STL namespace.
GenerateELinkIndexType_p2< int >::type
uint32_t type
Definition
ElementLink_p2.h:66
GenerateELinkIndexType_p2< std::string >::type
std::string type
Definition
ElementLink_p2.h:78
GenerateELinkIndexType_p2< uint32_t >::type
uint32_t type
Definition
ElementLink_p2.h:56
GenerateELinkIndexType_p2< uint64_t >::type
uint32_t type
Definition
ElementLink_p2.h:61
GenerateELinkIndexType_p2
Definition
ElementLink_p2.h:50
type
GeneratePersELinkType_p2
Definition
ElementLink_p2.h:87
GeneratePersELinkType_p2::type
ElementLink_p2< typename GenerateELinkIndexType_p2< typename LINK::index_type >::type > type
Definition
ElementLink_p2.h:88
Generated on
for ATLAS Offline Software by
1.14.0