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.
JDATABASE::JAHRSCalibration_t::JAHRSCalibration_t |
( |
| ) |
|
|
inline |
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>());
void configure(const JDetectorIntegration_t &detector, const int option)
Configure.
JDetectorsHelper & getDetector()
Auxiliary function for helper object initialisation.
ResultSet & getResultSet(const std::string &query)
Get result set.
do set_variable DETECTOR_TXT $WORKDIR detector
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.
void configure(const JDetectorIntegration_t &detector, const int option)
Configure.
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.
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) {
139 const int id =
getCLBID(detector[r1.first->second].container.getUPI());
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.
bool is_valid(const json &js)
Check validity of JSon data.
JUPIHelper & getUPI()
Auxiliary function for helper object initialisation.
Universal product identifier (UPI).
Auxiliary data structure for sorting of AHRS calibrations.
JCLBIDHelper & getCLBID()
Auxiliary function for helper object initialisation.
range_type find(const JUPI_t &upi) const
Find range of products with given UPI.
Auxiliary data structure to check validity of AHRS calibration data.
ResultSet & getResultSet(const std::string &query)
Get result set.
static const JPBS_t AHRS(3, 4, 3, 4)
PBS of compass
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 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())
182 THROW(JValueOutOfRange,
"Invalid module identifier " <<
id);
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Load from input file.
- Parameters
-
Definition at line 30 of file JObjectStreamIO.hh.
32 JLANG::load<std::ifstream>(file_name,
static_cast<T&
>(*this));
do set_variable OUTPUT_DIRECTORY $WORKDIR T
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));
do set_variable OUTPUT_DIRECTORY $WORKDIR T
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) {
199 calibration[id] = buffer;
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
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.
217 for (JAHRSCalibration_t::const_iterator
i = calibration.begin();
i != calibration.end(); ++
i) {
218 out <<
i->first <<
' ' <<
i->second << endl;
The documentation for this struct was generated from the following file: