ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
HDF5Utils
HDF5Utils
HistAxis.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef HDF5Utils_HistAxis_H
6
#define HDF5Utils_HistAxis_H
7
8
#include <cstdint>
9
#include <string>
10
#include <utility>
11
#include <variant>
12
#include <vector>
13
14
namespace
H5Utils::hist::detail
{
15
16
struct
regular_axis_t
{
17
double
lower
{};
18
double
upper
{};
19
size_t
n_bins
{};
20
bool
operator==
(
const
regular_axis_t
&)
const
=
default
;
21
};
22
23
struct
Axis
24
{
25
// Encodes the axis kind:
26
// regular_axis_t – equal-width float axis (lower, upper, n_bins)
27
// vector<double> – variable-width float axis (N+1 edges for N bins)
28
// vector<int64_t> – non-contiguous integer category values
29
// vector<string> – string category labels
30
// pair<int64_t,int64_t>– contiguous integer range [first, last] inclusive
31
using
edges_t
= std::variant<
32
regular_axis_t
,
33
std::vector<double>,
34
std::vector<int64_t>,
35
std::vector<std::string>,
36
std::pair<int64_t,int64_t>
37
>;
38
edges_t
edges
{
regular_axis_t
{}};
39
std::string
name
{};
40
bool
underflow
{
false
};
41
bool
overflow
{
false
};
42
bool
operator==
(
const
Axis
&)
const
=
default
;
43
};
44
45
}
// namespace H5Utils::hist::detail
46
47
#endif
//> !HDF5Utils_HistAxis_H
H5Utils::hist::detail
Definition
HistAxis.h:14
H5Utils::hist::detail::Axis
Definition
HistAxis.h:24
H5Utils::hist::detail::Axis::operator==
bool operator==(const Axis &) const =default
H5Utils::hist::detail::Axis::edges_t
std::variant< regular_axis_t, std::vector< double >, std::vector< int64_t >, std::vector< std::string >, std::pair< int64_t, int64_t > > edges_t
Definition
HistAxis.h:31
H5Utils::hist::detail::Axis::name
std::string name
Definition
HistAxis.h:39
H5Utils::hist::detail::Axis::edges
edges_t edges
Definition
HistAxis.h:38
H5Utils::hist::detail::Axis::overflow
bool overflow
Definition
HistAxis.h:41
H5Utils::hist::detail::Axis::underflow
bool underflow
Definition
HistAxis.h:40
H5Utils::hist::detail::regular_axis_t
Definition
HistAxis.h:16
H5Utils::hist::detail::regular_axis_t::upper
double upper
Definition
HistAxis.h:18
H5Utils::hist::detail::regular_axis_t::n_bins
size_t n_bins
Definition
HistAxis.h:19
H5Utils::hist::detail::regular_axis_t::operator==
bool operator==(const regular_axis_t &) const =default
H5Utils::hist::detail::regular_axis_t::lower
double lower
Definition
HistAxis.h:17
Generated on
for ATLAS Offline Software by
1.14.0