47     JParser<> zap(
"Auxiliary program to set PMT thresholds according DAQ configuration.");
 
   55     zap[
'P'] = 
make_field(pmtFile,    
"PMT parameters file")  =  
"";
 
   56     zap[
'F'] = 
make_field(formula,    
"transfer function")    =  
"((x * 1.0)/255.0 * 1.6 + 0.8 - 0.989) / 0.44"; 
 
   61   catch(
const exception& error) {
 
   62     FATAL(error.what() << endl);
 
   73   TF1 f1(
"user", formula.c_str());
 
   76     FATAL(
"Formula <" << formula << 
"> invalid." << endl);
 
   82   JPMTThreshold getPMTThreshold;
 
   92     getPMTThreshold.configure(
id, run);
 
   94     DEBUG(getPMTThreshold);
 
   96     ResultSet& rs = 
getResultSet(getTable<JDetectorIntegration>(), getSelector<JDetectorIntegration>(
id));
 
  104   catch(
const exception& error) {
 
  105     FATAL(error.what() << endl);
 
  111     if (i->PMTID != -1) {
 
  115         const JPMTThreshold::result_type threshold = getPMTThreshold(i->PMTUPI);
 
  117         const double value = f1.Eval((
double) threshold.value);
 
  121           cout << setw(4) << i->DUID         << 
' '  
  122                << setw(2) << i->FLOORID      << 
' '  
  123                << setw(2) << i->CABLEPOS     << 
' '  
  124                << setw(3) << threshold.value << 
' ' 
  125                << 
FIXED(5,2) << value        << 
' ';
 
  127           if (threshold.is_default) {
 
  128             cout << 
"* (" << 
FIXED(5,2) << JPMTParameters().threshold << 
")";
 
  134         if (!threshold.is_default) {
 
  136           const JPMTIdentifier id(i->DOMID, i->CABLEPOS);
 
  138           parameters[id].threshold = value;
 
  141       catch(
const exception& error) {
 
  142         ERROR(error.what() << endl);
 
  149     parameters.comment.add(JMeta(argc, argv));
 
  151     parameters.store(pmtFile.c_str());
 
  155     cout << parameters << endl;
 
Utility class to parse command line options. 
 
*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. 
 
JDetectorsHelper getDetector
Function object for mapping serial number to object identifier of detector and vice versa...
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
bool is_integer(const std::string &buffer)
Check if string is an integer. 
 
static JStat getFileStatus
Function object for file status. 
 
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