71 cyclus::Facility::InitFrom(m);
72 int rawcycpp_shape_latitude[1] = {-1};
73 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
74 int rawcycpp_shape_longitude[1] = {-1};
75 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
76 int rawcycpp_shape_fill_commods[2] = {-1, -1};
78 int rawcycpp_shape_fill_commod_prefs[2] = {-1, -1};
80 int rawcycpp_shape_fill_recipe[1] = {-1};
82 int rawcycpp_shape_fill_size[1] = {-1};
84 int rawcycpp_shape_fill[2] = {-1, -1};
85 cycpp_shape_fill = std::vector<int>(rawcycpp_shape_fill, rawcycpp_shape_fill + 2);
86 int rawcycpp_shape_fiss_commods[2] = {-1, -1};
88 int rawcycpp_shape_fiss_commod_prefs[2] = {-1, -1};
90 int rawcycpp_shape_fiss_recipe[1] = {-1};
92 int rawcycpp_shape_fiss_size[1] = {-1};
94 int rawcycpp_shape_fiss[2] = {-1, -1};
95 cycpp_shape_fiss = std::vector<int>(rawcycpp_shape_fiss, rawcycpp_shape_fiss + 2);
96 int rawcycpp_shape_topup_commod[1] = {-1};
98 int rawcycpp_shape_topup_pref[1] = {-1};
100 int rawcycpp_shape_topup_recipe[1] = {-1};
102 int rawcycpp_shape_topup_size[1] = {-1};
104 int rawcycpp_shape_topup[2] = {-1, -1};
105 cycpp_shape_topup = std::vector<int>(rawcycpp_shape_topup, rawcycpp_shape_topup + 2);
106 int rawcycpp_shape_outcommod[1] = {-1};
108 int rawcycpp_shape_throughput[1] = {-1};
110 int rawcycpp_shape_spectrum[1] = {-1};
112 latitude = m->latitude;
113 longitude = m->longitude;
133#line 115 "/cycamore/src/fuel_fab.h"
135 virtual void InitFrom(cyclus::QueryableBackend* b) {
136 cyclus::Facility::InitFrom(b);
137 int rawcycpp_shape_latitude[1] = {-1};
138 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
139 int rawcycpp_shape_longitude[1] = {-1};
140 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
141 int rawcycpp_shape_fill_commods[2] = {-1, -1};
143 int rawcycpp_shape_fill_commod_prefs[2] = {-1, -1};
145 int rawcycpp_shape_fill_recipe[1] = {-1};
147 int rawcycpp_shape_fill_size[1] = {-1};
149 int rawcycpp_shape_fill[2] = {-1, -1};
150 cycpp_shape_fill = std::vector<int>(rawcycpp_shape_fill, rawcycpp_shape_fill + 2);
151 int rawcycpp_shape_fiss_commods[2] = {-1, -1};
153 int rawcycpp_shape_fiss_commod_prefs[2] = {-1, -1};
155 int rawcycpp_shape_fiss_recipe[1] = {-1};
157 int rawcycpp_shape_fiss_size[1] = {-1};
159 int rawcycpp_shape_fiss[2] = {-1, -1};
160 cycpp_shape_fiss = std::vector<int>(rawcycpp_shape_fiss, rawcycpp_shape_fiss + 2);
161 int rawcycpp_shape_topup_commod[1] = {-1};
163 int rawcycpp_shape_topup_pref[1] = {-1};
165 int rawcycpp_shape_topup_recipe[1] = {-1};
167 int rawcycpp_shape_topup_size[1] = {-1};
169 int rawcycpp_shape_topup[2] = {-1, -1};
170 cycpp_shape_topup = std::vector<int>(rawcycpp_shape_topup, rawcycpp_shape_topup + 2);
171 int rawcycpp_shape_outcommod[1] = {-1};
173 int rawcycpp_shape_throughput[1] = {-1};
175 int rawcycpp_shape_spectrum[1] = {-1};
177 cyclus::QueryResult qr = b->Query(
"Info", NULL);
178 latitude = qr.GetVal<
double>(
"latitude");
179 longitude = qr.GetVal<
double>(
"longitude");
180 fill_commods = qr.GetVal<std::vector< std::string > >(
"fill_commods");
182 fill_recipe = qr.GetVal<std::string>(
"fill_recipe");
183 fill_size = qr.GetVal<
double>(
"fill_size");
184 fiss_commods = qr.GetVal<std::vector< std::string > >(
"fiss_commods");
186 fiss_recipe = qr.GetVal<std::string>(
"fiss_recipe");
187 fiss_size = qr.GetVal<
double>(
"fiss_size");
192 outcommod = qr.GetVal<std::string>(
"outcommod");
194 spectrum = qr.GetVal<std::string>(
"spectrum");
200 virtual void InfileToDb(cyclus::InfileTree* tree, cyclus::DbInit di) {
201 cyclus::Facility::InfileToDb(tree, di);
202 int rawcycpp_shape_latitude[1] = {-1};
203 cycpp_shape_latitude = std::vector<int>(rawcycpp_shape_latitude, rawcycpp_shape_latitude + 1);
204 int rawcycpp_shape_longitude[1] = {-1};
205 cycpp_shape_longitude = std::vector<int>(rawcycpp_shape_longitude, rawcycpp_shape_longitude + 1);
206 int rawcycpp_shape_fill_commods[2] = {-1, -1};
208 int rawcycpp_shape_fill_commod_prefs[2] = {-1, -1};
210 int rawcycpp_shape_fill_recipe[1] = {-1};
212 int rawcycpp_shape_fill_size[1] = {-1};
214 int rawcycpp_shape_fill[2] = {-1, -1};
215 cycpp_shape_fill = std::vector<int>(rawcycpp_shape_fill, rawcycpp_shape_fill + 2);
216 int rawcycpp_shape_fiss_commods[2] = {-1, -1};
218 int rawcycpp_shape_fiss_commod_prefs[2] = {-1, -1};
220 int rawcycpp_shape_fiss_recipe[1] = {-1};
222 int rawcycpp_shape_fiss_size[1] = {-1};
224 int rawcycpp_shape_fiss[2] = {-1, -1};
225 cycpp_shape_fiss = std::vector<int>(rawcycpp_shape_fiss, rawcycpp_shape_fiss + 2);
226 int rawcycpp_shape_topup_commod[1] = {-1};
228 int rawcycpp_shape_topup_pref[1] = {-1};
230 int rawcycpp_shape_topup_recipe[1] = {-1};
232 int rawcycpp_shape_topup_size[1] = {-1};
234 int rawcycpp_shape_topup[2] = {-1, -1};
235 cycpp_shape_topup = std::vector<int>(rawcycpp_shape_topup, rawcycpp_shape_topup + 2);
236 int rawcycpp_shape_outcommod[1] = {-1};
238 int rawcycpp_shape_throughput[1] = {-1};
240 int rawcycpp_shape_spectrum[1] = {-1};
242 cyclus::InfileTree* sub = tree->SubTree(
"config/*");
245 if (sub->NMatches(
"latitude") > 0) {
247 double latitude_val = cyclus::Query<double>(sub,
"latitude");
248 latitude = latitude_val;
251 double latitude_tmp = 0.0;
252 latitude = latitude_tmp;
254 if (sub->NMatches(
"longitude") > 0) {
256 double longitude_val = cyclus::Query<double>(sub,
"longitude");
257 longitude = longitude_val;
260 double longitude_tmp = 0.0;
261 longitude = longitude_tmp;
264 cyclus::InfileTree* bub = sub->SubTree(
"fill_commods", 0);
265 cyclus::InfileTree* sub = bub;
266 int n1 = sub->NMatches(
"val");
267 std::vector< std::string > fill_commods_val;
268 fill_commods_val.resize(n1);
269 for (
int i1 = 0; i1 < n1; ++i1) {
272 std::string elem_in = cyclus::Query<std::string>(sub,
"val", i1);
275 fill_commods_val[i1] = elem;
279 if (sub->NMatches(
"fill_commod_prefs") > 0) {
281 cyclus::InfileTree* bub = sub->SubTree(
"fill_commod_prefs", 0);
282 cyclus::InfileTree* sub = bub;
283 int n1 = sub->NMatches(
"val");
284 std::vector< double > fill_commod_prefs_val;
285 fill_commod_prefs_val.resize(n1);
286 for (
int i1 = 0; i1 < n1; ++i1) {
289 double elem_in = cyclus::Query<double>(sub,
"val", i1);
292 fill_commod_prefs_val[i1] = elem;
297 std::vector< double > fill_commod_prefs_tmp;
298 fill_commod_prefs_tmp.resize(0);
304 std::string fill_recipe_val = cyclus::Query<std::string>(sub,
"fill_recipe");
308 double fill_size_val = cyclus::Query<double>(sub,
"fill_size");
312 cyclus::InfileTree* bub = sub->SubTree(
"fiss_commods", 0);
313 cyclus::InfileTree* sub = bub;
314 int n1 = sub->NMatches(
"val");
315 std::vector< std::string > fiss_commods_val;
316 fiss_commods_val.resize(n1);
317 for (
int i1 = 0; i1 < n1; ++i1) {
320 std::string elem_in = cyclus::Query<std::string>(sub,
"val", i1);
323 fiss_commods_val[i1] = elem;
327 if (sub->NMatches(
"fiss_commod_prefs") > 0) {
329 cyclus::InfileTree* bub = sub->SubTree(
"fiss_commod_prefs", 0);
330 cyclus::InfileTree* sub = bub;
331 int n1 = sub->NMatches(
"val");
332 std::vector< double > fiss_commod_prefs_val;
333 fiss_commod_prefs_val.resize(n1);
334 for (
int i1 = 0; i1 < n1; ++i1) {
337 double elem_in = cyclus::Query<double>(sub,
"val", i1);
340 fiss_commod_prefs_val[i1] = elem;
345 std::vector< double > fiss_commod_prefs_tmp;
346 fiss_commod_prefs_tmp.resize(0);
351 if (sub->NMatches(
"fiss_recipe") > 0) {
353 std::string fiss_recipe_val = cyclus::Query<std::string>(sub,
"fiss_recipe");
357 std::string fiss_recipe_tmp(
"");
361 double fiss_size_val = cyclus::Query<double>(sub,
"fiss_size");
364 if (sub->NMatches(
"topup_commod") > 0) {
366 std::string topup_commod_val = cyclus::Query<std::string>(sub,
"topup_commod");
370 std::string topup_commod_tmp(
"");
373 if (sub->NMatches(
"topup_pref") > 0) {
375 double topup_pref_val = cyclus::Query<double>(sub,
"topup_pref");
379 double topup_pref_tmp = 1.0;
382 if (sub->NMatches(
"topup_recipe") > 0) {
384 std::string topup_recipe_val = cyclus::Query<std::string>(sub,
"topup_recipe");
388 std::string topup_recipe_tmp(
"");
391 if (sub->NMatches(
"topup_size") > 0) {
393 double topup_size_val = cyclus::Query<double>(sub,
"topup_size");
397 double topup_size_tmp = 0;
401 std::string outcommod_val = cyclus::Query<std::string>(sub,
"outcommod");
404 if (sub->NMatches(
"throughput") > 0) {
406 double throughput_val = cyclus::Query<double>(sub,
"throughput");
410 double throughput_tmp = 1e+299;
414 std::string spectrum_val = cyclus::Query<std::string>(sub,
"spectrum");
418 ->AddVal(
"latitude", latitude, &cycpp_shape_latitude)
419 ->AddVal(
"longitude", longitude, &cycpp_shape_longitude)