extracts OFCs from database
More...
#include <TileCondToolOfcCool.h>
|
| | TileCondToolOfcCool (const std::string &type, const std::string &name, const IInterface *parent) |
| virtual | ~TileCondToolOfcCool () |
| virtual StatusCode | initialize () override |
| virtual StatusCode | finalize () override |
| virtual StatusCode | getOfcWeights (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float &phase, bool of2, TileOfcWeightsStruct &weights, const EventContext &ctx) const override |
| int | getOfcWeights (unsigned int drawerIdx, unsigned int channel, unsigned int adc, float &phase, float *a, float *b, float *c, float *g, float *dg, const EventContext &ctx) |
| void | getOfcParams (unsigned int drawerIdx, int &NPhases, int &NFields, int &Phamin, int &Phamax, int &NSamples, const EventContext &ctx) |
extracts OFCs from database
Definition at line 27 of file TileCondToolOfcCool.h.
◆ TileCondToolOfcCool()
| TileCondToolOfcCool::TileCondToolOfcCool |
( |
const std::string & | type, |
|
|
const std::string & | name, |
|
|
const IInterface * | parent ) |
◆ ~TileCondToolOfcCool()
| TileCondToolOfcCool::~TileCondToolOfcCool |
( |
| ) |
|
|
virtual |
◆ finalize()
| StatusCode TileCondToolOfcCool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getOfcParams()
| void TileCondToolOfcCool::getOfcParams |
( |
unsigned int | drawerIdx, |
|
|
int & | NPhases, |
|
|
int & | NFields, |
|
|
int & | Phamin, |
|
|
int & | Phamax, |
|
|
int & | NSamples, |
|
|
const EventContext & | ctx ) |
Definition at line 90 of file TileCondToolOfcCool.cxx.
96 {
97
98 SG::ReadCondHandle<TileCalibData<TileCalibDrawerOfc>> calibOFC(
m_calibOfcKey, ctx);
99
100 NPhases = calibOFC->getCalibDrawer(drawerIdx)->getNPhases();
101 NFields = calibOFC->getCalibDrawer(drawerIdx)->getNFields();
103 Phamax =
round(calibOFC->getCalibDrawer(drawerIdx)->getPhase(0, 0, abs(NPhases) - 1) * (1 /
PHASE_PRECISION));
104 NSamples = calibOFC->getCalibDrawer(drawerIdx)->getNSamples();
105}
#define PHASE_PRECISION
Class for storing Optimal Filtering Coefficients (OFCs) in a coral::Blob.
float round(const float toRound, const unsigned int decimals)
◆ getOfcWeights() [1/2]
| StatusCode TileCondToolOfcCool::getOfcWeights |
( |
unsigned int | drawerIdx, |
|
|
unsigned int | channel, |
|
|
unsigned int | adc, |
|
|
float & | phase, |
|
|
bool | of2, |
|
|
TileOfcWeightsStruct & | weights, |
|
|
const EventContext & | ctx ) const |
|
overridevirtual |
Definition at line 48 of file TileCondToolOfcCool.cxx.
55{
56 std::fill (std::begin(weights.
g), std::end(weights.
g), 0);
57 std::fill (std::begin(weights.
dg), std::end(weights.
dg), 0);
58 std::fill (std::begin(weights.
w_a), std::end(weights.
w_a), 0);
59 std::fill (std::begin(weights.
w_b), std::end(weights.
w_b), 0);
60 std::fill (std::begin(weights.
w_c), std::end(weights.
w_c), 0);
61
62 SG::ReadCondHandle<TileCalibData<TileCalibDrawerOfc>> calibOFC(
m_calibOfcKey, ctx);
63
64 calibOFC->getCalibDrawer(drawerIdx)->fillOfc(channel, adc, phase, weights.
w_a, weights.
w_b,
65 weights.
w_c, weights.
g, weights.
dg);
66
67 weights.
n_samples = calibOFC->getCalibDrawer(drawerIdx)->getNSamples();
68
69 return StatusCode::SUCCESS;
70}
◆ getOfcWeights() [2/2]
| int TileCondToolOfcCool::getOfcWeights |
( |
unsigned int | drawerIdx, |
|
|
unsigned int | channel, |
|
|
unsigned int | adc, |
|
|
float & | phase, |
|
|
float * | a, |
|
|
float * | b, |
|
|
float * | c, |
|
|
float * | g, |
|
|
float * | dg, |
|
|
const EventContext & | ctx ) |
Definition at line 74 of file TileCondToolOfcCool.cxx.
79 {
80
81 SG::ReadCondHandle<TileCalibData<TileCalibDrawerOfc>> calibOFC(
m_calibOfcKey, ctx);
82
83 calibOFC->getCalibDrawer(drawerIdx)->fillOfc(channel, adc, phase,
a, b, c, g, dg);
84
85 return calibOFC->getCalibDrawer(drawerIdx)->getNSamples();
86}
◆ initialize()
| StatusCode TileCondToolOfcCool::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 29 of file TileCondToolOfcCool.cxx.
29 {
31
33
34 return StatusCode::SUCCESS;
35}
#define ATH_CHECK
Evaluate an expression and check for errors.
◆ m_calibOfcKey
Initial value:{this,
"TileOfc", "TileOfc", "Input Tile OFC constants"}
Definition at line 55 of file TileCondToolOfcCool.h.
55 {this,
56 "TileOfc", "TileOfc", "Input Tile OFC constants"};
The documentation for this class was generated from the following files: