29int main(
int argc,
char **argv)
44 JParser<> zap(
"Auxiliary program to check HV.");
46 zap[
's'] =
make_field(server) = getServernames();
56 catch(
const exception &error) {
57 FATAL(error.what() << endl);
64 load(detectorFile, detectorA);
73 JDB::reset(usr, pwd, cookie);
75 const string detid = getDetector(detectorA.
getID());
79 detector_type detectorB;
86 if (parameters.PMTUPI.getPBS() == PBS::PMT) {
87 detectorB[parameters.PMTSER] = parameters;
94 for (JDetector::iterator module = detectorA.begin(); module != detectorA.end(); ++module) {
98 for (
size_t i = 0; i !=
module->size(); ++i) {
100 const int pmt = (*module)[i].getID();
102 if (detectorB.count(pmt) == 1) {
108 if (module->getLocation() != location) {
109 FATAL(
"Wrong location " << left << setw(5) << pmt <<
" " << module->getLocation() <<
" != " << location << endl);
115 << right << setw(10) << module->getID() <<
' '
122 if (parameters.
PMTID != (
int) i) {
124 ERROR(
"PMT serial number "
125 << setw(6) << pmt <<
' '
126 << right << setw(10) << module->getID() <<
' '
127 <<
JLocation_t(module->getString(), module->getFloor(), i) <<
" -> "
133 ERROR(
"Missing PMT " << left << setw(5) << pmt << right << setw(10) << module->getID() <<
"." <<
FILL(2,
'0') << i <<
FILL() << endl);
137 module->swap(buffer);
140 catch(
const exception& error) {
141 FATAL(error.what() << endl);