25int main(
int argc,
char **argv)
37 JParser<> zap(
"Auxiliary program to decompose detector to separate calibrations.");
41 "(optionally contains wild card \'" << FILENAME_WILDCARD <<
"\')");
42 zap[
'p'] =
make_field(precision,
"precision for match with reference module") = 1.0e-5;
47 catch(
const exception &error) {
61 if (!hasDetectorAddressMap(
detector.getID())) {
62 FATAL(
"No detector address map for detector identier " <<
detector.getID() <<
endl);
72 if (
module->getFloor() != 0) {
80 if (!JModule::compare(buffer, *
module, precision)) {
81 FATAL(
"Module " <<
setw(10) <<
module->getID() <<
" at location " << getLabel(
module->getLocation()) <<
" incompatible with " << (
demo.get(
module->getID()) ==
demo.getDefaultModuleAddressMap() ?
"default" :
"custom") <<
" reference." <<
endl);
87 const json error = { {Message_t,
"" },
89 {Arguments_t, json::array() } };
102 for (JModule::const_iterator pmt =
module->begin(); pmt !=
module->end(); ++pmt) {
108 js[Data_t][N][PMTT0s_t] =
json(data);
135 js[Data_t][N][BasePositions_t] =
json(data[0]);
136 js[Data_t][N][DOMPositions_t] =
json(data[1]);
156 if (
module->getFloor() != 0) {
162 js[Data_t][N][DOMRotations_t] =
json(data);
180 if (
module->getFloor() == 0)
187 js[Data_t][N][BaseAcousticT0_t] =
json(data[0]);
188 js[Data_t][N][DOMAcousticT0_t] =
json(data[1]);
205 if (
module->getFloor() == 0)
212 js[Data_t][N][BaseCompassRotations_t] =
json(data[0]);
213 js[Data_t][N][DOMCompassRotations_t] =
json(data[1]);
233 for (JModule::const_iterator pmt =
module->begin(); pmt !=
module->end(); ++pmt) {
234 data.push_back(
JPMTStatus_t(pmt->getID(), pmt->getStatus()));
238 js[Data_t][N][PMTStatusInfo_t ] =
json(data);
244 if (
module->getFloor() == 0)
250 js[Data_t][N][BaseStatusInfo_t] =
json(data[0]);
251 js[Data_t][N][DOMStatusInfo_t] =
json(data[1]);