11 #include "TGraphErrors.h"
45 int main(
int argc,
char **argv)
59 JParser<> zap(
"Example program to monitor acoustic events.");
61 zap[
'f'] =
make_field(inputFile,
"output of JAcousticEventBuilder[.sh]");
62 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
66 zap[
'l'] =
make_field(lifetime_s,
"run lifetime in seconds");
69 catch(
const exception &error) {
70 FATAL(error.what() << endl);
84 for (JDetector::const_iterator i =
detector.begin(); i !=
detector.end(); ++i) {
86 receivers[i->getID()] = i->getLocation();
93 string.size(), -0.5,
string.size() - 0.5,
96 for (Int_t i = 1; i <= H2->GetXaxis()->GetNbins(); ++i) {
97 H2->GetXaxis()->SetBinLabel(i,
MAKE_CSTRING(
string.at(i-1)));
100 for (Int_t i = 1; i <= H2->GetYaxis()->GetNbins(); ++i) {
108 for (JTreeScanner_t::iterator event = in.begin();
event != in.end(); ++event) {
112 TH2D* h2 = H2[
event->getID()];
116 for (JEvent::const_iterator i = event->begin(); i !=
event->end(); ++i) {
117 buffer[i->getID()].insert(i->getQ());
120 for (
map<
int,
set<double> >::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
122 if (receivers.has(i->first)) {
124 const JLocation& location = receivers[i->first];
Utility class to parse command line options.
int main(int argc, char *argv[])
int getFloor() const
Get floor number.
General purpose class for hash map of unique elements.
ROOT TTree parameter settings.
#define MAKE_CSTRING(A)
Make C-string.
General purpose class for a hash collection of unique elements.
Dynamic ROOT object management.
Template definition for direct access of elements in ROOT TChain.
Data structure for detector geometry and calibration.
Auxiliary class for defining the range of iterations of objects.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
I/O formatting auxiliaries.
Logical location of module.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
int getIndex()
Get index for user I/O manipulation.
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Base class for JTreeScanner.
int getString() const
Get string number.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
Auxiliary class to define a range between two values.
Utility class to parse command line options.
const JLimit & getLimit() const
Get limit.
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 JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in