26 int main(
int argc, 
char **argv)
 
   41     JParser<> zap(
"Auxiliary program to check detector integration.");
 
   47     zap[
'D'] = 
make_field(detid,        
"Detector identifier");
 
   52   catch(
const exception &error) {
 
   53     FATAL(error.what() << endl);
 
   61     const int ID = getDetector<int>   (detid);
 
   62     detid        = getDetector<string>(detid);
 
   66     detector_type detectorA;
 
   69       ResultSet& rs = 
getResultSet(getTable<JDetectorIntegration>(), getSelector<JDetectorIntegration>(ID));
 
   73         if (parameters.PMTUPI.getPBS() == 
PBS::PMT) {
 
   74           detectorA[parameters.PMTUPI] = JLocation_t(parameters.DUID, parameters.FLOORID, parameters.CABLEPOS);
 
   82     JDetectorIntegration_t detectorB;
 
   85       ResultSet& rs  = 
getResultSet(getTable<JDetectorIntegration_t>());
 
   87       if (! (rs >> detectorB)) {
 
   88         THROW(JDatabaseException, 
"Error reading " << getTable<JDetectorIntegration_t>());
 
   92     detectorB.configure(detid);
 
   97     for (detector_type::const_iterator i = detectorA.begin(); i != detectorA.end(); ++i) {
 
   99       const JLocation_t locationA = i->second;
 
  100       const JLocation_t locationB = router.getLocation(i->first);
 
  102       cout << locationA << 
' ' << locationB << 
' ' << (locationA != locationB ? 
"*" : 
"") << endl;
 
  105   catch(
const exception& error) {
 
  106     FATAL(error.what() << endl);
 
Utility class to parse command line options. 
 
int main(int argc, char *argv[])
 
static const JPBS_t PMT(3, 4, 2, 3)
PBS of photo-multiplier tube (PMT) 
 
static const JPBSSequences PMT_SEQUENCES
PBS sequences for PMT. 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
 
I/O formatting auxiliaries. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
General purpose messaging. 
 
Utility class to parse command line options. 
 
ResultSet & getResultSet(const std::string &query)
Get result set. 
 
std::vector< JServer > getServernames()
Get list of names of available database servers.