ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
HDF5Utils
HDF5Utils
H5Traits.h
Go to the documentation of this file.
1
// this is -*- C++ -*-
2
/*
3
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
4
*/
5
6
#ifndef H5_TRAITS_H
7
#define H5_TRAITS_H
8
15
16
17
namespace
H5
{
18
class
DataType
;
19
}
20
21
namespace
H5Utils
{
22
25
26
namespace
internal {
27
33
union
data_buffer_t
34
{
35
int
u_int
;
36
long
u_long
;
37
long
long
u_llong
;
38
unsigned
long
u_ulong
;
39
unsigned
long
long
u_ullong
;
40
unsigned
int
u_uint
;
41
unsigned
char
u_uchar
;
42
char
u_char
;
43
float
u_float
;
44
double
u_double
;
45
bool
u_bool
;
46
short
u_short
;
47
unsigned
short
u_ushort
;
48
};
49
54
template
<
typename
T>
struct
H5Traits
;
55
template
<>
struct
H5Traits
<int> {
56
static
const
H5::DataType
type
;
57
static
int
&
ref
(
data_buffer_t
& buf) {
return
buf.u_int; }
58
};
59
template
<>
struct
H5Traits
<long> {
60
static
const
H5::DataType
type
;
61
static
long
&
ref
(
data_buffer_t
& buf) {
return
buf.u_long; }
62
};
63
template
<>
struct
H5Traits
<long long> {
64
static
const
H5::DataType
type
;
65
static
long
long
&
ref
(
data_buffer_t
& buf) {
return
buf.u_llong; }
66
};
67
template
<>
struct
H5Traits
<unsigned long> {
68
static
const
H5::DataType
type
;
69
static
unsigned
long
&
ref
(
data_buffer_t
& buf) {
return
buf.u_ulong; }
70
};
71
template
<>
struct
H5Traits
<unsigned long long> {
72
static
const
H5::DataType
type
;
73
static
unsigned
long
long
&
ref
(
data_buffer_t
& buf) {
return
buf.u_ullong; }
74
};
75
template
<>
struct
H5Traits
<unsigned int> {
76
static
const
H5::DataType
type
;
77
static
unsigned
int
&
ref
(
data_buffer_t
& buf) {
return
buf.u_uint; }
78
};
79
template
<>
struct
H5Traits
<unsigned char> {
80
static
const
H5::DataType
type
;
81
static
unsigned
char
&
ref
(
data_buffer_t
& buf) {
return
buf.u_uchar; }
82
};
83
template
<>
struct
H5Traits
<char> {
84
static
const
H5::DataType
type
;
85
static
char
&
ref
(
data_buffer_t
& buf) {
return
buf.u_char; }
86
};
87
template
<>
struct
H5Traits
<float> {
88
static
const
H5::DataType
type
;
89
static
float
&
ref
(
data_buffer_t
& buf) {
return
buf.u_float; }
90
};
91
template
<>
struct
H5Traits
<double> {
92
static
const
H5::DataType
type
;
93
static
double
&
ref
(
data_buffer_t
& buf) {
return
buf.u_double; }
94
};
95
template
<>
struct
H5Traits
<bool> {
96
static
const
H5::DataType
type
;
97
static
bool
&
ref
(
data_buffer_t
& buf) {
return
buf.u_bool; }
98
};
99
template
<>
struct
H5Traits
<short> {
100
static
const
H5::DataType
type
;
101
static
short
&
ref
(
data_buffer_t
& buf) {
return
buf.u_short; }
102
};
103
template
<>
struct
H5Traits
<unsigned short> {
104
static
const
H5::DataType
type
;
105
static
unsigned
short
&
ref
(
data_buffer_t
& buf) {
return
buf.u_ushort; }
106
};
107
108
}
110
}
111
112
#endif
DataType
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
Definition
CTPResultByteStreamTool.cxx:22
H5Utils
HDF5 Tuple Writer.
Definition
CompressedTypes.h:16
H5
HDF5 Traits.
Definition
H5Traits.h:17
H5Utils::internal::H5Traits< bool >::ref
static bool & ref(data_buffer_t &buf)
Definition
H5Traits.h:97
H5Utils::internal::H5Traits< bool >::type
static const H5::DataType type
Definition
H5Traits.h:96
H5Utils::internal::H5Traits< char >::ref
static char & ref(data_buffer_t &buf)
Definition
H5Traits.h:85
H5Utils::internal::H5Traits< char >::type
static const H5::DataType type
Definition
H5Traits.h:84
H5Utils::internal::H5Traits< double >::type
static const H5::DataType type
Definition
H5Traits.h:92
H5Utils::internal::H5Traits< double >::ref
static double & ref(data_buffer_t &buf)
Definition
H5Traits.h:93
H5Utils::internal::H5Traits< float >::ref
static float & ref(data_buffer_t &buf)
Definition
H5Traits.h:89
H5Utils::internal::H5Traits< float >::type
static const H5::DataType type
Definition
H5Traits.h:88
H5Utils::internal::H5Traits< int >::type
static const H5::DataType type
Definition
H5Traits.h:56
H5Utils::internal::H5Traits< int >::ref
static int & ref(data_buffer_t &buf)
Definition
H5Traits.h:57
H5Utils::internal::H5Traits< long >::ref
static long & ref(data_buffer_t &buf)
Definition
H5Traits.h:61
H5Utils::internal::H5Traits< long >::type
static const H5::DataType type
Definition
H5Traits.h:60
H5Utils::internal::H5Traits< long long >::type
static const H5::DataType type
Definition
H5Traits.h:64
H5Utils::internal::H5Traits< long long >::ref
static long long & ref(data_buffer_t &buf)
Definition
H5Traits.h:65
H5Utils::internal::H5Traits< short >::type
static const H5::DataType type
Definition
H5Traits.h:100
H5Utils::internal::H5Traits< short >::ref
static short & ref(data_buffer_t &buf)
Definition
H5Traits.h:101
H5Utils::internal::H5Traits< unsigned char >::ref
static unsigned char & ref(data_buffer_t &buf)
Definition
H5Traits.h:81
H5Utils::internal::H5Traits< unsigned char >::type
static const H5::DataType type
Definition
H5Traits.h:80
H5Utils::internal::H5Traits< unsigned int >::ref
static unsigned int & ref(data_buffer_t &buf)
Definition
H5Traits.h:77
H5Utils::internal::H5Traits< unsigned int >::type
static const H5::DataType type
Definition
H5Traits.h:76
H5Utils::internal::H5Traits< unsigned long >::ref
static unsigned long & ref(data_buffer_t &buf)
Definition
H5Traits.h:69
H5Utils::internal::H5Traits< unsigned long >::type
static const H5::DataType type
Definition
H5Traits.h:68
H5Utils::internal::H5Traits< unsigned long long >::type
static const H5::DataType type
Definition
H5Traits.h:72
H5Utils::internal::H5Traits< unsigned long long >::ref
static unsigned long long & ref(data_buffer_t &buf)
Definition
H5Traits.h:73
H5Utils::internal::H5Traits< unsigned short >::ref
static unsigned short & ref(data_buffer_t &buf)
Definition
H5Traits.h:105
H5Utils::internal::H5Traits< unsigned short >::type
static const H5::DataType type
Definition
H5Traits.h:104
H5Utils::internal::H5Traits
We have lots of code to get around HDF5's rather weak typing.
Definition
H5Traits.h:54
H5Utils::internal::data_buffer_t
data_buffer_t
Definition
H5Traits.h:34
H5Utils::internal::data_buffer_t::u_uchar
unsigned char u_uchar
Definition
H5Traits.h:41
H5Utils::internal::data_buffer_t::u_short
short u_short
Definition
H5Traits.h:46
H5Utils::internal::data_buffer_t::u_bool
bool u_bool
Definition
H5Traits.h:45
H5Utils::internal::data_buffer_t::u_double
double u_double
Definition
H5Traits.h:44
H5Utils::internal::data_buffer_t::u_long
long u_long
Definition
H5Traits.h:36
H5Utils::internal::data_buffer_t::u_ulong
unsigned long u_ulong
Definition
H5Traits.h:38
H5Utils::internal::data_buffer_t::u_int
int u_int
Definition
H5Traits.h:35
H5Utils::internal::data_buffer_t::u_ushort
unsigned short u_ushort
Definition
H5Traits.h:47
H5Utils::internal::data_buffer_t::u_float
float u_float
Definition
H5Traits.h:43
H5Utils::internal::data_buffer_t::u_llong
long long u_llong
Definition
H5Traits.h:37
H5Utils::internal::data_buffer_t::u_char
char u_char
Definition
H5Traits.h:42
H5Utils::internal::data_buffer_t::u_uint
unsigned int u_uint
Definition
H5Traits.h:40
H5Utils::internal::data_buffer_t::u_ullong
unsigned long long u_ullong
Definition
H5Traits.h:39
Generated on
for ATLAS Offline Software by
1.17.0