ATLAS Offline Software
Loading...
Searching...
No Matches
TrigHisto.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 TRIGINDETEVENT_TRIGHISTO_H
6#define TRIGINDETEVENT_TRIGHISTO_H
7
8#include <vector>
9
10//---------------------------------------------------------------
11
21
22//---------------------------------------------------------------
23
32class TrigHisto {
33 public:
34 TrigHisto() = default;
36 TrigHisto(TrigHisto&&) = default;
38
39 virtual ~TrigHisto() = default;
41 void clear(void);
42
45 unsigned int nbins_x(void) const {
46 return m_nbins_x;
47 }
48
50 float min_x() const {
51 return m_min_x;
52 }
53
55 float max_x() const {
56 return m_max_x;
57 }
58
61 const std::vector<float>& contents() const {
62 return m_contents;
63 }
64
65 protected:
70 unsigned int findBin(unsigned int nbins,
71 float h_min, float h_max, float binSize,
72 float value) const;
73
74 std::vector<float> m_contents; //<! A vector to contain the contents of the histogram.
75
76 // Histogram limits
77 unsigned int m_nbins_x{};
78 unsigned int m_underflowBin_x{};
79 unsigned int m_overflowBin_x{};
80 float m_min_x{};
81 float m_max_x{};
82 float m_binSize_x{};
83};
84
85#endif
float max_x() const
Return the maximum along the x-axis.
Definition TrigHisto.h:55
unsigned int m_nbins_x
Definition TrigHisto.h:77
unsigned int m_underflowBin_x
Definition TrigHisto.h:78
unsigned int m_overflowBin_x
Definition TrigHisto.h:79
float m_binSize_x
Definition TrigHisto.h:82
unsigned int findBin(unsigned int nbins, float h_min, float h_max, float binSize, float value) const
Definition TrigHisto.cxx:21
float min_x() const
Return the minimum along the x-axis.
Definition TrigHisto.h:50
float m_min_x
Definition TrigHisto.h:80
TrigHisto & operator=(TrigHisto &&)=default
unsigned int nbins_x(void) const
Return the number of bins along the y-axis, not including the under and overflow.
Definition TrigHisto.h:45
TrigHisto(TrigHisto &&)=default
User declared d'tor means we have to explicitly enable move operations.
const std::vector< float > & contents() const
Return the bin contents of the histogram, including the under and overflow bins.
Definition TrigHisto.h:61
void clear(void)
Zero all histogram bins.
Definition TrigHisto.cxx:12
TrigHisto()=default
virtual ~TrigHisto()=default
float m_max_x
Definition TrigHisto.h:81
std::vector< float > m_contents
Definition TrigHisto.h:74