4 #ifndef _TO_EMEC_DATA_H
5 #define _TO_EMEC_DATA_H
19 auto getRecordsetPtr=[rdbAccess] (
const std::string&
node,
const std::string&
tag,
const std::string& tag2node,
const std::string & fallbackTag2Node) {
31 IRDBRecordset_ptr emecGeometry = getRecordsetPtr(
"EmecGeometry", larVersionKey.
tag(),larVersionKey.
node(),
"EmecGeometry-00");
32 IRDBRecordset_ptr emecMagicNumbers = getRecordsetPtr(
"EmecMagicNumbers", larVersionKey.
tag(), larVersionKey.
node(),
"EmecMagicNumbers-00");
33 IRDBRecordset_ptr emecParams = getRecordsetPtr(
"EmecParams", larVersionKey.
tag(), larVersionKey.
node(),
"EMECParams-00");
34 IRDBRecordset_ptr emecWheelParameters = getRecordsetPtr(
"EmecWheelParameters", larVersionKey.
tag(), larVersionKey.
node(),
"EmecWheelParameters-00");
36 IRDBRecordset_ptr coldContraction = getRecordsetPtr(
"ColdContraction", larVersionKey.
tag(), larVersionKey.
node(),
"ColdContraction-00");
39 for (
size_t i=0;
i<emecParams->size();
i++) {
41 emecparams.
PHIROTATION=(*emecParams)[
i]->getString(
"PHIROTATION");
42 emecparams.
SAGGING=(*emecParams)[
i]->getString(
"SAGGING");
45 data.emecparams.push_back(emecparams);
49 for (
size_t i=0;
i<emecWheelParameters->size();
i++) {
51 emecwheelparameters.
IWHEEL=(*emecWheelParameters)[
i]->getInt(
"IWHEEL");
52 emecwheelparameters.
NABS=(*emecWheelParameters)[
i]->getInt(
"NABS");
53 emecwheelparameters.
NACC=(*emecWheelParameters)[
i]->getInt(
"NACC");
54 emecwheelparameters.
ETAINT=(*emecWheelParameters)[
i]->getDouble(
"ETAINT");
55 emecwheelparameters.
ETAEXT=(*emecWheelParameters)[
i]->getDouble(
"ETAEXT");
56 emecwheelparameters.
NWSAMP=(*emecWheelParameters)[
i]->getInt(
"NWSAMP");
57 data.emecwheelparameters.push_back(emecwheelparameters);
60 for (
size_t i=0;
i<emecMagicNumbers->size();
i++) {
63 emecmagicnumbers.
FOCALTOREF=(*emecMagicNumbers)[
i]->getDouble(
"FOCALTOREF");
64 emecmagicnumbers.
REFTOACTIVE=(*emecMagicNumbers)[
i]->getDouble(
"REFTOACTIVE");
65 emecmagicnumbers.
ACTIVELENGTH=(*emecMagicNumbers)[
i]->getDouble(
"ACTIVELENGTH");
66 emecmagicnumbers.
REFTOPRESAMPLER=(*emecMagicNumbers)[
i]->getDouble(
"REFTOPRESAMPLER");
67 emecmagicnumbers.
PRESAMPLERLENGTH=(*emecMagicNumbers)[
i]->getDouble(
"PRESAMPLERLENGTH");
68 data.emecmagicnumbers.push_back(emecmagicnumbers);
71 for (
size_t i=0;
i<emecFan->size();
i++) {
78 data.emecfan.push_back(emecfan);
82 for (
size_t i=0;
i<coldContraction->size();
i++) {
87 coldcontraction.
CABLECONTRACTION=(*coldContraction)[
i]->getDouble(
"CABLECONTRACTION");
90 data.coldcontraction.push_back(coldcontraction);
94 for (
size_t i=0;
i<emecGeometry->size();
i++) {
96 emecgeometry.
EFIELD=(*emecGeometry)[
i]->getDouble(
"EFIELD");
97 emecgeometry.
MLGAP=(*emecGeometry)[
i]->getDouble(
"MLGAP");
98 emecgeometry.
SABL=(*emecGeometry)[
i]->getDouble(
"SABL");
99 emecgeometry.
SBAR=(*emecGeometry)[
i]->getDouble(
"SBAR");
100 emecgeometry.
SBRN=(*emecGeometry)[
i]->getDouble(
"SBRN");
101 emecgeometry.
SCRB=(*emecGeometry)[
i]->getDouble(
"SCRB");
102 emecgeometry.
Z1=(*emecGeometry)[
i]->getDouble(
"Z1");
103 emecgeometry.
Z0=(*emecGeometry)[
i]->getDouble(
"Z0");
104 emecgeometry.
DCF=(*emecGeometry)[
i]->getDouble(
"DCF");
105 emecgeometry.
RLIMIT=(*emecGeometry)[
i]->getDouble(
"RLIMIT");
106 emecgeometry.
EPS=(*emecGeometry)[
i]->getDouble(
"EPS");
107 emecgeometry.
RHOIN=(*emecGeometry)[
i]->getDouble(
"RHOIN");
108 emecgeometry.
RCKP=(*emecGeometry)[
i]->getDouble(
"RCKP");
109 emecgeometry.
ETOT=(*emecGeometry)[
i]->getDouble(
"ETOT");
110 emecgeometry.
EKAP=(*emecGeometry)[
i]->getDouble(
"EKAP");
111 emecgeometry.
ECU=(*emecGeometry)[
i]->getDouble(
"ECU");
112 emecgeometry.
EPREP=(*emecGeometry)[
i]->getDouble(
"EPREP");
113 emecgeometry.
EINOX=(*emecGeometry)[
i]->getDouble(
"EINOX");
114 emecgeometry.
NLAYER=(*emecGeometry)[
i]->getInt(
"NLAYER");
115 emecgeometry.
RMIN=(*emecGeometry)[
i]->getDouble(
"RMIN");
116 emecgeometry.
RMAX=(*emecGeometry)[
i]->getDouble(
"RMAX");
117 emecgeometry.
DZENDE=(*emecGeometry)[
i]->getDouble(
"DZENDE");
118 emecgeometry.
ZORIG=(*emecGeometry)[
i]->getDouble(
"ZORIG");
119 emecgeometry.
DCRACK=(*emecGeometry)[
i]->getDouble(
"DCRACK");
120 emecgeometry.
DZPLA=(*emecGeometry)[
i]->getDouble(
"DZPLA");
121 emecgeometry.
DZDSE=(*emecGeometry)[
i]->getDouble(
"DZDSE");
122 emecgeometry.
DZDSM=(*emecGeometry)[
i]->getDouble(
"DZDSM");
123 emecgeometry.
DZDSI=(*emecGeometry)[
i]->getDouble(
"DZDSI");
124 emecgeometry.
NUREG=(*emecGeometry)[
i]->getInt(
"NUREG");
125 emecgeometry.
DETA_0=(*emecGeometry)[
i]->getDouble(
"DETA_0");
126 emecgeometry.
DETA_1=(*emecGeometry)[
i]->getDouble(
"DETA_1");
127 emecgeometry.
DETA_2=(*emecGeometry)[
i]->getDouble(
"DETA_2");
128 emecgeometry.
DETA_3=(*emecGeometry)[
i]->getDouble(
"DETA_3");
129 emecgeometry.
DETA_4=(*emecGeometry)[
i]->getDouble(
"DETA_4");
130 emecgeometry.
DETA_5=(*emecGeometry)[
i]->getDouble(
"DETA_5");
131 emecgeometry.
DETA_6=(*emecGeometry)[
i]->getDouble(
"DETA_6");
132 emecgeometry.
DETA_7=(*emecGeometry)[
i]->getDouble(
"DETA_7");
133 emecgeometry.
DETA_8=(*emecGeometry)[
i]->getDouble(
"DETA_8");
134 emecgeometry.
DETA_9=(*emecGeometry)[
i]->getDouble(
"DETA_9");
135 emecgeometry.
DETA_10=(*emecGeometry)[
i]->getDouble(
"DETA_10");
136 emecgeometry.
DPHI_0=(*emecGeometry)[
i]->getDouble(
"DPHI_0");
137 emecgeometry.
DPHI_1=(*emecGeometry)[
i]->getDouble(
"DPHI_1");
138 emecgeometry.
DPHI_2=(*emecGeometry)[
i]->getDouble(
"DPHI_2");
139 emecgeometry.
DPHI_3=(*emecGeometry)[
i]->getDouble(
"DPHI_3");
140 emecgeometry.
DPHI_4=(*emecGeometry)[
i]->getDouble(
"DPHI_4");
141 emecgeometry.
DPHI_5=(*emecGeometry)[
i]->getDouble(
"DPHI_5");
142 emecgeometry.
DPHI_6=(*emecGeometry)[
i]->getDouble(
"DPHI_6");
143 emecgeometry.
DPHI_7=(*emecGeometry)[
i]->getDouble(
"DPHI_7");
144 emecgeometry.
DPHI_8=(*emecGeometry)[
i]->getDouble(
"DPHI_8");
145 emecgeometry.
DPHI_9=(*emecGeometry)[
i]->getDouble(
"DPHI_9");
146 emecgeometry.
DPHI_10=(*emecGeometry)[
i]->getDouble(
"DPHI_10");
147 emecgeometry.
ETASTR_0=(*emecGeometry)[
i]->getDouble(
"ETASTR_0");
148 emecgeometry.
ETASTR_1=(*emecGeometry)[
i]->getDouble(
"ETASTR_1");
149 emecgeometry.
ETASTR_2=(*emecGeometry)[
i]->getDouble(
"ETASTR_2");
150 emecgeometry.
ETASTR_3=(*emecGeometry)[
i]->getDouble(
"ETASTR_3");
151 emecgeometry.
ETASTR_4=(*emecGeometry)[
i]->getDouble(
"ETASTR_4");
152 emecgeometry.
ETASTR_5=(*emecGeometry)[
i]->getDouble(
"ETASTR_5");
153 emecgeometry.
ETASTR_6=(*emecGeometry)[
i]->getDouble(
"ETASTR_6");
154 emecgeometry.
EMHIT=(*emecGeometry)[
i]->getDouble(
"EMHIT");
155 emecgeometry.
EMDIGI=(*emecGeometry)[
i]->getDouble(
"EMDIGI");
156 emecgeometry.
GAP0=(*emecGeometry)[
i]->getDouble(
"GAP0");
157 emecgeometry.
ZSHIFT=(*emecGeometry)[
i]->getDouble(
"ZSHIFT");
158 data.emecgeometry.push_back(emecgeometry);