50 JLimit_t& numberOfEvents = inputFile.getLimit();
60 JParser<> zap(
"Example program to monitor acoustic events.");
62 zap[
'f'] =
make_field(inputFile,
"output of JAcousticEventBuilder[.sh]");
63 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
68 zap[
'E'] =
make_field(
id,
"emitter identifier (-1 = all)") = -1;
73 catch(
const exception &error) {
74 FATAL(error.what() << endl);
89 for (JDetector::const_iterator i =
detector.begin(); i !=
detector.end(); ++i) {
90 receivers[i->getID()] = i->getLocation();
105 zbuf[evt->
getID()].push_back(*evt);
112 STATUS(
"Emitter " << setw(2) << emitter->first <<
' ' << setw(6) << emitter->second.size() << endl);
114 if (emitter->first ==
id ||
id == -1) {
116 if (emitter->second.size() > 1) {
118 sort(emitter->second.begin(), emitter->second.end());
122 if (!p->empty() && !q->empty()) {
124 DEBUG(
"Time difference " <<
FIXED(7,3) << q->begin()->getToE() - p->begin()->getToE() << endl);
126 if (T_s(q->begin()->getToE() - p->begin()->getToE())) {
133 JEvent::const_iterator __p = p->begin();
134 JEvent::const_iterator __q = q->begin();
136 while (__p != p->end() && __q != q->end()) {
138 while (__p != p->end() && __q != q->end() && __p->getID() < __q->getID()) { ++__p; }
139 while (__p != p->end() && __q != q->end() && __q->getID() < __p->getID()) { ++__q; }
141 if (__p != p->end() && __q != q->end() && __q->getID() == __p->getID()) {
143 if (receivers.
has(__p->getID())) {
145 const JLocation& location = receivers[__p->getID()];
146 const double t1 = __q->getToA() - __p->getToA();
148 buffer[location] = t1;
156 if (buffer.size() > 1) {
160 if (p->first.getString() == q->first.getString() && p->first.getFloor() + 1 == q->first.getFloor()) {
162 const double t1 = q->second - p->second;
164 H1[p->first]->Fill(t1);
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Logical location of module.
Utility class to parse command line options.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys.
General purpose class for object reading from a list of file names.
virtual bool hasNext() override
Check availability of next element.
counter_type getCounter() const
Get counter.
virtual const pointer_type & next() override
Get next element.
JAbstractHistogram< double > JHistogram_t
Type definition for scan along axis.
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).
Auxiliary data structure for floating point format specification.
Type definition of range.
int getID() const
Get emitter identifier.
Auxiliary class for defining the range of iterations of objects.