#include <StripCalculator.h>
Definition at line 30 of file StripCalculator.h.
◆ ParameterClass
◆ IsValid
◆ buildElement()
std::unique_ptr< Element > StripCalculator::buildElement |
( |
json_t |
j | ) |
const |
|
private |
Definition at line 75 of file StripCalculator.cxx.
77 std::unique_ptr<ElementModel> deformation_model;
78 std::string
model = j.json.at(
"model");
79 if (
model ==
"nodefo") {
80 deformation_model = std::make_unique<ElementModelRigid>();
81 }
else if (
model ==
"scalesag") {
84 const auto& jc = j.json.at(
"model_constant_pars");
85 jc.at(
"len_x").get_to(lenX);
86 jc.at(
"len_y").get_to(lenY);
87 jc.at(
"defo0_x").get_to(defo0[0]);
88 jc.at(
"defo0_y").get_to(defo0[1]);
89 jc.at(
"defo0_z").get_to(defo0[2]);
90 deformation_model = std::make_unique<ElementModelScaleSag>(lenX, lenY, defo0);
92 throw std::runtime_error(
"Unknown model: "+
model);
96 std::unique_ptr<Element>
el = std::make_unique<Element>(std::move(deformation_model));
97 el->setAsapId(j.json.at(
"id_asap"));
100 std::map<std::string, double> correctionPars, nominalPars;
101 j.json.at(
"pars_correction").get_to(correctionPars);
102 j.json.at(
"pars_nominal").get_to(nominalPars);
◆ collectStrip()
Definition at line 159 of file StripCalculator.cxx.
160 if (j.json.contains(
"strip_configuration") && j.json.contains(
"identifier")) {
◆ getPcbIdentifier()
◆ getPositionAlongStrip()
◆ getQuadrupletIdentifier()
◆ getStrip()
◆ getStripConfiguration()
Definition at line 140 of file StripCalculator.cxx.
142 double xpos, ypos, xpitch, ypitch;
143 j.at(
"pos").at(
"x").get_to(xpos);
144 j.at(
"pos").at(
"y").get_to(ypos);
145 j.at(
"pitchvec").at(
"x").get_to(xpitch);
146 j.at(
"pitchvec").at(
"y").get_to(ypitch);
151 ret.
centerPoint = getPoint(j.json.at(
"strip_center"));
152 ret.
leftPoint = getPoint(j.json.at(
"strip_left"));
153 ret.
rightPoint = getPoint(j.json.at(
"strip_right"));
◆ parseJSON()
void StripCalculator::parseJSON |
( |
const std::string & |
in | ) |
|
Definition at line 59 of file StripCalculator.cxx.
63 for (
const json& jmodule : jroot.at(
"elementarray")) {
67 throw std::runtime_error(
e.what());
◆ parseRootElement()
void StripCalculator::parseRootElement |
( |
json_t |
j | ) |
|
|
private |
Definition at line 169 of file StripCalculator.cxx.
172 json::const_iterator
it;
173 json::const_iterator
end;
176 if (!j.json.contains(
"identifier")) {
184 const std::string KEY =
"zdaughters";
187 std::list<tree_t> jtree;
188 jtree.push_back({j.json.at(KEY).
begin(), j.json.at(KEY).end()});
189 while (!jtree.empty()) {
190 auto&
it = jtree.back().it;
191 if (
it != jtree.back().end) {
194 Element* daugref =
mom->addDaughter(std::move(daughter));
195 if (
it->contains(KEY)) {
196 jtree.push_back({
it->at(KEY).
begin(),
it->at(KEY).end()});
◆ m_pcbMap
◆ m_rootElements
std::vector<std::unique_ptr<Element> > NswAsBuilt::StripCalculator::m_rootElements |
|
private |
The documentation for this class was generated from the following files: