Jpp 19.3.0-rc.3
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/JException.hh"
15
16#include "Jeep/JPrint.hh"
17#include "Jeep/JStatus.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;
44 using JLANG::JNoValue;
45
48
49 using JEEP::JStatus;
50
53
54
55 /**
56 * Cast single value to array of strings, conform the DB-format.
57 *
58 * \param value value
59 * \return std::vector containing value casted to string
60 */
61 template <class T>
63 {
64 using namespace std;
65
66 return vector<string>{ to_string(value) };
67 }
68
69
70 /**
71 * Retrieve value from json array of strings.
72 *
73 * \param string_value_array array of string-casted values
74 * \return double-casted value
75 */
76 inline double retrieve_value(std::vector<std::string> string_value_array)
77 {
78 return std::stod(string_value_array[0]);
79 }
80
81
82 /**
83 * Auxiliary data structure for module address map.
84 */
85 struct JModuleMap_t :
86 public JObjectID,
87 public std::map<std::string, int>
88 {
90
91 /**
92 * Default constructor.
93 */
95 {}
96
97
98 /**
99 * Constructor.
100 *
101 * \param id module identifier
102 */
104 JObjectID(id)
105 {}
106
107
108 /**
109 * Convert module address map to JSon.
110 *
111 * \param js json
112 * \param object module address map
113 */
114 friend inline void to_json(json& js, const JModuleMap_t& object)
115 {
116 js = json{ { Id_t, object.getID() },
117 { DOMMap_t, static_cast<const JModuleMap_t::map_type&>(object) } };
118 }
119
120
121 /**
122 * Convert JSon to module address map.
123 *
124 * \param js json
125 * \param object module address map
126 */
127 friend inline void from_json(const json& js, JModuleMap_t& object)
128 {
129 object.setID(js.at(Id_t).get<int>());
130
131 static_cast<JModuleMap_t::map_type&>(object) = js.at(DOMMap_t).get<JModuleMap_t::map_type>();
132 }
133 };
134
135
136 /**
137 * Auxiliary data structure for PMT time calibration.
138 */
140 public JObjectID,
141 public JCalibration
142 {
143 /**
144 * Default constructor.
145 */
148
149
150 /**
151 * Constructor.
152 *
153 * \param id PMT identifier
154 * \param calibration PMT time calibration
155 */
157 const JCalibration& calibration) :
158 JObjectID (id),
159 JCalibration(calibration)
160 {}
161
162
163 /**
164 * Convert PMT time calibration to JSon.
165 *
166 * \param js json
167 * \param object PMT time calibration
168 */
169 friend inline void to_json(json& js, const JPMTCalibration_t& object)
170 {
171 js = json{ { Serial_t, object.getID() },
172 { T0_t, object.getT0() } };
173 }
174
175
176 /**
177 * Convert JSon to PMT time calibration.
178 *
179 * \param js json
180 * \param object PMT time calibration
181 */
182 friend inline void from_json(const json& js, JPMTCalibration_t& object)
183 {
184 object.setID(js.at(Serial_t).get<int>());
185
186 object.setT0(js.at(T0_t).get<double>());
187 }
188 };
189
190
191 /**
192 * Auxiliary data structure for PMT status.
193 */
195 public JObjectID,
196 public JStatus
197 {
198 /**
199 * Default constructor.
200 */
202 {}
203
204
205 /**
206 * Constructor.
207 *
208 * \param id PMT identifier
209 * \param status PMT status
210 */
212 const JStatus& status) :
213 JObjectID(id),
215 {}
216
217
218 /**
219 * Convert PMT status to JSon.
220 *
221 * \param js json
222 * \param object PMT status
223 */
224 friend inline void to_json(json& js, const JPMTStatus_t& object)
225 {
226 js = json{ { Serial_t, object.getID() },
227 { STATUS_t, object.getStatus() } };
228 }
229
230
231 /**
232 * Convert JSon to PMT status.
233 *
234 * \param js json
235 * \param object PMT status
236 */
237 friend inline void from_json(const json& js, JPMTStatus_t& object)
238 {
239 object.setID(js.at(Serial_t).get<int>());
240
241 object.setStatus(js.at(STATUS_t).get<int>());
242 }
243 };
244
245
246 /**
247 * Data structure for PMT high-voltage calibration.
248 */
250 public JUPI_t
251 {
252 /**
253 * Default constructor.
254 */
256 JUPI_t (),
257 result (Fail_t),
258 supplyVoltage(0.0),
259 runNumbers (std::vector<int>(0)),
260 PMTgain (0.0)
261 {}
262
263
264 /**
265 * Constructor.
266 *
267 * \param upi %UPI
268 * \param result result
269 * \param hv HV
270 * \param runNumberList run numbers
271 * \param gain gain
272 */
274 const std::string& result,
275 const double hv,
276 const std::vector<int> runNumberList = std::vector<int>(0),
277 const double gain = 1.0) :
278 JUPI_t (upi),
279 result (result),
280 supplyVoltage(hv),
281 runNumbers (runNumberList),
282 PMTgain (gain)
283 {}
284
285
286 /**
287 * Get HV-tuning database test type.
288 *
289 * \return HV-tuning database test type
290 */
291 static int getVersion()
292 {
293 return get_version();
294 }
295
296
297 /**
298 * Set HV-tuning database test type.
299 *
300 * \param version HV-tuning database test type
301 */
302 static void setVersion(const int version)
303 {
305 }
306
307
308 /**
309 * Convert PMT high-voltage calibration to JSon.
310 *
311 * \param js json2
312 * \param object PMT high-voltage calibration
313 */
314 friend inline void to_json(json& js, const JHVCalibration_t& object)
315 {
316 using namespace std;
317
318 ostringstream os;
319
320 os << object.getUPI();
321
322 js[UPI_t] = os.str();
323 js[Test_t + Result_t] = object.result;
324 js[Test_t + Parameters_t][0] = json{ { Name_t, PMTSupplyVoltage_t },
325 { Unit_t, Volt_t },
327
329
330 js[Test_t + Parameters_t][2] = json{ { Name_t, PMTGain_t },
331 { Unit_t, Unitless_t },
332 { Values_t, get_string_array(object.PMTgain) } };
333 }
334
335
337
338 vector<string> runNumberList;
339
340 for (vector<int>::const_iterator i = object.runNumbers.cbegin(); i != object.runNumbers.cend(); ++i) {
341 runNumberList.push_back(to_string(*i));
342 }
343
344 js[Test_t + Parameters_t][1] = json{ { Name_t, RunNumber_t },
345 { Unit_t, Unitless_t },
346 { Values_t, runNumberList } };
347 }
348 }
349
350
351 /**
352 * Convert JSon to PMT high-voltage calibration.
353 *
354 * \param js json
355 * \param object PMT high-voltage calibration
356 */
357 friend inline void from_json(const json& js, JHVCalibration_t& object)
358 {
359 using namespace std;
360
361 stringstream is(js.at(UPI_t).get<string>());
362
363 is >> static_cast<JUPI_t&>(object);
364
365 json parameters = js.at(Test_t + Parameters_t);
366
367 if (JHVCalibration_t::getVersion() > 0 && parameters.size() > 0) {
368
369 object.result = js.at(Test_t + Result_t).get<string>();
370 object.supplyVoltage = retrieve_value(parameters[0].at(Values_t).get<vector<string>>());
371
372 if (JHVCalibration_t::getVersion() < 3 && parameters.size() > 1) {
373
374 vector<string> runNumberList = parameters[1].at(Values_t).get<vector<string>>();
375
376 for (vector<string>::const_iterator i = runNumberList.begin(); i != runNumberList.end(); ++i) {
377 object.runNumbers.push_back(stoi(*i));
378 }
379 }
380
381 if (JHVCalibration_t::getVersion() < 2 && parameters.size() > 2) {
382 object.PMTgain = retrieve_value(parameters[2].at(Values_t).get<vector<string>>());
383 }
384
385 } else {
386
387 THROW(JValueOutOfRange, "JHVCalibration_t::from_json(): No " << MAKE_STRING(Test_t + Parameters_t) << " found." << endl);
388 }
389 }
390
391
392 std::string result;
395 double PMTgain;
396
397
398 private:
399 /**
400 * Get reference to HV-tuning database test type.
401 *
402 * \return HV-tuning database test type
403 */
404 static int& get_version()
405 {
406 static int version = 3;
407
408 return version;
409 }
410 };
411
412
413 /**
414 * Data structure for PMT threshold calibration.
415 */
417 public JUPI_t
418 {
419 /**
420 * Default constructor.
421 */
424
425
426 /**
427 * Constructor.
428 *
429 * \param upi %UPI
430 * \param result result
431 * \param threshold threshold
432 * \param runNumbers run numbers
433 */
435 const std::string& result,
436 const double threshold,
437 const std::vector<int>& runNumbers = std::vector<int>(0)) :
438 JUPI_t (upi),
439 result (result),
441 runNumberList(runNumbers)
442 {}
443
444
445 /**
446 * Convert PMT threshold calibration to JSon.
447 *
448 * \param js json
449 * \param object PMT threshold calibration
450 */
451 friend inline void to_json(json& js, const JPMTThresholdCalibration_t& object)
452 {
453 std::ostringstream os;
454
455 os << object.getUPI();
456
457 js[UPI_t] = os.str();
458 js[Test_t + Result_t] = object.result;
459 js[Test_t + Parameters_t][0] = json{ { Name_t, PMTThreshold_t },
460 { Unit_t, Unitless_t },
461 { Values_t, get_string_array(object.threshold) } };
462 js[Test_t + Parameters_t][2] = json{ { Name_t, RunNumber_t },
463 { Unit_t, Unitless_t },
464 { Values_t, object.runNumberList } };
465 }
466
467
468 /**
469 * Convert JSon to PMT threshold calibration.
470 *
471 * \param js json
472 * \param object PMT threshold calibration
473 */
474 friend inline void from_json(const json& js, JPMTThresholdCalibration_t& object)
475 {
476 using namespace std;
477
478 stringstream is(js.at(UPI_t).get<string>());
479
480 is >> static_cast<JUPI_t&>(object);
481
482 object.result = js.at(Test_t + Result_t).get<string>();
483 object.threshold = retrieve_value(js.at(Test_t + Parameters_t)[0].at(Values_t).get<vector<string>>());
484 object.runNumberList = js.at(Test_t + Parameters_t)[2].at(Values_t).get<vector<int>>();
485 }
486
487 std::string result;
488 double threshold;
490 };
491
492
493 /**
494 * Auxiliary data structure for module position.
495 */
497 public JObjectID,
498 public JPosition3D
499 {
500 /**
501 * Default constructor.
502 */
505
506
507 /**
508 * Constructor.
509 *
510 * \param id module identifier
511 * \param position module position
512 */
514 const JPosition3D& position) :
515 JObjectID (id),
516 JPosition3D(position)
517 {}
518
519
520 /**
521 * Convert module position to JSon.
522 *
523 * \param js json
524 * \param object module position
525 */
526 friend inline void to_json(json& js, const JModulePosition_t& object)
527 {
528 js = json{ { Id_t, object.getID() },
529 { PX_t, object.getX() },
530 { PY_t, object.getY() },
531 { PZ_t, object.getZ() } };
532 }
533
534
535 /**
536 * Convert JSon to module position.
537 *
538 * \param js json
539 * \param object module position
540 */
541 friend inline void from_json(const json& js, JModulePosition_t& object)
542 {
543 if (js.contains(DOMId_t))
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>());
547 else
548 THROW(JNoValue, "Missing module identifier.");
549
550 object.setPosition(JPosition3D(js.at(PX_t).get<double>(),
551 js.at(PY_t).get<double>(),
552 js.at(PZ_t).get<double>()));
553 }
554 };
555
556
557 /**
558 * Auxiliary data structure for module rotation.
559 */
561 public JObjectID,
562 public JQuaternion3D
563 {
564 /**
565 * Default constructor.
566 */
569
570
571 /**
572 * Constructor.
573 *
574 * \param id module identifier
575 * \param rotation module rotation
576 */
578 const JQuaternion3D& rotation) :
579 JObjectID (id),
580 JQuaternion3D(rotation)
581 {}
582
583
584 /**
585 * Convert module rotation to JSon.
586 *
587 * \param js json
588 * \param object module rotation
589 */
590 friend inline void to_json(json& js, const JModuleRotation_t& object)
591 {
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() } };
597 }
598
599
600 /**
601 * Convert JSon to module rotation.
602 *
603 * \param js json
604 * \param object module rotation
605 */
606 friend inline void from_json(const json& js, JModuleRotation_t& object)
607 {
608 if (js.contains(DOMId_t))
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>());
612 else
613 THROW(JNoValue, "Missing module identifier.");
614
615 object.setQuaternion(JQuaternion3D(js.at(Q0_t).get<double>(),
616 js.at(QX_t).get<double>(),
617 js.at(QY_t).get<double>(),
618 js.at(QZ_t).get<double>()));
619 }
620 };
621
622
623 /**
624 * Auxiliary data structure for module status.
625 */
627 public JObjectID,
628 public JStatus
629 {
630 /**
631 * Default constructor.
632 */
635
636
637 /**
638 * Constructor.
639 *
640 * \param id module identifier
641 * \param status module status
642 */
644 const JStatus& status) :
645 JObjectID(id),
647 {}
648
649
650 /**
651 * Convert module status to JSon.
652 *
653 * \param js json
654 * \param object module status
655 */
656 friend inline void to_json(json& js, const JModuleStatus_t& object)
657 {
658 js = json{ { Id_t, object.getID() },
659 { STATUS_t, object.getStatus() } };
660 }
661
662
663 /**
664 * Convert JSon to module status.
665 *
666 * \param js json
667 * \param object module status
668 */
669 friend inline void from_json(const json& js, JModuleStatus_t& object)
670 {
671 if (js.contains(DOMId_t))
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>());
675 else
676 THROW(JNoValue, "Missing module identifier.");
677
678 object.setStatus(js.at(STATUS_t).get<int>());
679 }
680 };
681
682
683 /**
684 * Auxiliary data structure for module time calibration.
685 */
687 public JObjectID,
688 public JCalibration
689 {
690 /**
691 * Default constructor.
692 */
695
696
697 /**
698 * Constructor.
699 *
700 * \param id module identifier
701 * \param calibration module time calibration
702 */
704 const JCalibration& calibration) :
705 JObjectID (id),
706 JCalibration(calibration)
707 {}
708
709
710 /**
711 * Convert module time calibration to JSon.
712 *
713 * \param js json
714 * \param object module time calibration
715 */
716 friend inline void to_json(json& js, const JModuleCalibration_t& object)
717 {
718 js = json{ { Id_t, object.getID() },
719 { T0_t, object.getT0() } };
720 }
721
722
723 /**
724 * Convert JSon to module time calibration.
725 *
726 * \param js json
727 * \param object module time calibration
728 */
729 friend inline void from_json(const json& js, JModuleCalibration_t& object)
730 {
731 if (js.contains(DOMId_t))
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>());
735 else
736 THROW(JNoValue, "Missing module identifier.");
737
738 object.setT0(js.at(T0_t).get<double>());
739 }
740 };
741
742
743 /**
744 * Auxiliary data structure for compass rotation.
745 */
747 public JObjectID,
748 public JQuaternion3D
749 {
750 /**
751 * Default constructor.
752 */
755
756
757 /**
758 * Constructor.
759 *
760 * \param id module identifier
761 * \param rotation compass rotation
762 */
764 const JQuaternion3D& rotation) :
765 JObjectID (id),
766 JQuaternion3D(rotation)
767 {}
768
769
770 /**
771 * Convert compass rotation to JSon.
772 *
773 * \param js json
774 * \param object compass rotation
775 */
776 friend inline void to_json(json& js, const JCompassRotation_t& object)
777 {
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() } };
783 }
784
785
786 /**
787 * Convert JSon to compass rotation.
788 *
789 * \param js json
790 * \param object compass rotation
791 */
792 friend inline void from_json(const json& js, JCompassRotation_t& object)
793 {
794 if (js.contains(DOMId_t))
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>());
798 else
799 THROW(JNoValue, "Missing module identifier.");
800
801 object.setQuaternion(JQuaternion3D(js.at(Q0_t).get<double>(),
802 js.at(QX_t).get<double>(),
803 js.at(QY_t).get<double>(),
804 js.at(QZ_t).get<double>()));
805 }
806 };
807
808
809 typedef std::vector<JHVCalibration_t> JHVCalibration; //!< PMT high voltage calibration
811 typedef std::vector<JModuleMap_t> JModuleMap; //!< module map
812 typedef std::vector<JPMTCalibration_t> JPMTCalibration; //!< PMT time calibration
813 typedef std::vector<JPMTStatus_t> JPMTStatus; //!< PMT status
816 typedef std::vector<JModuleStatus_t> JModuleStatus; //!< Module status
817 typedef std::vector<JModuleCalibration_t> JModuleCalibration; //!< Module time calibration
819}
820
821#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:32
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:39