1 #ifndef __JDETECTOR__JDETECTORCALIBRATION__ 
    2 #define __JDETECTOR__JDETECTORCALIBRATION__ 
   32 namespace JDETECTOR {}
 
   33 namespace JPP { 
using namespace JDETECTOR; }
 
   78     return std::stod(string_value_array[0]);
 
  116       js = 
json{ { 
Id_t,     
object.getID() },
 
  129       object.setID(js.at(
Id_t).get<
int>());
 
  172                  { 
T0_t,     
object.getT0() } };
 
  184       object.setID(js.at(
Serial_t).get<
int>());
 
  186       object.setT0(js.at(
T0_t).get<
double>());
 
  239       object.setID(js.at(
Serial_t).get<
int>());
 
  241       object.setStatus(js.at(
STATUS_t).get<
int>());
 
  259       runNumbers   (std::
vector<int>(0)),
 
  274                      const std::string&      
result,
 
  277                      const double            gain          = 1.0) :
 
  281       runNumbers   (runNumberList),
 
  293       return get_version();
 
  320       os << 
object.getUPI();
 
  322       js[
UPI_t]                      = os.str();
 
  361       stringstream 
is(js.at(
UPI_t).get<
string>());
 
  363       is >> 
static_cast<JUPI_t&
>(object);
 
  377             object.runNumbers.push_back(stoi(*
i));
 
  435                                const std::string&      
result,
 
  436                                const double            threshold,
 
  440       threshold    (threshold),
 
  441       runNumberList(runNumbers)
 
  453       std::ostringstream os;
 
  455       os << 
object.getUPI();
 
  457       js[
UPI_t]                    = os.str();
 
  464                                            { 
Values_t, 
object.runNumberList                  } };
 
  478       stringstream 
is(js.at(
UPI_t).get<
string>());
 
  480       is >> 
static_cast<JUPI_t&
>(object);
 
  528       js = 
json{ { 
Id_t, 
object.getID() },
 
  529                  { 
PX_t, 
object.getX()  },
 
  530                  { 
PY_t, 
object.getY()  },
 
  531                  { 
PZ_t, 
object.getZ()  } };
 
  544         object.setID(js.at(
DOMId_t).get<
int>());
 
  545       else if (js.contains(
Id_t))
 
  546         object.setID(js.at(
Id_t)   .get<
int>());
 
  551                                      js.at(
PY_t).get<
double>(),
 
  552                                      js.at(
PZ_t).get<
double>()));
 
  592       js = 
json{ { 
Id_t, 
object.getID() },
 
  593                  { 
Q0_t, 
object.getA()  },
 
  594                  { 
QX_t, 
object.getB()  },
 
  595                  { 
QY_t, 
object.getC()  },
 
  596                  { 
QZ_t, 
object.getD()  } };
 
  609         object.setID(js.at(
DOMId_t).get<
int>());
 
  610       else if (js.contains(
Id_t))
 
  611         object.setID(js.at(
Id_t)   .get<
int>());
 
  616                                          js.at(
QX_t).get<
double>(),
 
  617                                          js.at(
QY_t).get<
double>(),
 
  618                                          js.at(
QZ_t).get<
double>()));
 
  658       js = 
json{ { 
Id_t,     
object.getID() },
 
  672         object.setID(js.at(
DOMId_t).get<
int>());
 
  673       else if (js.contains(
Id_t))
 
  674         object.setID(js.at(
Id_t)   .get<
int>());
 
  678       object.setStatus(js.at(
STATUS_t).get<
int>());
 
  718       js = 
json{ { 
Id_t, 
object.getID() },
 
  719                  { 
T0_t, 
object.getT0() } };
 
  732         object.setID(js.at(
DOMId_t).get<
int>());
 
  733       else if (js.contains(
Id_t))
 
  734         object.setID(js.at(
Id_t)   .get<
int>());
 
  738       object.setT0(js.at(
T0_t).get<
double>());
 
  778       js = 
json{ { 
Id_t, 
object.getID() },
 
  779                  { 
Q0_t, 
object.getA()  },
 
  780                  { 
QX_t, 
object.getB()  },
 
  781                  { 
QY_t, 
object.getC()  },
 
  782                  { 
QZ_t, 
object.getD()  } };
 
  795         object.setID(js.at(
DOMId_t).get<
int>());
 
  796       else if (js.contains(
Id_t))
 
  797         object.setID(js.at(
Id_t)   .get<
int>());
 
  802                                          js.at(
QX_t).get<
double>(),
 
  803                                          js.at(
QY_t).get<
double>(),
 
  804                                          js.at(
QZ_t).get<
double>()));
 
friend void to_json(json &js, const JModuleRotation_t &object)
Convert module rotation to JSon. 
 
static const std::string Volt_t
 
friend void from_json(const json &js, JModuleStatus_t &object)
Convert JSon to module status. 
 
JModuleMap_t()
Default constructor. 
 
Data structure for PMT threshold calibration. 
 
static const std::string STATUS_t
 
JPMTStatus_t(const JObjectID &id, const JStatus &status)
Constructor. 
 
static void setVersion(const int version)
Set HV-tuning database test type. 
 
JPMTCalibration_t()
Default constructor. 
 
Time calibration (including definition of sign of time offset). 
 
friend void to_json(json &js, const JHVCalibration_t &object)
Convert PMT high-voltage calibration to JSon. 
 
static const std::string Name_t
 
JModuleRotation_t(const JObjectID &id, const JQuaternion3D &rotation)
Constructor. 
 
JHVCalibration_t()
Default constructor. 
 
JModuleMap_t(const JObjectID &id)
Constructor. 
 
std::vector< JPMTThresholdCalibration_t > JPMTThresholdCalibration
PMT threshold calibration. 
 
std::vector< JModuleMap_t > JModuleMap
module map 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
JCompassRotation_t()
Default constructor. 
 
JPMTThresholdCalibration_t()
Default constructor. 
 
static const std::string Parameters_t
 
std::vector< JModuleRotation_t > JModuleRotation
Module rotation. 
 
*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
 
static const std::string QX_t
 
friend void from_json(const json &js, JCompassRotation_t &object)
Convert JSon to compass rotation. 
 
std::vector< int > runNumbers
 
Universal product identifier (UPI). 
 
Data structure for time calibration. 
 
static int & get_version()
Get reference to HV-tuning database test type. 
 
double retrieve_value(std::vector< std::string > string_value_array)
Retrieve value from json array of strings. 
 
static const std::string T0_t
 
JPMTCalibration_t(const JObjectID &id, const JCalibration &calibration)
Constructor. 
 
static const std::string QZ_t
 
JCompassRotation_t(const JObjectID &id, const JQuaternion3D &rotation)
Constructor. 
 
JPMTStatus_t()
Default constructor. 
 
std::vector< JCompassRotation_t > JCompassRotation
Compass rotation. 
 
static const std::string Unit_t
 
static const std::string DOMId_t
 
friend void from_json(const json &js, JPMTThresholdCalibration_t &object)
Convert JSon to PMT threshold calibration. 
 
#define MAKE_STRING(A)
Make string. 
 
static const std::string Id_t
 
friend void to_json(json &js, const JModuleMap_t &object)
Convert module address map to JSon. 
 
static const std::string UPI_t
 
static const std::string Values_t
 
friend void from_json(const json &js, JModuleRotation_t &object)
Convert JSon to module rotation. 
 
Auxiliary data structure for module time calibration. 
 
Exception for missing value. 
 
static const std::string Serial_t
 
friend void to_json(json &js, const JModuleCalibration_t &object)
Convert module time calibration to JSon. 
 
static const std::string RunNumber_t
 
static const std::string PZ_t
 
I/O formatting auxiliaries. 
 
Auxiliary data structure for module address map. 
 
friend void from_json(const json &js, JModuleCalibration_t &object)
Convert JSon to module time calibration. 
 
Auxiliary data structure for compass rotation. 
 
static const std::string DOMMap_t
 
static const std::string Test_t
 
static const std::string Q0_t
 
static const std::string Unitless_t
 
JModuleCalibration_t(const JObjectID &id, const JCalibration &calibration)
Constructor. 
 
std::vector< JHVCalibration_t > JHVCalibration
PMT high voltage calibration. 
 
do set_variable OUTPUT_DIRECTORY $WORKDIR T
 
Auxiliary class for handling status. 
 
JModuleStatus_t()
Default constructor. 
 
JModuleStatus_t(const JObjectID &id, const JStatus &status)
Constructor. 
 
static const std::string PMTThreshold_t
 
JPMTThresholdCalibration_t(const JUPI_t &upi, const std::string &result, const double threshold, const std::vector< int > &runNumbers=std::vector< int >(0))
Constructor. 
 
static const std::string PX_t
 
JModuleCalibration_t()
Default constructor. 
 
JSon definitions and auxiliaries. 
 
static const std::string Result_t
 
JModulePosition_t(const JObjectID &id, const JPosition3D &position)
Constructor. 
 
static const std::string PMTGain_t
 
Data structure for unit quaternion in three dimensions. 
 
friend void from_json(const json &js, JPMTStatus_t &object)
Convert JSon to PMT status. 
 
std::vector< JModuleStatus_t > JModuleStatus
Module status. 
 
then $JPP_DIR examples JDetector JToT o $OUTPUT_FILE n N $NPE P gain
 
friend void to_json(json &js, const JCompassRotation_t &object)
Convert compass rotation to JSon. 
 
std::vector< int > runNumberList
 
friend void from_json(const json &js, JModulePosition_t &object)
Convert JSon to module position. 
 
JModulePosition_t()
Default constructor. 
 
JHVCalibration_t(const JUPI_t &upi, const std::string &result, const double hv, const std::vector< int > runNumberList=std::vector< int >(0), const double gain=1.0)
Constructor. 
 
Auxiliary data structure for PMT status. 
 
Auxiliary class for object identification. 
 
Data structure for PMT high-voltage calibration. 
 
std::vector< JPMTStatus_t > JPMTStatus
PMT status. 
 
std::string to_string(const T &value)
Convert value to string. 
 
static const std::string PY_t
 
friend void to_json(json &js, const JPMTCalibration_t &object)
Convert PMT time calibration to JSon. 
 
Auxiliary data structure for module rotation. 
 
JModuleRotation_t()
Default constructor. 
 
Product breakdown structure (PBS). 
 
Auxiliary data structure for module position. 
 
Data structure for position in three dimensions. 
 
friend void from_json(const json &js, JPMTCalibration_t &object)
Convert JSon to PMT time calibration. 
 
Exception for accessing a value in a collection that is outside of its range. 
 
std::vector< JModulePosition_t > JModulePosition
Module position. 
 
static const std::string PMTSupplyVoltage_t
 
friend void to_json(json &js, const JModulePosition_t &object)
Convert module position to JSon. 
 
friend void from_json(const json &js, JModuleMap_t &object)
Convert JSon to module address map. 
 
friend void to_json(json &js, const JPMTStatus_t &object)
Convert PMT status to JSon. 
 
friend void to_json(json &js, const JPMTThresholdCalibration_t &object)
Convert PMT threshold calibration to JSon. 
 
Auxiliary data structure for PMT time calibration. 
 
friend void to_json(json &js, const JModuleStatus_t &object)
Convert module status to JSon. 
 
static int getVersion()
Get HV-tuning database test type. 
 
Auxiliary data structure for module status. 
 
static const std::string QY_t
 
friend void from_json(const json &js, JHVCalibration_t &object)
Convert JSon to PMT high-voltage calibration. 
 
std::vector< JPMTCalibration_t > JPMTCalibration
PMT time calibration. 
 
std::map< std::string, int > map_type
 
std::vector< JModuleCalibration_t > JModuleCalibration
Module time calibration. 
 
std::vector< std::string > get_string_array(T value)
Cast single value to array of strings, conform the DB-format. 
 
static const std::string Fail_t