43 JLimit_t& numberOfEvents = inputFile.getLimit();
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);
88 const JAHRS* parameters = inputFile.
next();
90 if (router.hasModule(parameters->
DOMID)) {
103 for (map_type::iterator
string =
data.begin();
string !=
data.end(); ++
string) {
105 if (!string->second.empty()) {
107 sort(string->second.begin(), string->second.end(),
make_comparator(&JAHRS::UNIXTIME));
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()));
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define MAKE_CSTRING(A)
Make C-string.
Data structure for compass in three dimensions.
JQuaternion3D getQuaternion() const
Get quaternion.
Logical location of module.
int getString() const
Get string number.
Router for direct addressing of module data in detector data structure.
Data structure for direction in three dimensions.
Data structure for unit quaternion in three dimensions.
JQuaternion3D & normalise()
Normalise quaternion.
Utility class to parse command line options.
General purpose class for object reading from a list of file names.
virtual bool hasNext() override
Check availability of next element.
virtual const pointer_type & next() override
Get next element.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::vector< JHitW0 > buffer_type
hits
std::map< int, range_type > map_type
Auxiliary data structure to build TGraph.
Auxiliary class for defining the range of iterations of objects.