30int main(
const int argc,
const char *
const argv[])
47 JParser<> zap(
"Auxiliary program to set PMT thresholds according DAQ configuration of a given data taking run.");
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) {
73 TF1 f1(
"user", formula.c_str());
76 FATAL(
"Formula <" << formula <<
"> invalid." <<
endl);
104 catch(
const exception& error) {
111 if (i->PMTID != -1) {
115 const JPMTThreshold::result_type threshold =
getPMTThreshold(i->PMTUPI);
117 const double value = f1.Eval((
double) threshold.value);
119 if (
debug >= debug_t) {
122 <<
FILL(2,
'0') << i->FLOORID <<
FILL() <<
'['
123 <<
FILL(2,
'0') << i->CABLEPOS <<
FILL() <<
']'
125 <<
setw(3) << threshold.value <<
' '
126 <<
FIXED(5,2) << value <<
' ';
128 if (threshold.is_default) {
135 if (!threshold.is_default) {
139 parameters[id].threshold = value;
142 catch(
const exception& error) {
144 <<
FILL(4,
'0') << i->DUID <<
FILL() <<
'.'
145 <<
FILL(2,
'0') << i->FLOORID <<
FILL() <<
'['
146 <<
FILL(2,
'0') << i->CABLEPOS <<
FILL() <<
']'
148 << error.what() <<
endl);
General purpose messaging.
#define DEBUG(A)
Message macros.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class for PMT thresholds.
Auxiliary class for map of PMT parameters.
Data structure for PMT parameters.
double threshold
threshold [npe]
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
int main(const int argc, const char *const argv[])
Auxiliary data structure for sequence of same character.
Auxiliary data structure for floating point format specification.
Wrapper class for server name.
void store(const char *file_name) const
Store to output file.
void load(const char *file_name)
Load from input file.