Run.
1157 {
1158 using namespace std;
1159 using namespace JPP;
1160
1161 ifstream in(script.c_str());
1162
1163 while (in) {
1164
1166
1168
1169 if (buffer.empty() || buffer[0] ==
skip_t) {
1170 continue;
1171 }
1172
1173 istringstream is(buffer);
1174
1176
1178
1180
1181 }
else if (key ==
fix_t) {
1182
1183 string type;
1184 ids_t id;
1185
1186 if (is >> type >> id) {
1193 } else {
1195 }
1196 }
1197
1198 }
else if (key ==
set_t) {
1199
1200 string type;
1201 char c;
1202 ids_t id;
1203
1204 if (is >> type >> c >> id) {
1205
1209
1210 id.set(c, false);
1211
1218 } else {
1220 }
1221
1222 } else {
1224 }
1225 }
1226
1228
1229 string stage;
1230 JParameters_t
input;
1231
1232 if (is >> stage >>
input) {
1233
1234 STATUS(
"stage " << setw(3) << stage <<
" {" <<
input <<
"}" << endl);
1235
1237
1239
1240 ofstream out(
MAKE_CSTRING(
"stage-" << stage <<
".log"));
1241
1242 {
1244
1245 switch (stage[stage.size() - 1]) {
1246
1247 case '0':
1249 break;
1250
1251 case 'a':
1252 case 'A':
1254 break;
1255
1256 case 'b':
1257 case 'B':
1259 break;
1260
1261 case 'c':
1262 case 'C':
1264 break;
1265
1266 case 'd':
1267 case 'D':
1269 break;
1270
1271 case 'x':
1272 case 'X':
1274 break;
1275
1276 default:
1278 break;
1279 }
1280 }
1281
1282 out.close();
1283
1286
1288
1290 }
1291
1292 } else {
1294 }
1295 }
1296 }
1297
1298 in.close();
1299 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
#define MAKE_CSTRING(A)
Make C-string.
Auxiliary class for CPU timing and usage.
unsigned long long usec_wall
This class can be used to temporarily redirect one output (input) stream to another output (input) st...
Exception for accessing a value in a collection that is outside of its range.
static const std::string string_t
string
static const std::string tripod_t
tripod
static const char Z_t
set z-coordinate
static const std::string set_t
set coordinate of object
static const std::string initialise_t
initialise
static const char Y_t
set y-coordinate
static const char skip_t
Script commands.
static const char X_t
set x-coordinate
static const std::string stage_t
fit stage
static const std::string fix_t
fix objects
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
void erase(const ids_t &B)
Erase elements that are in given list of identifiers.
void set(const ids_t &B, const T &OP)
Set fit options of elements to result of given logical operator combined with fit options in given li...
void stage_x(const JParameters_t ¶meters)
Fit procedure to determine the (x,y,z) positions of the modules.
void store(const std::string &dir=".")
Store data in given directory.
void stage_c(const JParameters_t ¶meters)
Fit procedure to determine the z-positions of the modules.
void stage_0(const JParameters_t ¶meters)
Fit procedure to determine the positions of tripods and transmitters using strings that are fixed.
void stage_d(const JParameters_t ¶meters)
Fit procedure to determine the z-positions of anchors.
void stage_b(const JParameters_t ¶meters)
Fit procedure to determine the stretching and z-positions of individual strings.
void stage_a(const JParameters_t ¶meters)
Fit procedure to determine the positions of the strings and tripods.