22 {
23 IdentifierHash wafer_hash = IdentifierHash(moduleHash);
24 const InDetDD::SiDetectorElement *element =
m_elements->getDetectorElement(wafer_hash);
26
27 std::stringstream
ss(
data);
28 std::vector<std::string> component;
30 std::getline(
ss, buffer,
'\n');
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";
35 }
36
37 ChargeCalibrationBundle
b(numFE);
38
39
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); }
44
45 if (FEString.size() < FEStringSize) {
48 }
49
52
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));
58 b.totRes.emplace_back(getFloat(19), getFloat(20));
59
60
64
65 int totlimit = -1;
68
71
74 } else {
75 b.lin.emplace_back(0.f, 0.f);
76 b.linGanged.emplace_back(0.f, 0.f);
77 }
78 }
80 }
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.
const PixelID * m_pixelID
static constexpr float m_chargeLimit
If the calculated charge exceeds this limit, a linear extrapolation is used at this point.
const PixelModuleData * m_configData
const InDetDD::SiDetectorElementCollection * m_elements
std::pair< size_t, InDetDD::PixelReadoutTechnology > numChipsAndTechnology(const InDetDD::SiDetectorElement *element)
std::pair< int, int > getBecAndLayer(const PixelID *pPixelId, IdentifierHash hash)
static constexpr float defaultOverflow