ATLAS Offline Software
StorePIDinfo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef INDETTRT_STOREPIDINFO
5 #define INDETTRT_STOREPIDINFO
6 
8 // StorePIDinfo.h , (c) ATLAS Detector software
10 #include <vector>
11 #include "GaudiKernel/StatusCode.h"
12 
14  public:
15  //defaults (rule of 5)
16  StorePIDinfo() = default;
17  StorePIDinfo(const StorePIDinfo&) = default;
18  StorePIDinfo(StorePIDinfo&&) = default;
19  StorePIDinfo& operator=(const StorePIDinfo&) = default;
21  ~StorePIDinfo() = default;
22 
23  StorePIDinfo(int nbins, float min, float max, const std::vector<float>& values);
24  void update(int nbins, float min, float max, const std::vector<float>& values);
25  void push_back(float value);
26  StatusCode check(int gas, int detpart) const;
27  float GetValue(float input) const { return m_values.at(GetBin(input)); }
28  float GetBinValue(int bin) const { return m_values.at(bin); }
29  int GetBin(float input) const;
30 
31  private:
32  unsigned int m_nbins = 0;
33  float m_min = -9999.9;
34  float m_max = 10000000 * 2;
35  std::vector<float> m_values;
36 };
37 #endif
38 
StorePIDinfo::operator=
StorePIDinfo & operator=(const StorePIDinfo &)=default
StorePIDinfo::~StorePIDinfo
~StorePIDinfo()=default
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
bin
Definition: BinsDiffFromStripMedian.h:43
athena.value
value
Definition: athena.py:124
StorePIDinfo::check
StatusCode check(int gas, int detpart) const
Definition: StorePIDinfo.cxx:44
StorePIDinfo::GetBin
int GetBin(float input) const
Definition: StorePIDinfo.cxx:65
python.Bindings.values
values
Definition: Control/AthenaPython/python/Bindings.py:805
StorePIDinfo::StorePIDinfo
StorePIDinfo(const StorePIDinfo &)=default
StorePIDinfo::m_min
float m_min
Definition: StorePIDinfo.h:33
StorePIDinfo::m_nbins
unsigned int m_nbins
Definition: StorePIDinfo.h:32
StorePIDinfo::StorePIDinfo
StorePIDinfo(StorePIDinfo &&)=default
StorePIDinfo
Definition: StorePIDinfo.h:13
StorePIDinfo::update
void update(int nbins, float min, float max, const std::vector< float > &values)
Definition: StorePIDinfo.cxx:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
StorePIDinfo::GetBinValue
float GetBinValue(int bin) const
Definition: StorePIDinfo.h:28
StorePIDinfo::m_max
float m_max
Definition: StorePIDinfo.h:34
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
StorePIDinfo::StorePIDinfo
StorePIDinfo()=default
SCT_CalibAlgs::nbins
@ nbins
Definition: SCT_CalibNumbers.h:10
StorePIDinfo::operator=
StorePIDinfo & operator=(StorePIDinfo &&)=default
StorePIDinfo::GetValue
float GetValue(float input) const
Definition: StorePIDinfo.h:27
StorePIDinfo::push_back
void push_back(float value)
Definition: StorePIDinfo.cxx:31
StorePIDinfo::m_values
std::vector< float > m_values
Definition: StorePIDinfo.h:35