27{
30
32 string usr;
33 string pwd;
34 string cookie;
35 string detid;
36 int run;
38
39 try {
40
41 JParser<> zap(
"Utility program to print PMT HV settings.");
42
50
51 zap(argc, argv);
52 }
53 catch(const exception& error) {
54 FATAL(error.what() << endl);
55 }
56
57
58 try {
59
60 JDB::reset(usr, pwd, cookie);
61
62 const int ID = getDetector<int> (detid);
63 detid = getDetector<string>(detid);
64
66
68
69 {
70 DEBUG(
"Downloading detector integration data... " << flush);
71
73
76 }
77
78 rs.Close();
79
81 }
82
84
85 {
86 DEBUG(
"Downloading HV data... " << flush);
87
89
91 HV[parameters.DUID][parameters.FLOORID][parameters.CABLEPOS] = parameters;
92 }
93
94 rs.Close();
95
97 }
98
100
101 for (detector_type::const_iterator i =
detector.begin(); i !=
detector.end(); ++i) {
102
103 if (i->PMTUPI.getPBS() == PBS::PMT) {
104 {
105 cout <<
FILL(4,
'0') << i->DUID <<
'.' <<
FILL(2,
'0') << i->FLOORID <<
"[" <<
FILL(2,
'0') << i->CABLEPOS <<
"] " <<
FILL()
106 << setw(4) << HV[i->DUID][i->FLOORID][i->CABLEPOS].HV_INDEX << ' '
107 <<
FIXED(7,1) << HV[i->DUID][i->FLOORID][i->CABLEPOS].HV_VALUE <<
' ';
108 }
109 try {
110 cout << setw(4) << pmt_hv(i->PMTUPI).value << ' '
111 << pmt_hv(i->PMTUPI).is_default
112 << (pmt_hv(i->PMTUPI).value != HV[i->DUID][i->FLOORID][i->CABLEPOS].HV_INDEX ? "*" : "");
113 }
114 catch(const exception& error) {
115 cout << "****";
116 }
117
118 cout << endl;
119 }
120 }
121 }
122 catch(const exception& error) {
123 FATAL(error.what() << endl);
124 }
125}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class for PMT HVs.
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.
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 floating point format specification.
Wrapper class for server name.
Template definition for getting table specific selector.