11 #include "TProfile2D.h" 
   79 int main(
int argc, 
char **argv)
 
   98     JParser<> zap(
"Example program to monitor acoustic events.");
 
  100     zap[
'f'] = 
make_field(inputFile,       
"output of JAcousticEventBuilder[.sh]");
 
  101     zap[
'n'] = 
make_field(numberOfEvents)   = JLimit::max();
 
  111   catch(
const exception &error) {
 
  112     FATAL(error.what() << endl);
 
  130     receivers[
i->getID()] = JModule_t(
i->getLocation(), 
i->getPosition());
 
  133   for (tripods_container::const_iterator 
i = 
tripods.begin(); 
i != 
tripods.end(); ++
i) {
 
  134     emitters[
i->getID()]  = (
i->getUTMPosition() - 
detector.getUTMPosition());
 
  137   for (transmitters_container::const_iterator 
i = transmitters.begin(); 
i != transmitters.end(); ++
i) {
 
  141     catch(
const exception&) {
 
  158                                   string.size(),              -0.5, 
string.size()         - 0.5, 
 
  161                                               string.size(),              -0.5, 
string.size()         - 0.5, 
 
  164   for (Int_t 
i = 1; 
i <= H2->GetXaxis()->GetNbins(); ++
i) {
 
  168   for (Int_t 
i = 1; 
i <= H2->GetYaxis()->GetNbins(); ++
i) {
 
  172   for (Int_t 
i = 1; 
i <= H4->GetXaxis()->GetNbins(); ++
i) {
 
  176   for (Int_t 
i = 1; 
i <= H4->GetYaxis()->GetNbins(); ++
i) {
 
  193     for (JTreeScanner_t::iterator event = in.begin(); 
event != in.end() && counter != inputFile.getLimit(); ++event, ++counter) {
 
  195       if (counter%1000 == 0) {
 
  196         STATUS(
"event " << setw(8) << counter << 
'\r'); 
DEBUG(endl);
 
  199       const JEvent evt = *event;
 
  203       for (JEvent::const_iterator 
i = evt.begin(); 
i != evt.end(); ++
i) {
 
  207       HA[evt.
getID()]->Fill((
double) evt.size());
 
  211         HC[evt.
getID()]->Fill(
log10(evt.begin()->getToE() - toe[evt.
getID()]));
 
  214       HD[evt.
getID()]->Fill(Q1.getSTDev());
 
  215       HE[evt.
getID()]->Fill(Q1.getQuantile(
Q, JQuantile::symmetric_t));
 
  217       toe[evt.
getID()] = evt.begin()->getToE();
 
  219       TH1D* hq = HQ[evt.
getID()];
 
  220       TH2D* hr = HR[evt.
getID()];
 
  221       TH1D* h1 = H1[evt.
getID()];
 
  222       TH2D* h2 = H2[evt.
getID()];
 
  223       TH2D* h3 = H3[evt.
getID()];
 
  224       TProfile2D* h4 = H4[evt.
getID()];
 
  226       for (JEvent::const_iterator 
i = evt.begin(); 
i != evt.end(); ++
i) {
 
  227         hq->Fill(
log10(
i->getQ()));
 
  230       if (emitters.has(evt.
getID())) {
 
  234         for (JEvent::const_iterator 
i = evt.begin(); 
i != evt.end(); ++
i) {
 
  235           if (receivers.has(
i->getID())) {
 
  244       for (JEvent::const_iterator 
i = evt.begin(); 
i != evt.end(); ++
i) {
 
  245         buffer[
i->getID()].insert(
i->getQ());
 
  248       for (
map<
int, 
set<double> >::const_iterator 
i = buffer.begin(); 
i != buffer.end(); ++
i) {
 
  250         h1->Fill((
double) 
i->second.size());
 
  252         if (receivers.has(
i->first)) {
 
  254           const JLocation& location = receivers[
i->first];
 
  256           const double x = 
string.getIndex(location.
getString());
 
  261           if (
i->second.size() >= 2
u) {
 
  265           h4->Fill(x, y, 
log10(*(
i->second.rbegin())));
 
  275   out << HA << HB << HC << HD << HE << HQ << HR << *HR << H1 << H2 << H3 << H4;
 
Utility class to parse command line options. 
 
int getOverlays() const 
Get number of overlayed events. 
 
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. 
 
int getFloor() const 
Get floor number. 
 
JContainer< std::vector< JTransmitter > > transmitters_container
 
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. 
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
Long64_t counter_type
Type definition for counter. 
 
Dynamic ROOT object management. 
 
double getDistance(const JVector3D &pos) const 
Get distance to point. 
 
Template definition for direct access of elements in ROOT TChain. 
 
Data structure for detector geometry and calibration. 
 
JMODEL::JString getString(const JFit &fit)
Get model parameters of string. 
 
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. 
 
Data structure for transmitter. 
 
Logical location of module. 
 
Auxiliary wrapper for I/O of container with optional comment (see JComment). 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
set_variable E_E log10(E_{fit}/E_{#mu})"
 
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values. 
 
JPosition3D getPosition(const Vec &pos)
Get position. 
 
void Write(TDirectory &out, const bool wm=false)
Write objects to file. 
 
JContainer< std::vector< JTripod > > tripods_container
 
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. 
 
Auxiliary data structure for average. 
 
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. 
 
void put(const double x)
Put value. 
 
const JLimit & getLimit() const 
Get limit. 
 
Data structure for position in three dimensions. 
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
int getID() const 
Get emitter identifier. 
 
Data structure for tripod. 
 
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
 
#define DEBUG(A)
Message macros.