ATLAS Offline Software
Loading...
Searching...
No Matches
TFCS1DFunctionInt32Histogram.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_TFCS1DFunctionInt32Histogram_h
6#define ISF_FASTCALOSIMEVENT_TFCS1DFunctionInt32Histogram_h
7
9
11#include <vector>
12
13class TH2;
14
16public:
17 TFCS1DFunctionInt32Histogram(const TH1 *hist = nullptr) {
18 if (hist)
19 Initialize(hist);
20 };
22
23 void Initialize(const TH1 *hist);
24
26
27 typedef uint32_t HistoContent_t;
29
32 virtual double rnd_to_fct(double rnd) const;
33
34 virtual bool operator==(const TFCS1DFunction &ref) const;
35
36 const std::vector<float> &get_HistoBordersx() const {
37 return m_HistoBorders;
38 };
39 std::vector<float> &get_HistoBordersx() { return m_HistoBorders; };
40 const std::vector<HistoContent_t> &get_HistoContents() const {
41 return m_HistoContents;
42 };
43 std::vector<HistoContent_t> &get_HistoContents() { return m_HistoContents; };
44
45 static void unit_test ATLAS_NOT_THREAD_SAFE(TH1 *hist = nullptr);
46
47protected:
48 std::vector<float> m_HistoBorders;
49 std::vector<HistoContent_t> m_HistoContents;
50
51private:
52 ClassDef(TFCS1DFunctionInt32Histogram, 1) // TFCS1DFunctionInt32Histogram
53};
54
55#endif
const boost::regex ref(r_ef)
static TRandom * rnd
Define macros for attributes used to control the static checker.
const std::vector< float > & get_HistoBordersx() const
std::vector< HistoContent_t > & get_HistoContents()
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...
static void unit_test ATLAS_NOT_THREAD_SAFE(TH1 *hist=nullptr)
std::vector< HistoContent_t > m_HistoContents
TFCS1DFunctionInt32Histogram(const TH1 *hist=nullptr)
const std::vector< HistoContent_t > & get_HistoContents() const
virtual bool operator==(const TFCS1DFunction &ref) const
The == operator compares the content of instances.
static const HistoContent_t s_MaxValue
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...