39int main(
int argc,
char **argv)
63 JParser<> zap(
"Auxiliary program to print high-voltage tuning results.");
65 zap[
'f'] =
make_field(inputFile,
"input file (JSON output of JTuneHV)");
73 }
catch(
const exception &error) {
80 FATAL(
"Missing user information (please specify via -#login and -#locationID).");
84 const JUUID& UUID = JUUID::rndm();
95 catch (
const exception& error) {
110 if (isJSONFile(inputFile.c_str())) {
114 ifstream
ifs(inputFile.c_str());
121 json::const_iterator
i0 =
js.find(APIVersion_t);
123 if (
i0 !=
js.cend()) {
132 json::const_iterator
i1 =
js.find(Data_t);
135 (
i1 !=
js.cend() &&
i1->size() > 0)) {
137 DBTestType = (*i1)[0].at(Test_t + Type_t).get<
string>();
139 JHVCalibration_t::setVersion(getDBVersionTuneHV(
DBTestType));
142 metaInfoStr += (*i1)[0].at(Provenance_t + Info_t).at(Configuration_t).get<
string>();
148 JHVCalibration_t::setVersion(getDBVersionTuneHV(
DBTestType));
157 for (JHVCalibration::const_iterator
it =
HVcals.cbegin();
it !=
HVcals.cend(); ++
it) {
160 const JModule&
module = PMTrouter.getParentModule(pmtUPI.getNumber());
165 if (
it->result != OK_t) {
177 ERROR(inputFile <<
" is not a JSON file." <<
endl);
192 if (i->second.size() == NUMBER_OF_PMTS) {
195 WARNING(
"No successful calibrations found for module " << i->first <<
" (dead module?)" <<
endl);
199 for (JHVCalibration::const_iterator j = i->second.cbegin(); j != i->second.cend(); ++j) {
202 const JModule&
module = PMTrouter.getParentModule(pmtUPI.getNumber());
208 right <<
FIXED(20,1) << j->supplyVoltage <<
RIGHT(10) << j->result <<
endl);
229 json error = { {Message_t,
"" },
231 {Arguments_t, json::array() } };
239 {Start_t + Time_t, timer.
toString() },
240 {End_t + Time_t, timer().
toString() },
247 js[Error_t] =
json(error);
250 js[Data_t][0] =
json(data);
KM3NeT DAQ constants, bit handling, etc.
Data structure for detector geometry and calibration.
Specifications of file name extensions.
General purpose messaging.
Direct access to PMT in detector data structure.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int main(int argc, char **argv)
I/O formatting auxiliaries.
#define MAKE_STRING(A)
Make string.
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Data structure for a composite optical module.
Router for direct addressing of PMT data in detector data structure.
Utility class to parse parameter values.
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).
KM3NeT DAQ data structures and auxiliaries.
Auxiliary data structure for alignment of data.
Auxiliary data structure for sequence of same character.
Auxiliary data structure for floating point format specification.
Auxiliary data structure for location of product in detector.
Universal product identifier (UPI).
Auxiliary data structure for general purpose version number.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for date and time.
std::string toString() const
Get ASCII formatted date and time.
void sub(const time_t t1)
Subtract given time.
Auxiliary data structure for alignment of data.
Auxiliary data structure for alignment of data.