#include <Run2ChargeCalibParser.h>
|
template<typename T , typename b = std::is_integral<T>> |
std::function< T(size_t)> | getFunc (const std::vector< std::string > &data) |
| Return function converting a string to number type T at index i of data vector. More...
|
|
template<typename T > |
std::function< T(size_t)> | getFunc (const nlohmann::json &data) |
| Return function converting an item to number type T at index i of json data. More...
|
|
|
static constexpr float | m_chargeLimit = 1e5 |
| If the calculated charge exceeds this limit, a linear extrapolation is used at this point. More...
|
|
Definition at line 22 of file Run2ChargeCalibParser.h.
◆ Run2ChargeCalibParser()
◆ getFunc() [1/2]
template<typename T >
std::function<T(size_t)> PixelChargeCalib::IChargeCalibrationParser::getFunc |
( |
const nlohmann::json & |
data | ) |
|
|
inlineprotectedinherited |
◆ getFunc() [2/2]
template<typename T , typename b = std::is_integral<T>>
std::function<T(size_t)> PixelChargeCalib::IChargeCalibrationParser::getFunc |
( |
const std::vector< std::string > & |
data | ) |
|
|
inlineprotectedinherited |
◆ parse() [1/2]
◆ parse() [2/2]
◆ parseImpl() [1/3]
|
finaloverrideprivatevirtual |
Implements PixelChargeCalib::IChargeCalibrationParser.
Definition at line 22 of file Run2ChargeCalibParser.cxx.
27 std::stringstream
ss(
data);
28 std::vector<std::string> component;
31 while (std::getline(
ss,
buffer,
'\n')) { component.push_back(
buffer); }
32 const size_t numFE = component.size();
33 if (numFE != numChips){
34 std::cout <<
"Warning that the number of chips in the DB string and the number of chips according to readout technology are not equal\n";
37 ChargeCalibrationBundle
b(numFE);
40 for (
size_t i{};
i < numFE;
i++) {
41 std::stringstream checkFE(component[
i]);
42 std::vector<std::string> FEString;
43 while (std::getline(checkFE,
buffer,
' ')) { FEString.push_back(
buffer); }
45 if (FEString.size() < FEStringSize) {
50 auto getInt = getFunc<int>(FEString);
51 auto getFloat = getFunc<float>(FEString);
53 b.threshold.emplace_back(getInt(1), getInt(2), getInt(3), getInt(4));
54 b.thresholdLong.emplace_back(getInt(5), getInt(6), getInt(7), getInt(8));
55 b.thresholdGanged.emplace_back(getInt(9), getInt(10), getInt(11), getInt(12));
56 b.params.emplace_back(getFloat(13), getFloat(14), getFloat(15));
57 b.paramsGanged.emplace_back(getFloat(16), getFloat(17), getFloat(18));
58 b.totRes.emplace_back(getFloat(19), getFloat(20));
75 b.lin.emplace_back(0.
f, 0.
f);
76 b.linGanged.emplace_back(0.
f, 0.
f);
◆ parseImpl() [2/3]
|
inlinefinaloverrideprivatevirtual |
◆ parseImpl() [3/3]
|
inlinefinaloverrideprivatevirtual |
◆ m_chargeLimit
constexpr float PixelChargeCalib::IChargeCalibrationParser::m_chargeLimit = 1e5 |
|
staticconstexprprotectedinherited |
If the calculated charge exceeds this limit, a linear extrapolation is used at this point.
Definition at line 55 of file IChargeCalibrationParser.h.
◆ m_configData
◆ m_elements
◆ m_pixelID
const PixelID* PixelChargeCalib::IChargeCalibrationParser::m_pixelID {} |
|
protectedinherited |
The documentation for this class was generated from the following files: