47 size_t numberOfModules;
52 JParser<> zap(
"Example program to monitor AHRS data.");
55 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
64 catch(
const exception &error) {
65 FATAL(error.what() << endl);
84 for (
int counter = 0; inputFile.hasNext(); ++counter) {
86 STATUS(
"counter: " << setw(8) << counter <<
'\r' << flush);
DEBUG(endl);
90 if (router.hasModule(parameters->
DOMID)) {
94 data[location.
getString()].push_back(*parameters);
103 for (map_type::iterator
string = data.begin();
string != data.end(); ++
string) {
105 if (!
string->second.empty()) {
109 for (buffer_type::const_iterator p =
string->second.begin(); p !=
string->second.end(); ) {
113 buffer_type::const_iterator q = p;
115 for ( ; q !=
string->second.end() && q->UNIXTIME - p->UNIXTIME <= Tmax_s * 1.0e3; ++q) {
116 buffer.insert(q->DOMID);
119 if (buffer.size() > numberOfModules) {
123 for (buffer_type::const_iterator i = p; i != q; ++i) {
133 const double t1 = p->UNIXTIME * 1.0e-3 + 0.5*Tmax_s;
135 ZO[
string->first].put(t1, atan2(
u.getDY(),
u.getDX()));
136 ZA[
string->first].put(t1, sqrt(
u.getDX()*
u.getDX() +
u.getDY()*
u.getDY()));
Utility class to parse command line options.
Q(UTCMax_s-UTCMin_s)-livetime_s
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member.
Data structure for direction in three dimensions.
Router for direct addressing of module data in detector data structure.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
#define MAKE_CSTRING(A)
Make C-string.
Auxiliary data structure to build TGraph.
JQuaternion3D getQuaternion() const
Get quaternion.
Auxiliary class for defining the range of iterations of objects.
Logical location of module.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for compass in three dimensions.
Data structure for unit quaternion in three dimensions.
int getString() const
Get string number.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
General purpose class for object reading from a list of file names.
const JLimit & getLimit() const
Get limit.
JQuaternion3D & normalise()
Normalise quaternion.
do set_variable DETECTOR_TXT $WORKDIR detector
#define DEBUG(A)
Message macros.