Auxiliary class to map module identifier to AHRS calibration.
More...
#include <JAHRSCalibration_t.hh>
Auxiliary class to map module identifier to AHRS calibration.
Definition at line 36 of file JAHRSCalibration_t.hh.
◆ JAHRSCalibration_t() [1/4]
JDATABASE::JAHRSCalibration_t::JAHRSCalibration_t |
( |
| ) |
|
|
inline |
◆ JAHRSCalibration_t() [2/4]
JDATABASE::JAHRSCalibration_t::JAHRSCalibration_t |
( |
const int |
id, |
|
|
const int |
option |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
id | detector identifier |
option | option |
Definition at line 53 of file JAHRSCalibration_t.hh.
60 ResultSet& rs =
getResultSet(getTable<JDetectorIntegration_t>());
ResultSet & getResultSet(const std::string &query)
Get result set.
JDetectorsHelper & getDetector()
Auxiliary function for helper object initialisation.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
void configure(const JDetectorIntegration_t &detector, const int option)
Configure.
◆ JAHRSCalibration_t() [3/4]
JDATABASE::JAHRSCalibration_t::JAHRSCalibration_t |
( |
const JDetectorIntegration_t & |
detector, |
|
|
const int |
option |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
detector | detector integration |
option | option |
Definition at line 76 of file JAHRSCalibration_t.hh.
◆ JAHRSCalibration_t() [4/4]
JDATABASE::JAHRSCalibration_t::JAHRSCalibration_t |
( |
const char * |
file_name | ) |
|
|
inline |
Constructor.
- Parameters
-
Definition at line 87 of file JAHRSCalibration_t.hh.
void load(const char *file_name)
Load from input file.
◆ configure()
Configure.
The latest valid AHRS calibration data to the identifier of the parent module.
In this, the time order and validity of the AHRS calibration data are defined by AHRSComparator and JAHRSValidity, respectively.
The option corresponds to the maximal difference between latest version and latest valid version.
- Parameters
-
detector | detector integration |
option | option |
Definition at line 103 of file JAHRSCalibration_t.hh.
117 ResultSet& rs =
getResultSet(getTable<JAHRSCalibration>());
131 for (++q; q !=
calibration.end() && q->SERIALNUMBER == p->SERIALNUMBER; ++q) {}
137 if (
distance(r1.first, r1.second) == 1) {
145 this->insert(make_pair(
id, *i));
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
static const JPBS_t AHRS(3, 4, 3, 4)
PBS of compass
JCLBIDHelper & getCLBID()
Auxiliary function for helper object initialisation.
JUPIHelper & getUPI()
Auxiliary function for helper object initialisation.
bool is_valid(const json &js)
Check validity of JSon data.
Auxiliary data structure for sorting of AHRS calibrations.
Auxiliary data structure to check validity of AHRS calibration data.
Universal product identifier (UPI).
◆ has()
bool JDATABASE::JAHRSCalibration_t::has |
( |
int |
id | ) |
const |
|
inline |
Check availability of AHRS calibration for given module identifier.
- Parameters
-
- Returns
- true if AHRS calibration available; else false
Definition at line 163 of file JAHRSCalibration_t.hh.
165 return (this->find(
id) != this->end());
◆ get()
Get AHRS calibration for given module identifier.
- Parameters
-
- Returns
- AHRS calibration
Definition at line 175 of file JAHRSCalibration_t.hh.
177 const_iterator i = this->find(
id);
179 if (i != this->end())
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Exception for accessing a value in a collection that is outside of its range.
◆ load()
Load from input file.
- Parameters
-
Definition at line 30 of file JObjectStreamIO.hh.
32 JLANG::load<std::ifstream>(file_name,
static_cast<T&
>(*
this));
◆ store()
Store to output file.
- Parameters
-
Definition at line 41 of file JObjectStreamIO.hh.
43 JLANG::store<std::ofstream>(file_name,
static_cast<const T&
>(*
this));
◆ operator>>
Read AHRS calibration from input stream.
- Parameters
-
in | input stream |
calibration | AHRS calibration |
- Returns
- input stream
Definition at line 193 of file JAHRSCalibration_t.hh.
198 while (in >>
id >> buffer) {
◆ operator<<
Write AHRS calibration to output stream.
- Parameters
-
out | output stream |
calibration | AHRS calibration |
- Returns
- output stream
Definition at line 213 of file JAHRSCalibration_t.hh.
218 out << i->first <<
' ' << i->second << endl;
The documentation for this struct was generated from the following file: