ATLAS Offline Software
Loading...
Searching...
No Matches
TFCS1DFunctionInt16Histogram.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ISF_FASTCALOSIMEVENT_TFCS1DFunctionInt16Histogram_h
6#define ISF_FASTCALOSIMEVENT_TFCS1DFunctionInt16Histogram_h
7
9
11#include <vector>
12
13class TH2;
14
16public:
17 TFCS1DFunctionInt16Histogram(const TH1 *hist = nullptr) {
18 if (hist)
19 Initialize(hist);
20 };
22
23 void Initialize(const TH1 *hist);
24
26
27 typedef uint16_t HistoContent_t;
29
32 virtual double rnd_to_fct(double rnd) const;
33
34 const std::vector<float> &get_HistoBordersx() const {
35 return m_HistoBorders;
36 };
37 std::vector<float> &get_HistoBordersx() { return m_HistoBorders; };
38 const std::vector<HistoContent_t> &get_HistoContents() const {
39 return m_HistoContents;
40 };
41 std::vector<HistoContent_t> &get_HistoContents() { return m_HistoContents; };
42
43 static void unit_test ATLAS_NOT_THREAD_SAFE(TH1 *hist = nullptr);
44
45protected:
46 std::vector<float> m_HistoBorders;
47 std::vector<HistoContent_t> m_HistoContents;
48
49private:
50 ClassDef(TFCS1DFunctionInt16Histogram, 1) // TFCS1DFunctionInt16Histogram
51};
52
53#endif
static TRandom * rnd
Define macros for attributes used to control the static checker.
virtual double rnd_to_fct(double rnd) const
Function gets random number rnd in the range [0,1) as argument and returns function value according t...
std::vector< HistoContent_t > & get_HistoContents()
TFCS1DFunctionInt16Histogram(const TH1 *hist=nullptr)
const std::vector< float > & get_HistoBordersx() const
static const HistoContent_t s_MaxValue
const std::vector< HistoContent_t > & get_HistoContents() const
std::vector< HistoContent_t > m_HistoContents
static void unit_test ATLAS_NOT_THREAD_SAFE(TH1 *hist=nullptr)
virtual void rnd_to_fct(float value[], const float rnd[]) const
Function gets array of random numbers rnd[] in the range [0,1) as arguments and returns function valu...