1 #ifndef __JDB_JAHRSCALIBRATION_T__
2 #define __JDB_JAHRSCALIBRATION_T__
24 namespace JDATABASE {}
25 namespace JPP {
using namespace JDATABASE; }
37 public std::map<int, JAHRSCalibration>,
60 ResultSet& rs =
getResultSet(getTable<JDetectorIntegration_t>());
117 ResultSet& rs =
getResultSet(getTable<JAHRSCalibration>());
131 for (++q; q != calibration.end() && q->SERIALNUMBER == p->SERIALNUMBER; ++q) {}
138 if (
distance(r1.first, r1.second) == 1) {
140 const int id =
getCLBID(detector[r1.first->second].container.getUPI());
146 this->insert(make_pair(
id, calibration));
166 return (this->find(
id) != this->end());
178 const_iterator i = this->find(
id);
180 if (i != this->end())
199 while (in >>
id >> buffer) {
200 calibration[id] = buffer;
218 for (JAHRSCalibration_t::const_iterator i = calibration.begin(); i != calibration.end(); ++i) {
219 out << i->first <<
' ' << i->second << endl;
void configure(const JDetectorIntegration_t &detector, const int option)
Configure.
JAHRSCalibration_t(const JDetectorIntegration_t &detector, const int option)
Constructor.
friend std::istream & operator>>(std::istream &in, JAHRSCalibration_t &calibration)
Read AHRS calibration from input stream.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
friend std::ostream & operator<<(std::ostream &out, const JAHRSCalibration_t &calibration)
Write AHRS calibration to output stream.
JAHRSCalibration_t()
Default constructor.
Universal product identifier (UPI).
bool has(int id) const
Check availability of AHRS calibration for given module identifier.
Auxiliary data structure for sorting of AHRS calibrations.
JDetectorsHelper getDetector
Function object for mapping serial number to object identifier of detector and vice versa...
JAHRSCalibration_t(const int id, const int option)
Constructor.
bool is_valid(const json &js)
Check validity of JSon data.
range_type find(const JUPI_t &upi) const
Find range of products with given UPI.
void load(const char *file_name)
Load from input file.
Auxiliary data structure to check validity of AHRS calibration data.
ResultSet & getResultSet(const std::string &query)
Get result set.
Auxiliary class to map module identifier to AHRS calibration.
JUPIHelper getUPI
Function object for mapping PBS and serial number to UPI.
JCLBIDHelper getCLBID
Function object for mapping UPI of central-logic board to module identifier.
Exception for accessing a value in a collection that is outside of its range.
Auxiliary base class for storing and loading a single object to and from an ASCII file...
do set_variable DETECTOR_TXT $WORKDIR detector
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
JAHRSCalibration_t(const char *file_name)
Constructor.
static const JPBS_t AHRS(3, 4, 3, 4)
PBS of compass