#include <PixelHistoConverter.h>
Definition at line 25 of file PixelHistoConverter.h.
◆ PixelHistoConverter()
PixelHistoConverter::PixelHistoConverter |
( |
| ) |
|
|
default |
◆ ~PixelHistoConverter()
virtual PixelHistoConverter::~PixelHistoConverter |
( |
| ) |
|
|
virtualdefault |
◆ findBin()
std::size_t PixelHistoConverter::findBin |
( |
const Axis & |
axis, |
|
|
const float |
value |
|
) |
| const |
|
inlineprivate |
◆ getBinX()
template<typename... Args>
std::size_t PixelHistoConverter::getBinX |
( |
Args &&... |
args | ) |
const |
|
inline |
◆ getBinY()
template<typename... Args>
std::size_t PixelHistoConverter::getBinY |
( |
Args &&... |
args | ) |
const |
|
inline |
◆ getBinZ()
template<typename... Args>
std::size_t PixelHistoConverter::getBinZ |
( |
Args &&... |
args | ) |
const |
|
inline |
◆ getContent() [1/3]
float PixelHistoConverter::getContent |
( |
std::size_t |
x | ) |
const |
|
inline |
◆ getContent() [2/3]
float PixelHistoConverter::getContent |
( |
std::size_t |
x, |
|
|
std::size_t |
y |
|
) |
| const |
|
inline |
◆ getContent() [3/3]
float PixelHistoConverter::getContent |
( |
std::size_t |
x, |
|
|
std::size_t |
y, |
|
|
std::size_t |
z |
|
) |
| const |
|
inline |
◆ isFirstZ()
bool PixelHistoConverter::isFirstZ |
( |
const float |
value | ) |
const |
◆ isOverflowZ()
bool PixelHistoConverter::isOverflowZ |
( |
const float |
value | ) |
const |
|
inline |
◆ setAxis()
bool PixelHistoConverter::setAxis |
( |
Axis & |
axis, |
|
|
const TAxis * |
rootAxis |
|
) |
| |
|
staticprivate |
check if the histogram has equidistant bins
use a threshold for imperfect binning
storing as 1/width to avoid (slow) division in retrieving
Definition at line 105 of file PixelHistoConverter.cxx.
111 axis.nBins = rootAxis->GetNbins();
112 axis.min = rootAxis->GetXmin();
113 axis.max = rootAxis->GetXmax();
115 if (
axis.nBins < 1) {
120 const float width = rootAxis->GetBinWidth(1);
121 for (std::size_t ibin = 2; ibin <=
axis.nBins; ++ibin) {
123 if (std::abs(rootAxis->GetBinWidth(ibin) -
width) > 0.01*
width) {
◆ setHisto1D()
StatusCode PixelHistoConverter::setHisto1D |
( |
const TH1 * |
histo | ) |
|
fill the content
Definition at line 20 of file PixelHistoConverter.cxx.
23 return StatusCode::FAILURE;
27 return StatusCode::FAILURE;
34 for (std::size_t
x = 0;
x < xSize; ++
x) {
38 return StatusCode::SUCCESS;
◆ setHisto2D()
StatusCode PixelHistoConverter::setHisto2D |
( |
const TH2 * |
histo | ) |
|
fill the content use linearized version for performance reasons
Definition at line 41 of file PixelHistoConverter.cxx.
43 return StatusCode::FAILURE;
47 return StatusCode::FAILURE;
50 return StatusCode::FAILURE;
58 for (std::size_t
x = 0;
x < xSize; ++
x) {
59 for (std::size_t
y = 0;
y < ySize; ++
y) {
60 const std::size_t position =
x +
y*xSize;
65 return StatusCode::SUCCESS;
◆ setHisto3D()
StatusCode PixelHistoConverter::setHisto3D |
( |
const TH3 * |
histo | ) |
|
fill the content use linearized version for performance reasons
Definition at line 68 of file PixelHistoConverter.cxx.
70 return StatusCode::FAILURE;
74 return StatusCode::FAILURE;
77 return StatusCode::FAILURE;
80 return StatusCode::FAILURE;
89 for (std::size_t
x = 0;
x < xSize; ++
x) {
90 for (std::size_t
y = 0;
y < ySize; ++
y) {
91 for (std::size_t
z = 0;
z < zSize; ++
z) {
92 const std::size_t position =
x + xSize*(
y + (ySize *
z));
98 return StatusCode::SUCCESS;
◆ m_content
std::vector<float> PixelHistoConverter::m_content |
|
private |
◆ m_xAxis
Axis PixelHistoConverter::m_xAxis {} |
|
private |
◆ m_yAxis
Axis PixelHistoConverter::m_yAxis {} |
|
private |
◆ m_zAxis
Axis PixelHistoConverter::m_zAxis {} |
|
private |
The documentation for this class was generated from the following files: