37 int main(
int argc,
char **argv)
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);
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()));
Utility class to parse command line options.
Q(UTCMax_s-UTCMin_s)-livetime_s
int main(int argc, char *argv[])
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.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
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.
Data structure for detector geometry and calibration.
std::vector< JHitW0 > buffer_type
hits
JQuaternion3D getQuaternion() const
Get quaternion.
Auxiliary class for defining the range of iterations of objects.
I/O formatting auxiliaries.
JDirection3D & rotate(const JRotation3D &R)
Rotate.
Logical location of module.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double getDY() const
Get y direction.
double getDX() const
Get x direction.
Data structure for compass in three dimensions.
ROOT TTree parameter settings.
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Data structure for unit quaternion in three dimensions.
Direct access to module in detector data structure.
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.
Utility class to parse command line options.
bool hasModule(const JObjectID &id) const
Has module.
const JLimit & getLimit() const
Get limit.
JQuaternion3D & normalise()
Normalise quaternion.
std::map< int, range_type > map_type
do set_variable DETECTOR_TXT $WORKDIR detector
#define DEBUG(A)
Message macros.