ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
CalHist Class Reference
Collaboration diagram for CalHist:

Public Member Functions

 CalHist ()
 
 ~CalHist ()
 
int IncreaseBin (short, unsigned short)
 
void GetArray (std::vector< int > &, int)
 

Public Attributes

int maxvalue
 

Private Attributes

map< short, unsigned short > m_hist
 

Detailed Description

Definition at line 75 of file TRTCalib_bhadd.cxx.

Constructor & Destructor Documentation

◆ CalHist()

CalHist::CalHist ( )

Definition at line 91 of file TRTCalib_bhadd.cxx.

92 {
93  maxvalue = 0;
94 }

◆ ~CalHist()

CalHist::~CalHist ( )

Definition at line 96 of file TRTCalib_bhadd.cxx.

96 {}

Member Function Documentation

◆ GetArray()

void CalHist::GetArray ( std::vector< int > &  array,
int  nbins 
)

Definition at line 125 of file TRTCalib_bhadd.cxx.

126 {
127  for (int ibin = 0; ibin < nbins; ibin++)
128  {
129  if (m_hist.find(ibin) != m_hist.end())
130  array.at(ibin) = m_hist[ibin];
131  else
132  array.at(ibin) = 0;
133  }
134 }

◆ IncreaseBin()

int CalHist::IncreaseBin ( short  bin,
unsigned short  value 
)

Definition at line 98 of file TRTCalib_bhadd.cxx.

99 {
100  if (m_hist.find(bin) == m_hist.end())
101  {
102  m_hist[bin] = value;
103  if (m_hist[bin] > maxvalue)
104  maxvalue = m_hist[bin];
105  return 1;
106  }
107  else
108  {
109  m_hist[bin] = m_hist[bin] + value;
110  if (m_hist[bin] > maxvalue)
111  maxvalue = m_hist[bin];
112  return 0;
113  }
114 }

Member Data Documentation

◆ m_hist

map<short, unsigned short> CalHist::m_hist
private

Definition at line 88 of file TRTCalib_bhadd.cxx.

◆ maxvalue

int CalHist::maxvalue

Definition at line 84 of file TRTCalib_bhadd.cxx.


The documentation for this class was generated from the following file:
bin
Definition: BinsDiffFromStripMedian.h:43
athena.value
value
Definition: athena.py:124
CalHist::maxvalue
int maxvalue
Definition: TRTCalib_bhadd.cxx:84
lumiFormat.array
array
Definition: lumiFormat.py:91
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
SCT_CalibAlgs::nbins
@ nbins
Definition: SCT_CalibNumbers.h:10
CalHist::m_hist
map< short, unsigned short > m_hist
Definition: TRTCalib_bhadd.cxx:88