Jpp 20.0.0-rc.8
the software that should make you happy
Loading...
Searching...
No Matches
JDetectorCalibration.hh
Go to the documentation of this file.
1#ifndef __JDETECTOR__JDETECTORCALIBRATION__
2#define __JDETECTOR__JDETECTORCALIBRATION__
3
4#include <string>
5#include <vector>
6
7#include "JSon/JSon.hh"
8#include "JSon/JSupport.hh"
9
10#include "JDB/JPBS_t.hh"
11#include "JDB/JUPI_t.hh"
12
13#include "JLang/JObjectID.hh"
14#include "JLang/JStatus.hh"
15#include "JLang/JException.hh"
16
17#include "Jeep/JPrint.hh"
18
20
23
24
25/**
26 * file
27 * Auxiliary data structures and methods for detector calibration.
28 *
29 * \author mdejong, bjung, acreusot
30 */
31
32namespace JDETECTOR {}
33namespace JPP { using namespace JDETECTOR; }
34
35/**
36 * Auxiliary classes and methods for detector calibration.
37 */
38namespace JDETECTOR {
39
40 using namespace JSON;
41
42 using JLANG::JObjectID;
43 using JLANG::JStatus;
45 using JLANG::JNoValue;
46
49
52
53
54 /**
55 * Cast single value to array of strings, conform the DB-format.
56 *
57 * \param value value
58 * \return std::vector containing value casted to string
59 */
60 template <class T>
62 {
63 using namespace std;
64
65 return vector<string>{ to_string(value) };
66 }
67
68
69 /**
70 * Retrieve value from json array of strings.
71 *
72 * \param string_value_array array of string-casted values
73 * \return double-casted value
74 */
75 inline double retrieve_value(std::vector<std::string> string_value_array)
76 {
77 return std::stod(string_value_array[0]);
78 }
79
80
81 /**
82 * Auxiliary data structure for module address map.
83 */
84 struct JModuleMap_t :
85 public JObjectID,
86 public std::map<std::string, int>
87 {
89
90 /**
91 * Default constructor.
92 */
94 {}
95
96
97 /**
98 * Constructor.
99 *
100 * \param id module identifier
101 */
103 JObjectID(id)
104 {}
105
106
107 /**
108 * Convert module address map to JSon.
109 *
110 * \param js json
111 * \param object module address map
112 */
113 friend inline void to_json(json& js, const JModuleMap_t& object)
114 {
115 js = json{ { Id_t, object.getID() },
116 { DOMMap_t, static_cast<const JModuleMap_t::map_type&>(object) } };
117 }
118
119
120 /**
121 * Convert JSon to module address map.
122 *
123 * \param js json
124 * \param object module address map
125 */
126 friend inline void from_json(const json& js, JModuleMap_t& object)
127 {
128 object.setID(js.at(Id_t).get<int>());
129
130 static_cast<JModuleMap_t::map_type&>(object) = js.at(DOMMap_t).get<JModuleMap_t::map_type>();
131 }
132 };
133
134
135 /**
136 * Auxiliary data structure for PMT time calibration.
137 */
139 public JObjectID,
140 public JCalibration
141 {
142 /**
143 * Default constructor.
144 */
147
148
149 /**
150 * Constructor.
151 *
152 * \param id PMT identifier
153 * \param calibration PMT time calibration
154 */
156 const JCalibration& calibration) :
157 JObjectID (id),
158 JCalibration(calibration)
159 {}
160
161
162 /**
163 * Convert PMT time calibration to JSon.
164 *
165 * \param js json
166 * \param object PMT time calibration
167 */
168 friend inline void to_json(json& js, const JPMTCalibration_t& object)
169 {
170 js = json{ { Serial_t, object.getID() },
171 { T0_t, object.getT0() } };
172 }
173
174
175 /**
176 * Convert JSon to PMT time calibration.
177 *
178 * \param js json
179 * \param object PMT time calibration
180 */
181 friend inline void from_json(const json& js, JPMTCalibration_t& object)
182 {
183 object.setID(js.at(Serial_t).get<int>());
184
185 object.setT0(js.at(T0_t).get<double>());
186 }
187 };
188
189
190 /**
191 * Auxiliary data structure for PMT status.
192 */
194 public JObjectID,
195 public JStatus
196 {
197 /**
198 * Default constructor.
199 */
201 {}
202
203
204 /**
205 * Constructor.
206 *
207 * \param id PMT identifier
208 * \param status PMT status
209 */
211 const JStatus& status) :
212 JObjectID(id),
214 {}
215
216
217 /**
218 * Convert PMT status to JSon.
219 *
220 * \param js json
221 * \param object PMT status
222 */
223 friend inline void to_json(json& js, const JPMTStatus_t& object)
224 {
225 js = json{ { Serial_t, object.getID() },
226 { STATUS_t, object.getStatus<JStatus::status_type>() } };
227 }
228
229
230 /**
231 * Convert JSon to PMT status.
232 *
233 * \param js json
234 * \param object PMT status
235 */
236 friend inline void from_json(const json& js, JPMTStatus_t& object)
237 {
238 object.setID(js.at(Serial_t).get<int>());
239
240 object.setStatus(js.at(STATUS_t).get<int>());
241 }
242 };
243
244
245 /**
246 * Data structure for PMT high-voltage calibration.
247 */
249 public JUPI_t
250 {
251 /**
252 * Default constructor.
253 */
255 JUPI_t (),
256 result (Fail_t),
257 supplyVoltage(0.0),
258 runNumbers (std::vector<int>(0)),
259 PMTgain (0.0)
260 {}
261
262
263 /**
264 * Constructor.
265 *
266 * \param upi %UPI
267 * \param result result
268 * \param hv HV
269 * \param runNumberList run numbers
270 * \param gain gain
271 */
273 const std::string& result,
274 const double hv,
275 const std::vector<int> runNumberList = std::vector<int>(0),
276 const double gain = 1.0) :
277 JUPI_t (upi),
278 result (result),
279 supplyVoltage(hv),
280 runNumbers (runNumberList),
281 PMTgain (gain)
282 {}
283
284
285 /**
286 * Get HV-tuning database test type.
287 *
288 * \return HV-tuning database test type
289 */
290 static int getVersion()
291 {
292 return get_version();
293 }
294
295
296 /**
297 * Set HV-tuning database test type.
298 *
299 * \param version HV-tuning database test type
300 */
301 static void setVersion(const int version)
302 {
304 }
305
306
307 /**
308 * Convert PMT high-voltage calibration to JSon.
309 *
310 * \param js json2
311 * \param object PMT high-voltage calibration
312 */
313 friend inline void to_json(json& js, const JHVCalibration_t& object)
314 {
315 using namespace std;
316
317 ostringstream os;
318
319 os << object.getUPI();
320
321 js[UPI_t] = os.str();
322 js[Test_t + Result_t] = object.result;
323 js[Test_t + Parameters_t][0] = json{ { Name_t, PMTSupplyVoltage_t },
324 { Unit_t, Volt_t },
326
328
329 js[Test_t + Parameters_t][2] = json{ { Name_t, PMTGain_t },
330 { Unit_t, Unitless_t },
331 { Values_t, get_string_array(object.PMTgain) } };
332 }
333
334
336
337 vector<string> runNumberList;
338
339 for (vector<int>::const_iterator i = object.runNumbers.cbegin(); i != object.runNumbers.cend(); ++i) {
340 runNumberList.push_back(to_string(*i));
341 }
342
343 js[Test_t + Parameters_t][1] = json{ { Name_t, RunNumber_t },
344 { Unit_t, Unitless_t },
345 { Values_t, runNumberList } };
346 }
347 }
348
349
350 /**
351 * Convert JSon to PMT high-voltage calibration.
352 *
353 * \param js json
354 * \param object PMT high-voltage calibration
355 */
356 friend inline void from_json(const json& js, JHVCalibration_t& object)
357 {
358 using namespace std;
359
360 stringstream is(js.at(UPI_t).get<string>());
361
362 is >> static_cast<JUPI_t&>(object);
363
364 json parameters = js.at(Test_t + Parameters_t);
365
366 if (JHVCalibration_t::getVersion() > 0 && parameters.size() > 0) {
367
368 object.result = js.at(Test_t + Result_t).get<string>();
369 object.supplyVoltage = retrieve_value(parameters[0].at(Values_t).get<vector<string>>());
370
371 if (JHVCalibration_t::getVersion() < 3 && parameters.size() > 1) {
372
373 vector<string> runNumberList = parameters[1].at(Values_t).get<vector<string>>();
374
375 for (vector<string>::const_iterator i = runNumberList.begin(); i != runNumberList.end(); ++i) {
376 object.runNumbers.push_back(stoi(*i));
377 }
378 }
379
380 if (JHVCalibration_t::getVersion() < 2 && parameters.size() > 2) {
381 object.PMTgain = retrieve_value(parameters[2].at(Values_t).get<vector<string>>());
382 }
383
384 } else {
385
386 THROW(JValueOutOfRange, "JHVCalibration_t::from_json(): No " << MAKE_STRING(Test_t + Parameters_t) << " found." << endl);
387 }
388 }
389
390
391 std::string result;
394 double PMTgain;
395
396
397 private:
398 /**
399 * Get reference to HV-tuning database test type.
400 *
401 * \return HV-tuning database test type
402 */
403 static int& get_version()
404 {
405 static int version = 3;
406
407 return version;
408 }
409 };
410
411
412 /**
413 * Data structure for PMT threshold calibration.
414 */
416 public JUPI_t
417 {
418 /**
419 * Default constructor.
420 */
423
424
425 /**
426 * Constructor.
427 *
428 * \param upi %UPI
429 * \param result result
430 * \param threshold threshold
431 * \param runNumbers run numbers
432 */
434 const std::string& result,
435 const double threshold,
436 const std::vector<int>& runNumbers = std::vector<int>(0)) :
437 JUPI_t (upi),
438 result (result),
440 runNumberList(runNumbers)
441 {}
442
443
444 /**
445 * Convert PMT threshold calibration to JSon.
446 *
447 * \param js json
448 * \param object PMT threshold calibration
449 */
450 friend inline void to_json(json& js, const JPMTThresholdCalibration_t& object)
451 {
452 std::ostringstream os;
453
454 os << object.getUPI();
455
456 js[UPI_t] = os.str();
457 js[Test_t + Result_t] = object.result;
458 js[Test_t + Parameters_t][0] = json{ { Name_t, PMTThreshold_t },
459 { Unit_t, Unitless_t },
460 { Values_t, get_string_array(object.threshold) } };
461 js[Test_t + Parameters_t][2] = json{ { Name_t, RunNumber_t },
462 { Unit_t, Unitless_t },
463 { Values_t, object.runNumberList } };
464 }
465
466
467 /**
468 * Convert JSon to PMT threshold calibration.
469 *
470 * \param js json
471 * \param object PMT threshold calibration
472 */
473 friend inline void from_json(const json& js, JPMTThresholdCalibration_t& object)
474 {
475 using namespace std;
476
477 stringstream is(js.at(UPI_t).get<string>());
478
479 is >> static_cast<JUPI_t&>(object);
480
481 object.result = js.at(Test_t + Result_t).get<string>();
482 object.threshold = retrieve_value(js.at(Test_t + Parameters_t)[0].at(Values_t).get<vector<string>>());
483 object.runNumberList = js.at(Test_t + Parameters_t)[2].at(Values_t).get<vector<int>>();
484 }
485
486 std::string result;
487 double threshold;
489 };
490
491
492 /**
493 * Auxiliary data structure for module position.
494 */
496 public JObjectID,
497 public JPosition3D
498 {
499 /**
500 * Default constructor.
501 */
504
505
506 /**
507 * Constructor.
508 *
509 * \param id module identifier
510 * \param position module position
511 */
513 const JPosition3D& position) :
514 JObjectID (id),
515 JPosition3D(position)
516 {}
517
518
519 /**
520 * Convert module position to JSon.
521 *
522 * \param js json
523 * \param object module position
524 */
525 friend inline void to_json(json& js, const JModulePosition_t& object)
526 {
527 js = json{ { Id_t, object.getID() },
528 { PX_t, object.getX() },
529 { PY_t, object.getY() },
530 { PZ_t, object.getZ() } };
531 }
532
533
534 /**
535 * Convert JSon to module position.
536 *
537 * \param js json
538 * \param object module position
539 */
540 friend inline void from_json(const json& js, JModulePosition_t& object)
541 {
542 if (js.contains(DOMId_t))
543 object.setID(js.at(DOMId_t).get<int>());
544 else if (js.contains(Id_t))
545 object.setID(js.at(Id_t) .get<int>());
546 else
547 THROW(JNoValue, "Missing module identifier.");
548
549 object.setPosition(JPosition3D(js.at(PX_t).get<double>(),
550 js.at(PY_t).get<double>(),
551 js.at(PZ_t).get<double>()));
552 }
553 };
554
555
556 /**
557 * Auxiliary data structure for module rotation.
558 */
560 public JObjectID,
561 public JQuaternion3D
562 {
563 /**
564 * Default constructor.
565 */
568
569
570 /**
571 * Constructor.
572 *
573 * \param id module identifier
574 * \param rotation module rotation
575 */
577 const JQuaternion3D& rotation) :
578 JObjectID (id),
579 JQuaternion3D(rotation)
580 {}
581
582
583 /**
584 * Convert module rotation to JSon.
585 *
586 * \param js json
587 * \param object module rotation
588 */
589 friend inline void to_json(json& js, const JModuleRotation_t& object)
590 {
591 js = json{ { Id_t, object.getID() },
592 { Q0_t, object.getA() },
593 { QX_t, object.getB() },
594 { QY_t, object.getC() },
595 { QZ_t, object.getD() } };
596 }
597
598
599 /**
600 * Convert JSon to module rotation.
601 *
602 * \param js json
603 * \param object module rotation
604 */
605 friend inline void from_json(const json& js, JModuleRotation_t& object)
606 {
607 if (js.contains(DOMId_t))
608 object.setID(js.at(DOMId_t).get<int>());
609 else if (js.contains(Id_t))
610 object.setID(js.at(Id_t) .get<int>());
611 else
612 THROW(JNoValue, "Missing module identifier.");
613
614 object.setQuaternion(JQuaternion3D(js.at(Q0_t).get<double>(),
615 js.at(QX_t).get<double>(),
616 js.at(QY_t).get<double>(),
617 js.at(QZ_t).get<double>()));
618 }
619 };
620
621
622 /**
623 * Auxiliary data structure for module status.
624 */
626 public JObjectID,
627 public JStatus
628 {
629 /**
630 * Default constructor.
631 */
634
635
636 /**
637 * Constructor.
638 *
639 * \param id module identifier
640 * \param status module status
641 */
643 const JStatus& status) :
644 JObjectID(id),
646 {}
647
648
649 /**
650 * Convert module status to JSon.
651 *
652 * \param js json
653 * \param object module status
654 */
655 friend inline void to_json(json& js, const JModuleStatus_t& object)
656 {
657 js = json{ { Id_t, object.getID() },
658 { STATUS_t, object.getStatus<JStatus::status_type>() } };
659 }
660
661
662 /**
663 * Convert JSon to module status.
664 *
665 * \param js json
666 * \param object module status
667 */
668 friend inline void from_json(const json& js, JModuleStatus_t& object)
669 {
670 if (js.contains(DOMId_t))
671 object.setID(js.at(DOMId_t).get<int>());
672 else if (js.contains(Id_t))
673 object.setID(js.at(Id_t) .get<int>());
674 else
675 THROW(JNoValue, "Missing module identifier.");
676
677 object.setStatus(js.at(STATUS_t).get<int>());
678 }
679 };
680
681
682 /**
683 * Auxiliary data structure for module time calibration.
684 */
686 public JObjectID,
687 public JCalibration
688 {
689 /**
690 * Default constructor.
691 */
694
695
696 /**
697 * Constructor.
698 *
699 * \param id module identifier
700 * \param calibration module time calibration
701 */
703 const JCalibration& calibration) :
704 JObjectID (id),
705 JCalibration(calibration)
706 {}
707
708
709 /**
710 * Convert module time calibration to JSon.
711 *
712 * \param js json
713 * \param object module time calibration
714 */
715 friend inline void to_json(json& js, const JModuleCalibration_t& object)
716 {
717 js = json{ { Id_t, object.getID() },
718 { T0_t, object.getT0() } };
719 }
720
721
722 /**
723 * Convert JSon to module time calibration.
724 *
725 * \param js json
726 * \param object module time calibration
727 */
728 friend inline void from_json(const json& js, JModuleCalibration_t& object)
729 {
730 if (js.contains(DOMId_t))
731 object.setID(js.at(DOMId_t).get<int>());
732 else if (js.contains(Id_t))
733 object.setID(js.at(Id_t) .get<int>());
734 else
735 THROW(JNoValue, "Missing module identifier.");
736
737 object.setT0(js.at(T0_t).get<double>());
738 }
739 };
740
741
742 /**
743 * Auxiliary data structure for compass rotation.
744 */
746 public JObjectID,
747 public JQuaternion3D
748 {
749 /**
750 * Default constructor.
751 */
754
755
756 /**
757 * Constructor.
758 *
759 * \param id module identifier
760 * \param rotation compass rotation
761 */
763 const JQuaternion3D& rotation) :
764 JObjectID (id),
765 JQuaternion3D(rotation)
766 {}
767
768
769 /**
770 * Convert compass rotation to JSon.
771 *
772 * \param js json
773 * \param object compass rotation
774 */
775 friend inline void to_json(json& js, const JCompassRotation_t& object)
776 {
777 js = json{ { Id_t, object.getID() },
778 { Q0_t, object.getA() },
779 { QX_t, object.getB() },
780 { QY_t, object.getC() },
781 { QZ_t, object.getD() } };
782 }
783
784
785 /**
786 * Convert JSon to compass rotation.
787 *
788 * \param js json
789 * \param object compass rotation
790 */
791 friend inline void from_json(const json& js, JCompassRotation_t& object)
792 {
793 if (js.contains(DOMId_t))
794 object.setID(js.at(DOMId_t).get<int>());
795 else if (js.contains(Id_t))
796 object.setID(js.at(Id_t) .get<int>());
797 else
798 THROW(JNoValue, "Missing module identifier.");
799
800 object.setQuaternion(JQuaternion3D(js.at(Q0_t).get<double>(),
801 js.at(QX_t).get<double>(),
802 js.at(QY_t).get<double>(),
803 js.at(QZ_t).get<double>()));
804 }
805 };
806
807
808 typedef std::vector<JHVCalibration_t> JHVCalibration; //!< PMT high voltage calibration
810 typedef std::vector<JModuleMap_t> JModuleMap; //!< module map
811 typedef std::vector<JPMTCalibration_t> JPMTCalibration; //!< PMT time calibration
812 typedef std::vector<JPMTStatus_t> JPMTStatus; //!< PMT status
815 typedef std::vector<JModuleStatus_t> JModuleStatus; //!< Module status
816 typedef std::vector<JModuleCalibration_t> JModuleCalibration; //!< Module time calibration
818}
819
820#endif
Time calibration (including definition of sign of time offset).
Exceptions.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
I/O formatting auxiliaries.
#define MAKE_STRING(A)
Make string.
Definition JPrint.hh:63
JSon definitions and auxiliaries.
Data structure for time calibration.
Data structure for position in three dimensions.
JPosition3D()
Default constructor.
Data structure for unit quaternion in three dimensions.
JQuaternion3D()
Default constructor.
Exception for missing value.
Auxiliary class for object identification.
Definition JObjectID.hh:25
Exception for accessing a value in a collection that is outside of its range.
file Auxiliary data structures and methods for detector calibration.
Definition JAnchor.hh:12
std::vector< JCompassRotation_t > JCompassRotation
Compass rotation.
std::vector< JModuleMap_t > JModuleMap
module map
std::vector< JModuleStatus_t > JModuleStatus
Module status.
double retrieve_value(std::vector< std::string > string_value_array)
Retrieve value from json array of strings.
std::vector< JHVCalibration_t > JHVCalibration
PMT high voltage calibration.
std::vector< JPMTThresholdCalibration_t > JPMTThresholdCalibration
PMT threshold calibration.
std::vector< JPMTCalibration_t > JPMTCalibration
PMT time calibration.
std::vector< JModuleRotation_t > JModuleRotation
Module rotation.
std::vector< std::string > get_string_array(T value)
Cast single value to array of strings, conform the DB-format.
std::vector< JPMTStatus_t > JPMTStatus
PMT status.
std::vector< JModulePosition_t > JModulePosition
Module position.
std::vector< JModuleCalibration_t > JModuleCalibration
Module time calibration.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for detector calibration.
static const std::string Name_t
static const std::string RunNumber_t
static const std::string T0_t
static const std::string Id_t
static const std::string Parameters_t
static const std::string QX_t
static const std::string STATUS_t
static const std::string Unit_t
static const std::string PX_t
static const std::string Unitless_t
static const std::string Result_t
static const std::string QZ_t
static const std::string PMTThreshold_t
static const std::string DOMId_t
static const std::string PMTSupplyVoltage_t
static const std::string Values_t
static const std::string Test_t
static const std::string PZ_t
static const std::string Fail_t
static const std::string PY_t
static const std::string Q0_t
static const std::string DOMMap_t
static const std::string UPI_t
static const std::string Volt_t
static const std::string PMTGain_t
static const std::string Serial_t
static const std::string QY_t
Product breakdown structure (PBS).
Definition JPBS_t.hh:29
Universal product identifier (UPI).
Definition JUPI_t.hh:33
Auxiliary data structure for compass rotation.
JCompassRotation_t()
Default constructor.
friend void from_json(const json &js, JCompassRotation_t &object)
Convert JSon to compass rotation.
JCompassRotation_t(const JObjectID &id, const JQuaternion3D &rotation)
Constructor.
friend void to_json(json &js, const JCompassRotation_t &object)
Convert compass rotation to JSon.
Data structure for PMT high-voltage calibration.
JHVCalibration_t()
Default constructor.
static int & get_version()
Get reference to HV-tuning database test type.
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.
friend void from_json(const json &js, JHVCalibration_t &object)
Convert JSon to PMT high-voltage calibration.
friend void to_json(json &js, const JHVCalibration_t &object)
Convert PMT high-voltage calibration to JSon.
static void setVersion(const int version)
Set HV-tuning database test type.
static int getVersion()
Get HV-tuning database test type.
Auxiliary data structure for module time calibration.
friend void to_json(json &js, const JModuleCalibration_t &object)
Convert module time calibration to JSon.
friend void from_json(const json &js, JModuleCalibration_t &object)
Convert JSon to module time calibration.
JModuleCalibration_t(const JObjectID &id, const JCalibration &calibration)
Constructor.
Auxiliary data structure for module address map.
friend void from_json(const json &js, JModuleMap_t &object)
Convert JSon to module address map.
friend void to_json(json &js, const JModuleMap_t &object)
Convert module address map to JSon.
JModuleMap_t()
Default constructor.
std::map< std::string, int > map_type
JModuleMap_t(const JObjectID &id)
Constructor.
Auxiliary data structure for module position.
JModulePosition_t()
Default constructor.
JModulePosition_t(const JObjectID &id, const JPosition3D &position)
Constructor.
friend void to_json(json &js, const JModulePosition_t &object)
Convert module position to JSon.
friend void from_json(const json &js, JModulePosition_t &object)
Convert JSon to module position.
Auxiliary data structure for module rotation.
JModuleRotation_t(const JObjectID &id, const JQuaternion3D &rotation)
Constructor.
friend void to_json(json &js, const JModuleRotation_t &object)
Convert module rotation to JSon.
JModuleRotation_t()
Default constructor.
friend void from_json(const json &js, JModuleRotation_t &object)
Convert JSon to module rotation.
Auxiliary data structure for module status.
friend void from_json(const json &js, JModuleStatus_t &object)
Convert JSon to module status.
JModuleStatus_t()
Default constructor.
friend void to_json(json &js, const JModuleStatus_t &object)
Convert module status to JSon.
JModuleStatus_t(const JObjectID &id, const JStatus &status)
Constructor.
Auxiliary data structure for PMT time calibration.
JPMTCalibration_t()
Default constructor.
friend void from_json(const json &js, JPMTCalibration_t &object)
Convert JSon to PMT time calibration.
friend void to_json(json &js, const JPMTCalibration_t &object)
Convert PMT time calibration to JSon.
JPMTCalibration_t(const JObjectID &id, const JCalibration &calibration)
Constructor.
Auxiliary data structure for PMT status.
friend void from_json(const json &js, JPMTStatus_t &object)
Convert JSon to PMT status.
friend void to_json(json &js, const JPMTStatus_t &object)
Convert PMT status to JSon.
JPMTStatus_t()
Default constructor.
JPMTStatus_t(const JObjectID &id, const JStatus &status)
Constructor.
Data structure for PMT threshold calibration.
friend void from_json(const json &js, JPMTThresholdCalibration_t &object)
Convert JSon to PMT threshold calibration.
JPMTThresholdCalibration_t(const JUPI_t &upi, const std::string &result, const double threshold, const std::vector< int > &runNumbers=std::vector< int >(0))
Constructor.
friend void to_json(json &js, const JPMTThresholdCalibration_t &object)
Convert PMT threshold calibration to JSon.
Auxiliary class for handling status.
Definition JStatus.hh:31
status_type status
Definition JStatus.hh:252