30{
   33 
   35  string          usr;
   36  string          pwd;
   37  string          cookie;
   38  string          detectorFile;
   41 
   42  try {
   43 
   44    JParser<> zap(
"Auxiliary program to check HV.");
 
   45    
   53 
   54    zap(argc, argv);
   55  }
   56  catch(const exception &error) {
   57    FATAL(error.what() << endl);
 
   58  }
   59 
   60 
   62 
   63  try {
   64    load(detectorFile, detectorA);
 
   65  }
   68  }
   69 
   70  
   71  try {
   72 
   73    JDB::reset(usr, pwd, cookie);
   74 
   76 
   78    
   79    detector_type detectorB;
   80 
   81    {
   83 
   85 
   86        if (parameters.PMTUPI.getPBS() == PBS::PMT) {
   87          detectorB[parameters.PMTSER] = parameters;
   88        }
   89      }
   90 
   91      rs.Close();
   92    }
   93 
   94    for (JDetector::iterator module = detectorA.begin(); module != detectorA.end(); ++module) {
   95 
   97 
   98      for (size_t i = 0; i != module->size(); ++i) {
   99 
  100        const int pmt = (*module)[i].getID();
  101 
  102        if (detectorB.count(pmt) == 1) {
  103 
  105 
  107          
  108          if (module->getLocation() != location) {
  109            FATAL(
"Wrong location " << left << setw(5) << pmt << 
" " << module->getLocation() << 
" != "  << location << endl);
 
  110          }
  111 
  113            
  115                   << right << setw(10) << module->getID() << ' ' 
  118          
  120          }
  121 
  122          if (parameters.
PMTID != (
int) i) {
 
  123 
  124            ERROR(
"PMT serial number "  
  125                  << setw(6) << pmt << ' '
  126                  << right << setw(10) << module->getID() << ' ' 
  127                  << 
JLocation_t(module->getString(), module->getFloor(), i)                << 
" -> " 
  129          }
  130          
  131        } else {
  132 
  133          ERROR(
"Missing PMT " << left << setw(5) << pmt << right << setw(10) << module->getID() << 
"." << 
FILL(2,
'0') << i << 
FILL() << endl);
 
  134        }
  135      }
  136 
  137      module->swap(buffer);
  138    }
  139  }
  140  catch(const exception& error) {
  141    FATAL(error.what() << endl);
 
  142  }
  143 
  144 
  146    try {
  148    }
  151    }
  152  }
  153}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Logical location of module.
 
int getID() const
Get identifier.
 
Utility class to parse command line options.
 
ResultSet & getResultSet(const std::string &query)
Get result set.
 
JDetectorsHelper & getDetector()
Auxiliary function for helper object initialisation.
 
std::vector< JServer > getServernames()
Get list of names of available database servers.
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
 
void store(const std::string &file_name, const JDetector &detector)
Store detector to output file.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Auxiliary data structure for sequence of same character.
 
Auxiliary data structure for location of product in detector.
 
Wrapper class for server name.
 
Template definition for getting table specific selector.