8 #include "dbclient/KM3NeTDBClient.h"
26 int main(
int argc,
char **argv)
41 JParser<> zap(
"Auxiliary program to print module identifier for a given module location.");
47 zap[
'D'] =
make_field(detid,
"Detector identifier");
48 zap[
'L'] =
make_field(location,
"Module location");
53 catch(
const exception &error) {
54 FATAL(error.what() << endl);
58 while (location == JLocation()) {
69 ResultSet& rs =
getResultSet(getTable<JDetectorIntegration_t>());
72 THROW(JDatabaseException,
"Error reading " << getTable<JDetectorIntegration_t>());
75 }
catch (
const exception& error) {
77 FATAL(error.what() << endl);
86 if (location.getString() ==
CLB->second.string &&
87 location.getFloor() ==
CLB->second.floor) {
Utility class to parse command line options.
int main(int argc, char *argv[])
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Data structure for detector geometry and calibration.
JDetectorsHelper & getDetector()
Auxiliary function for helper object initialisation.
static const JPBS_t CLB(3, 4, 3, 2)
PBS of central-logic board
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
JCLBIDHelper & getCLBID()
Auxiliary function for helper object initialisation.
static const JPBSSequences CLB_SEQUENCES
PBS sequences for central-logic board.
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.
do set_variable DETECTOR_TXT $WORKDIR detector