79 cyclus::Facility::InitFrom(m);
80 int rawcycpp_shape_feed_commods[2] = {-1, -1};
82 int rawcycpp_shape_feed_commod_prefs[2] = {-1, -1};
84 int rawcycpp_shape_feed_recipe[1] = {-1};
86 int rawcycpp_shape_feedbuf_size[1] = {-1};
88 int rawcycpp_shape_feed[2] = {-1, -1};
89 cycpp_shape_feed = std::vector<int>(rawcycpp_shape_feed, rawcycpp_shape_feed + 2);
90 int rawcycpp_shape_throughput[1] = {-1};
92 int rawcycpp_shape_leftover_commod[1] = {-1};
94 int rawcycpp_shape_leftoverbuf_size[1] = {-1};
96 int rawcycpp_shape_leftover[2] = {-1, -1};
98 int rawcycpp_shape_streams_[7] = {-1, -1, -1, -1, -1, -1, -1};
100 int rawcycpp_shape_latitude[1] = {-1};
102 int rawcycpp_shape_longitude[1] = {-1};
114 feed.capacity(m->feed.capacity());
115 leftover.capacity(m->leftover.capacity());
118 virtual void InfileToDb(cyclus::InfileTree* tree, cyclus::DbInit di) {
119 cyclus::Facility::InfileToDb(tree, di);
120 int rawcycpp_shape_feed_commods[2] = {-1, -1};
122 int rawcycpp_shape_feed_commod_prefs[2] = {-1, -1};
124 int rawcycpp_shape_feed_recipe[1] = {-1};
126 int rawcycpp_shape_feedbuf_size[1] = {-1};
128 int rawcycpp_shape_feed[2] = {-1, -1};
129 cycpp_shape_feed = std::vector<int>(rawcycpp_shape_feed, rawcycpp_shape_feed + 2);
130 int rawcycpp_shape_throughput[1] = {-1};
132 int rawcycpp_shape_leftover_commod[1] = {-1};
134 int rawcycpp_shape_leftoverbuf_size[1] = {-1};
136 int rawcycpp_shape_leftover[2] = {-1, -1};
138 int rawcycpp_shape_streams_[7] = {-1, -1, -1, -1, -1, -1, -1};
140 int rawcycpp_shape_latitude[1] = {-1};
142 int rawcycpp_shape_longitude[1] = {-1};
144 cyclus::InfileTree* sub = tree->SubTree(
"config/*");
148 cyclus::InfileTree* bub = sub->SubTree(
"feed_commods", 0);
149 cyclus::InfileTree* sub = bub;
150 int n1 = sub->NMatches(
"val");
151 std::vector< std::string > feed_commods_val;
152 feed_commods_val.resize(n1);
153 for (
int i1 = 0; i1 < n1; ++i1) {
156 std::string elem_in = cyclus::Query<std::string>(sub,
"val", i1);
159 feed_commods_val[i1] = elem;
163 if (sub->NMatches(
"feed_commod_prefs") > 0) {
165 cyclus::InfileTree* bub = sub->SubTree(
"feed_commod_prefs", 0);
166 cyclus::InfileTree* sub = bub;
167 int n1 = sub->NMatches(
"val");
168 std::vector< double > feed_commod_prefs_val;
169 feed_commod_prefs_val.resize(n1);
170 for (
int i1 = 0; i1 < n1; ++i1) {
173 double elem_in = cyclus::Query<double>(sub,
"val", i1);
176 feed_commod_prefs_val[i1] = elem;
181 std::vector< double > feed_commod_prefs_tmp;
182 feed_commod_prefs_tmp.resize(0);
187 if (sub->NMatches(
"feed_recipe") > 0) {
189 std::string feed_recipe_val = cyclus::Query<std::string>(sub,
"feed_recipe");
193 std::string feed_recipe_tmp(
"");
197 double feedbuf_size_val = cyclus::Query<double>(sub,
"feedbuf_size");
200 if (sub->NMatches(
"throughput") > 0) {
202 double throughput_val = cyclus::Query<double>(sub,
"throughput");
206 double throughput_tmp = 1e+299;
209 if (sub->NMatches(
"leftover_commod") > 0) {
211 std::string leftover_commod_val = cyclus::Query<std::string>(sub,
"leftover_commod");
215 std::string leftover_commod_tmp(
"default-waste-stream");
218 if (sub->NMatches(
"leftoverbuf_size") > 0) {
220 double leftoverbuf_size_val = cyclus::Query<double>(sub,
"leftoverbuf_size");
224 double leftoverbuf_size_tmp = 1e+299;
228 cyclus::InfileTree* bub = sub->SubTree(
"streams", 0);
229 cyclus::InfileTree* sub = bub;
230 int n1 = sub->NMatches(
"item");
231 std::map< std::string, std::pair< double, std::map< int, double > > > streams__val;
232 for (
int i1 = 0; i1 < n1; ++i1) {
235 std::string key_in = cyclus::Query<std::string>(sub,
"item/commod", i1);
238 std::pair< double, std::map< int, double > > val;
240 cyclus::InfileTree* bub = sub->SubTree(
"item/info", i1);
241 cyclus::InfileTree* sub = bub;
244 double firsti1_in = cyclus::Query<double>(sub,
"buf_size", 0);
245 firsti1 = firsti1_in;
247 std::map< int, double > secondi1;
249 cyclus::InfileTree* bub = sub->SubTree(
"efficiencies", 0);
250 cyclus::InfileTree* sub = bub;
251 int n2 = sub->NMatches(
"item");
252 std::map< int, double > secondi1_in;
253 for (
int i2 = 0; i2 < n2; ++i2) {
256 int key_in = pyne::nucname::id(cyclus::Query<std::string>(sub,
"item/comp", i2));
261 double val_in = cyclus::Query<double>(sub,
"item/eff", i2);
264 secondi1_in[key] = val;
266 secondi1 = secondi1_in;
268 std::pair< double, std::map< int, double > > val_in(firsti1, secondi1);
271 streams__val[key] = val;
275 if (sub->NMatches(
"latitude") > 0) {
277 double latitude_val = cyclus::Query<double>(sub,
"latitude");
281 double latitude_tmp = 0.0;
284 if (sub->NMatches(
"longitude") > 0) {
286 double longitude_val = cyclus::Query<double>(sub,
"longitude");
290 double longitude_tmp = 0.0;
307 virtual void InitFrom(cyclus::QueryableBackend* b) {
308 cyclus::Facility::InitFrom(b);
309 int rawcycpp_shape_feed_commods[2] = {-1, -1};
311 int rawcycpp_shape_feed_commod_prefs[2] = {-1, -1};
313 int rawcycpp_shape_feed_recipe[1] = {-1};
315 int rawcycpp_shape_feedbuf_size[1] = {-1};
317 int rawcycpp_shape_feed[2] = {-1, -1};
318 cycpp_shape_feed = std::vector<int>(rawcycpp_shape_feed, rawcycpp_shape_feed + 2);
319 int rawcycpp_shape_throughput[1] = {-1};
321 int rawcycpp_shape_leftover_commod[1] = {-1};
323 int rawcycpp_shape_leftoverbuf_size[1] = {-1};
325 int rawcycpp_shape_leftover[2] = {-1, -1};
327 int rawcycpp_shape_streams_[7] = {-1, -1, -1, -1, -1, -1, -1};
329 int rawcycpp_shape_latitude[1] = {-1};
331 int rawcycpp_shape_longitude[1] = {-1};
333 cyclus::QueryResult qr = b->Query(
"Info", NULL);
334 feed_commods = qr.GetVal<std::vector< std::string > >(
"feed_commods");
336 feed_recipe = qr.GetVal<std::string>(
"feed_recipe");
341 streams_ = qr.GetVal<std::map< std::string, std::pair< double, std::map< int, double > > > >(
"streams_");
342 latitude = qr.GetVal<
double>(
"latitude");
343 longitude = qr.GetVal<
double>(
"longitude");