38 int main(
int argc, 
char **argv)
 
   50   long long int   numberOfRows;
 
   56     JParser<> zap(
"Auxiliary program to check HV.");
 
   63     zap[
'D'] = 
make_field(detid,        
"Detector identifier");
 
   65     zap[
'n'] = 
make_field(numberOfRows, 
"Maximal number of rows")         = numeric_limits<long long int>::max();
 
   71   catch(
const exception &error) {
 
   72     FATAL(error.what() << endl);
 
   77   JManager<JLocation_t, TH1D>      H1(
new TH1D(
"HV[%]", NULL, 201, -1500.0, +1500.0));
 
   85     const int ID = getDetector<int>   (detid);
 
   86     detid        = getDetector<string>(detid);
 
   93       ResultSet& rs = 
getResultSet(getTable<JDetectorIntegration>(), getSelector<JDetectorIntegration>(ID));
 
   97         if (parameters.PMTUPI.getPBS() == 
PBS::PMT) {
 
   98           detector[parameters.PMTUPI] = JLocation_t(parameters.DUID, parameters.FLOORID, parameters.CABLEPOS);
 
  105     for (
const int run : runs) {
 
  110         ResultSet& rs  = 
getResultSet(getTable<JPMTHVRunSettings>(), getSelector<JPMTHVRunSettings>(detid, run));
 
  114           const JLocation_t location(parameters.DUID, parameters.FLOORID, parameters.CABLEPOS);  
 
  116           if (parameters.CABLEPOS != parameters.PMTINTID) {
 
  117             WARNING(
"PMT " << location << 
" position " << parameters.PMTINTID << endl);
 
  120           HV[location] = parameters.HV_VALUE;
 
  128         cout << 
"HV settings " << setw(8) << run << endl;
 
  131           cout << i->first << 
' ' << 
FIXED(6,1) << i->second << endl;
 
  135       JSelector selection(&JDatalogNumbers::PARAMETER_NAME, 
"pmt_highvolt@");
 
  137       selection += getSelector<JDatalogNumbers>(detid, run, run);
 
  139       ResultSet& rs  = 
getResultSet(getTable<JDatalogNumbers>(), selection);
 
  141       long long int counter = 0;
 
  148         const JLocation_t location = detector[upi];
 
  152         if (location.is_valid()) {
 
  156           H1[location]->Fill(HV[location] - 
parameters.DATA_VALUE);
 
  158           if (fabs(HV[location] - 
parameters.DATA_VALUE) > precision) {
 
  159             ERROR(
"HV " << location << 
" set/read " << 
FIXED(7,1) << HV[location] << 
"/" << 
FIXED(7,1) << 
parameters.DATA_VALUE << endl);
 
  173   catch(
const exception& error) {
 
  174     FATAL(error.what() << endl);
 
  179     ERROR(
"Alien UPI " << setw(24) << i->first << 
' ' << i->second << endl);
 
  185     out << JGraph(i->second, 
MAKE_CSTRING(
"G[" << i->first << 
"].hv"));
 
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) 
 
*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
 
#define MAKE_CSTRING(A)
Make C-string. 
 
Dynamic ROOT object management. 
 
Auxiliary data structure for floating point format specification. 
 
Double_t G1(const Double_t x)
Integral of method g1. 
 
I/O formatting auxiliaries. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
ROOT TTree parameter settings. 
 
General purpose messaging. 
 
Utility class to parse command line options. 
 
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
 
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