49 cyclus::Facility::InitFrom(m);
50 int rawcycpp_shape_streams_[8] = {-1, -1, -1, -1, -1, -1, -1, -1};
52 int rawcycpp_shape_out_commod[1] = {-1};
54 int rawcycpp_shape_out_buf_size[1] = {-1};
56 int rawcycpp_shape_output[2] = {-1, -1};
57 cycpp_shape_output = std::vector<int>(rawcycpp_shape_output, rawcycpp_shape_output + 2);
58 int rawcycpp_shape_throughput[1] = {-1};
60 int rawcycpp_shape_latitude[1] = {-1};
62 int rawcycpp_shape_longitude[1] = {-1};
70 output.capacity(m->output.capacity());
73 virtual void InfileToDb(cyclus::InfileTree* tree, cyclus::DbInit di) {
74 cyclus::Facility::InfileToDb(tree, di);
75 int rawcycpp_shape_streams_[8] = {-1, -1, -1, -1, -1, -1, -1, -1};
77 int rawcycpp_shape_out_commod[1] = {-1};
79 int rawcycpp_shape_out_buf_size[1] = {-1};
81 int rawcycpp_shape_output[2] = {-1, -1};
82 cycpp_shape_output = std::vector<int>(rawcycpp_shape_output, rawcycpp_shape_output + 2);
83 int rawcycpp_shape_throughput[1] = {-1};
85 int rawcycpp_shape_latitude[1] = {-1};
87 int rawcycpp_shape_longitude[1] = {-1};
89 cyclus::InfileTree* sub = tree->SubTree(
"config/*");
93 cyclus::InfileTree* bub = sub->SubTree(
"in_streams", 0);
94 cyclus::InfileTree* sub = bub;
95 int n1 = sub->NMatches(
"stream");
96 std::vector< std::pair< std::pair< double, double >, std::map< std::string, double > > > streams__val;
97 streams__val.resize(n1);
98 for (
int i1 = 0; i1 < n1; ++i1) {
99 std::pair< std::pair< double, double >, std::map< std::string, double > > elem;
101 cyclus::InfileTree* bub = sub->SubTree(
"stream", i1);
102 cyclus::InfileTree* sub = bub;
103 std::pair< double, double > firsti1;
105 cyclus::InfileTree* bub = sub->SubTree(
"info", 0);
106 cyclus::InfileTree* sub = bub;
109 double first0_in = cyclus::Query<double>(sub,
"mixing_ratio", 0);
114 double second0_in = cyclus::Query<double>(sub,
"buf_size", 0);
115 second0 = second0_in;
117 std::pair< double, double > firsti1_in(first0, second0);
118 firsti1 = firsti1_in;
120 std::map< std::string, double > secondi1;
122 cyclus::InfileTree* bub = sub->SubTree(
"commodities", 0);
123 cyclus::InfileTree* sub = bub;
124 int n2 = sub->NMatches(
"item");
125 std::map< std::string, double > secondi1_in;
126 for (
int i2 = 0; i2 < n2; ++i2) {
129 std::string key_in = cyclus::Query<std::string>(sub,
"item/commodity", i2);
134 double val_in = cyclus::Query<double>(sub,
"item/pref", i2);
137 secondi1_in[key] = val;
139 secondi1 = secondi1_in;
141 std::pair< std::pair< double, double >, std::map< std::string, double > > elem_in(firsti1, secondi1);
144 streams__val[i1] = elem;
149 std::string out_commod_val = cyclus::Query<std::string>(sub,
"out_commod");
152 if (sub->NMatches(
"out_buf_size") > 0) {
154 double out_buf_size_val = cyclus::Query<double>(sub,
"out_buf_size");
158 double out_buf_size_tmp = 1e+299;
161 if (sub->NMatches(
"throughput") > 0) {
163 double throughput_val = cyclus::Query<double>(sub,
"throughput");
167 double throughput_tmp = 1e+299;
170 if (sub->NMatches(
"latitude") > 0) {
172 double latitude_val = cyclus::Query<double>(sub,
"latitude");
176 double latitude_tmp = 0.0;
179 if (sub->NMatches(
"longitude") > 0) {
181 double longitude_val = cyclus::Query<double>(sub,
"longitude");
185 double longitude_tmp = 0.0;
198 virtual void InitFrom(cyclus::QueryableBackend* b) {
199 cyclus::Facility::InitFrom(b);
200 int rawcycpp_shape_streams_[8] = {-1, -1, -1, -1, -1, -1, -1, -1};
202 int rawcycpp_shape_out_commod[1] = {-1};
204 int rawcycpp_shape_out_buf_size[1] = {-1};
206 int rawcycpp_shape_output[2] = {-1, -1};
207 cycpp_shape_output = std::vector<int>(rawcycpp_shape_output, rawcycpp_shape_output + 2);
208 int rawcycpp_shape_throughput[1] = {-1};
210 int rawcycpp_shape_latitude[1] = {-1};
212 int rawcycpp_shape_longitude[1] = {-1};
214 cyclus::QueryResult qr = b->Query(
"Info", NULL);
215 streams_ = qr.GetVal<std::vector< std::pair< std::pair< double, double >, std::map< std::string, double > > > >(
"streams_");
216 out_commod = qr.GetVal<std::string>(
"out_commod");
219 latitude = qr.GetVal<
double>(
"latitude");
220 longitude = qr.GetVal<
double>(
"longitude");