Go to the documentation of this file.
14 #include <type_traits>
44 unsigned int numBins()
const {
return 4; }
52 unsigned int index(
Category value )
const {
return static_cast<unsigned int>( value ) + 1; }
61 {
"title", axis.
title } };
67 namespace Directories {
76 mutable MyHist_t m_hist3{
this,
"Group/SubGroup/Third",
"Third title", { 1, 0, 1 } };
91 mutable MyHist_t m_hist0{
this,
"Top",
"Top title", { 1, 0, 1 } };
92 mutable MyHist_t m_hist1{
this,
"Group/First",
"First title", { 1, 0, 1 } };
93 mutable MyHist_t m_hist2{
this,
"Group/Second",
"Second title", { 1, 0, 1 } };
94 mutable MyHist_t m_hist3{
this,
"Group/SubGroup/Third",
"Third title", { 1, 0, 1 } };
103 m_tool->fillHistos();
108 namespace AxesLabels {
116 this,
"hist",
"Histogram title", { 5, 0, 5,
"axis title", {
"a",
"b",
"c",
"d",
"e" } } };
119 for (
int i : { 1, 2, 3, 4, 5 } )
m_hist[i - 1] += i;
124 namespace CustomAxis {
142 namespace MultiDimLayout {
151 { 10, 0, 10 }, { 10, 0, 10 }, { 10, 0, 10 } };
156 for (
double x = -0.5; x < 11; x += 1.0 ) {
158 for (
double y = -0.5; y < 11; y += 1.0 ) {
159 m_h2[{ x, y }] += ++value;
160 for (
double z = -0.5; z < 11; z += 1.0 ) {
m_h3[{ x, y, z }] += ++value; }
details::Consumer< Signature, Traits_, details::isLegacy< Traits_ > > Consumer
unsigned int numBins() const
number of bins for this Axis
std::underlying_type_t< Category > minValue
min and max values on this axis
friend std::ostream & operator<<(std::ostream &o, CustomAxis const &axis)
A base counter dealing with Histograms.
Gaudi::Accumulators::StaticHistogram< 1 > m_h1
std::string title
title of this axis
Gaudi::Accumulators::StaticHistogram< 1, Gaudi::Accumulators::atomicity::full, Category, std::tuple< Gaudi::Accumulators::CustomAxis > > m_hist
Gaudi::Accumulators::StaticHistogram< 3 > m_h3
Gaudi::Accumulators::StaticHistogram< 2 > m_h2
void operator()() const override
void operator()() const override
void operator()() const override
std::vector< std::string > labels
labels for the bins
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
void to_json(nlohmann::json &j, const Axis< Arithmetic > &axis)
automatic conversion of the Axis type to json
void operator()() const override
std::underlying_type_t< Category > maxValue
#define DECLARE_COMPONENT(type)
std::ostream & operator<<(std::ostream &o, Category v)
Gaudi::Tests::Histograms::CustomAxis::Category Category
unsigned int index(Category value) const