ATLAS Offline Software
Loading...
Searching...
No Matches
TrigHisto.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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(void);
35 virtual ~TrigHisto(void);
36
38 void clear(void);
39
42 unsigned int nbins_x(void) const {
43 return m_nbins_x;
44 }
45
47 float min_x(void) const {
48 return m_min_x;
49 }
50
52 float max_x(void) const {
53 return m_max_x;
54 }
55
58 const std::vector<float>& contents(void) const {
59 return m_contents;
60 }
61
62 protected:
67 unsigned int findBin(unsigned int nbins,
68 float h_min, float h_max, float binSize,
69 float value) const;
70
71 std::vector<float> m_contents; //<! A vector to contain the contents of the histogram.
72 std::vector<float>::iterator m_itr{};
73 std::vector<float>::iterator m_itr_end{};
74
75 // Histogram limits
76 unsigned int m_nbins_x;
77 unsigned int m_underflowBin_x;
78 unsigned int m_overflowBin_x;
79 float m_min_x;
80 float m_max_x;
82};
83
84#endif
TrigHisto(void)
Definition TrigHisto.cxx:9
unsigned int m_nbins_x
Definition TrigHisto.h:76
unsigned int m_underflowBin_x
Definition TrigHisto.h:77
unsigned int m_overflowBin_x
Definition TrigHisto.h:78
float max_x(void) const
Return the maximum along the x-axis.
Definition TrigHisto.h:52
float m_binSize_x
Definition TrigHisto.h:81
unsigned int findBin(unsigned int nbins, float h_min, float h_max, float binSize, float value) const
Definition TrigHisto.cxx:33
float m_min_x
Definition TrigHisto.h:79
float min_x(void) const
Return the minimum along the x-axis.
Definition TrigHisto.h:47
unsigned int nbins_x(void) const
Return the number of bins along the y-axis, not including the under and overflow.
Definition TrigHisto.h:42
const std::vector< float > & contents(void) const
Return the bin contents of the histogram, including the under and overflow bins.
Definition TrigHisto.h:58
void clear(void)
Zero all histogram bins.
Definition TrigHisto.cxx:24
std::vector< float >::iterator m_itr
Definition TrigHisto.h:72
std::vector< float >::iterator m_itr_end
Definition TrigHisto.h:73
virtual ~TrigHisto(void)
Definition TrigHisto.cxx:19
float m_max_x
Definition TrigHisto.h:80
std::vector< float > m_contents
Definition TrigHisto.h:71