50     JUPITable(
const char* 
const fileName)
 
   55       ifstream 
in(fileName);
 
   57       for (
string buffer; 
getline(
in, buffer); ) {
 
   59         istringstream 
is(buffer);
 
   95       if (p != number2upi.end()) {
 
   99         if (q != p->second.end()) {
 
  126 int main(
int argc, 
char **argv)
 
  143   double                     HVstepMin   = 2 * 3.14;              
 
  171     JParser<> zap(
"Example program to find optimal HV-settings.");
 
  173     zap[
'f'] = 
make_field(inputFile,    
"input    file (ROOT format)");
 
  175     zap[
'a'] = 
make_field(detectorFile, 
"detector file");
 
  176     zap[
'b'] = 
make_field(UPIFile,      
"PMT UPI ASCII table");
 
  183   catch(
const exception &error) {
 
  184     FATAL(error.what() << endl);
 
  187   if (login.empty() || locationID.empty()) {
 
  189     FATAL(
"Missing user information (please specify via -#login and -#locationID).");
 
  191   } 
else if (!APIversion.is_valid()) {
 
  193     FATAL(
"Invalid database API version " << APIversion);
 
  195   } 
else if (testType.empty()) {
 
  197     FATAL(
"Missing database test type (please specify via -#testType).");
 
  201     FATAL(
"Missing run numbers.");
 
  207   const JUUID& UUID      = JUUID::rndm();
 
  212   timer->tm_sec -= elapsedTime;
 
  219   catch (
const exception& error) {
 
  220     FATAL(error.what() << endl);
 
  225   JUPITable     fetchUPI(UPIFile.c_str());
 
  230   TFile input(inputFile.c_str(), 
"READ");
 
  244   JHVInterpolator::setMinHVDistance(HVstepMin);
 
  245   JHVInterpolator::setHVRange      (HVrange);
 
  246   JHVInterpolator::setGainRange    (gainRange);
 
  248   NOTICE(
"Searching optimal high-voltage settings..." << endl <<
 
  249          LEFT(30) << 
"UPI" << 
CENTER(35) << 
"(identifer / location)" << 
RIGHT(35) << 
"Inter-/Extrapolated high-voltage [-]" << endl);
 
  253     const string&   
name = it->first;
 
  258     const int      seppos   = name.find(
'.');
 
  259     const int      moduleID = stoi(name.substr(0, seppos));
 
  260     const int      tdc      = stoi(name.substr(seppos + 1, seppos + 3));
 
  266     const string   location = 
MAKE_STRING(right << 
FILL(4,
'0') << module.getLocation().getString() << 
'.' <<
 
  267                                           right << 
FILL(2,
'0') << module.getLocation().getFloor()  << 
'.' <<
 
  268                                           right << 
FILL(2,
'0') << tdc);
 
  270     NOTICE(
LEFT(30) << pmtUPI << 
"(a.k.a. " << name << 
" / " << location << 
"): ");
 
  277       NOTICE(right << 
FIXED(20,2) << result << 
" +/- " << 
FIXED(4,2) << error << endl);
 
  283       WARNING(
"Could not find high-voltage corresponding to target gain; Setting zero." << endl);
 
  294   metaInfo.push_back(
JMeta(argc, argv));
 
  299     metaInfo.push_back(*
in.next());
 
  303   TFile output(inputFile.c_str(), 
"RECREATE");
 
  317   if (APIversion.getMajorVersion() == 2) {
 
  338     js[
Start_t]          = timer.toString(format);
 
  339     js[
End_t]            = timer().toString(format);
 
  354   ofs << setw(2) << setprecision(8);
 
static JDBTestTypesTuneHV & getDBVersionTuneHV
Function object for looking up the HV-tuning database version number corresponding to a specific test...
 
Utility class to parse command line options. 
 
static const std::string UUID_t
 
int main(int argc, char *argv[])
 
const JModule & getModule(const JObjectID &id) const 
Get module parameters. 
 
Data structure for a composite optical module. 
 
static const std::string Time_t
 
#define gmake_property(A)
macro to convert (template) parameter to JPropertiesElement object 
 
static const std::string Tests_t
 
static const JPBS_t PMT(3, 4, 2, 3)
PBS of photo-multiplier tube (PMT) 
 
static const std::string OK_t
 
static const double FITTOT_GAIN_MAX
Default maximal gain. 
 
static const double FITTOT_GAIN_MIN
Default minimal gain. 
 
Router for direct addressing of module data in detector data structure. 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
then echo Enter input within $TIMEOUT_S seconds echo n User name
 
Utility class to parse parameter values. 
 
static const std::string Location_t
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
JDateAndTimeFormat
Date and time formats. 
 
Universal product identifier (UPI). 
 
Dynamic ROOT object management. 
 
Auxiliary data structure for floating point format specification. 
 
static const std::string Encoding_t
 
Data structure for detector geometry and calibration. 
 
#define MAKE_STRING(A)
Make string. 
 
static const std::string Provenance_t
 
Auxiliary data structure for alignment of data. 
 
Scanning of objects from a single file according a format that follows from the extension of each fil...
 
static const std::string Arguments_t
 
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
 
static const std::string Configuration_t
 
I/O formatting auxiliaries. 
 
Auxiliary data structure to store high-voltage versus gain data and interpolate the nominal high-volt...
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
Auxiliary data structure for I/O of database API versions. 
 
double getHV() const 
Get interpolated high-voltage. 
 
int getID() const 
Get identifier. 
 
Data structure for PMT geometry, calibration and status. 
 
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line. 
 
static const std::string Code_t
 
static const std::string Test_t
 
static const std::string Info_t
 
bool is_valid() const 
Check validity. 
 
static const std::string Message_t
 
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory. 
 
const double NOMINAL_GAIN
Specification for normalized gain corresponding to a one photo-electron pulse. 
 
General purpose messaging. 
 
Auxiliary data structure for sequence of same character. 
 
double getHVError() const 
Get error estimate on interpolated high-voltage. 
 
const JPMT & getPMT(const JPMTIdentifier &id) const 
Get PMT parameters. 
 
Direct access to module in detector data structure. 
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file. 
 
Auxiliary class to define a range between two values. 
 
Auxililary class to get date and time. 
 
Utility class to parse command line options. 
 
Data structure for PMT high-voltage calibration. 
 
static const std::string Type_t
 
static const std::string APIVersion_t
 
Product breakdown structure (PBS). 
 
static const std::string User_t
Detector calibration key words for JSON I/O. 
 
Object reading from a list of files. 
 
Exception for accessing a value in a collection that is outside of its range. 
 
static const std::string Error_t
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
 
static const std::string Data_t
 
static const std::string End_t
 
static const std::string Start_t
 
bool interpolateHV(const double gainTarget)
Inter-/Extrapolate the high-voltage value corresponding to the target gain value. ...
 
static const std::string Fail_t