41 JParser<> zap(
"Utility program to test PMT HV settings.");
53 catch(
const exception& error) {
54 FATAL(error.what() << endl);
62 const int ID = getDetector<int> (detid);
63 detid = getDetector<string>(detid);
70 ResultSet& rs =
getResultSet(getTable<JDetectorIntegration>(), getSelector<JDetectorIntegration>(ID));
73 detector.push_back(parameters);
82 ResultSet& rs =
getResultSet(getTable<JPMTHVRunSettings>(), getSelector<JPMTHVRunSettings>(detid, run));
84 for (JPMTHVRunSettings parameters; rs >>
parameters; ) {
85 HV[parameters.DUID][parameters.FLOORID][parameters.CABLEPOS] =
parameters;
91 const JPMTHV pmt_hv(ID, run);
93 for (detector_type::const_iterator i = detector.begin(); i != detector.end(); ++i) {
95 if (i->PMTUPI.getPBS() ==
PBS::PMT) {
97 cout <<
FILL(4,
'0') << i->DUID <<
'.' <<
FILL(2,
'0') << i->FLOORID <<
"[" <<
FILL(2,
'0') << i->CABLEPOS <<
"] " <<
FILL()
98 << setw(4) << pmt_hv(i->PMTUPI).value <<
' '
99 << setw(4) << HV[i->DUID][i->FLOORID][i->CABLEPOS].HV_INDEX <<
' '
100 <<
FIXED(7,1) << HV[i->DUID][i->FLOORID][i->CABLEPOS].HV_VALUE <<
' '
101 << pmt_hv(i->PMTUPI).is_default
102 << (pmt_hv(i->PMTUPI).value != HV[i->DUID][i->FLOORID][i->CABLEPOS].HV_INDEX ?
"*" :
"") << endl;
106 catch(
const exception& error) {
107 FATAL(error.what() << endl);
Utility class to parse command line options.
static const JPBS_t PMT(3, 4, 2, 3)
PBS of photo-multiplier tube (PMT)
*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
Auxiliary data structure for floating point format specification.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary data structure for sequence of same character.
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