11 #include "TProfile2D.h" 
   79 int main(
int argc, 
char **argv)
 
   88   JLimit_t&               numberOfEvents = inputFile.getLimit();
 
   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);
 
  129   for (JDetector::const_iterator i = 
detector.begin(); i != 
detector.end(); ++i) {
 
  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) {
 
  139       emitters[i->getID()]  = (i->getPosition() + 
detector.getModule(i->getLocation()).
getPosition());
 
  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) {
 
  165     H2->GetXaxis()->SetBinLabel(i, 
MAKE_CSTRING(
string.at(i-1)));
 
  168   for (Int_t i = 1; i <= H2->GetYaxis()->GetNbins(); ++i) {
 
  172   for (Int_t i = 1; i <= H4->GetXaxis()->GetNbins(); ++i) {
 
  173     H4->GetXaxis()->SetBinLabel(i, 
MAKE_CSTRING(
string.at(i-1)));
 
  176   for (Int_t i = 1; i <= H4->GetYaxis()->GetNbins(); ++i) {
 
  197     for (JTreeScanner_t::iterator event = in.begin(); event != in.end() && counter != inputFile.getLimit(); ++event, ++counter) {
 
  199       if (counter%1000 == 0) {
 
  200         STATUS(
"event " << setw(8) << counter << 
'\r'); 
DEBUG(endl);
 
  203       const JEvent evt = *event;
 
  207       for (JEvent::const_iterator i = evt.begin(); i != evt.end(); ++i) {
 
  211       HA[evt.
getID()]->Fill((
double) evt.size());
 
  215         HC[evt.
getID()]->Fill(log10(evt.begin()->getToE() - toe[evt.
getID()]));
 
  221       toe[evt.
getID()] = evt.begin()->getToE();
 
  223       TH1D* hq = HQ[evt.
getID()];
 
  224       TH2D* hr = HR[evt.
getID()];
 
  225       TH1D* h1 = H1[evt.
getID()];
 
  226       TH2D* h2 = H2[evt.
getID()];
 
  227       TH2D* h3 = H3[evt.
getID()];
 
  228       TProfile2D* h4 = H4[evt.
getID()];
 
  230       for (JEvent::const_iterator i = evt.begin(); i != evt.end(); ++i) {
 
  231         hq->Fill(log10(i->getQ()));
 
  238         for (JEvent::const_iterator i = evt.begin(); i != evt.end(); ++i) {
 
  239           if (receivers.
has(i->getID())) {
 
  240             HR->Fill(log10(p0.
getDistance(receivers[i->getID()])), log10(i->getQ()));
 
  241             hr->Fill(log10(p0.
getDistance(receivers[i->getID()])), log10(i->getQ()));
 
  248       for (JEvent::const_iterator i = evt.begin(); i != evt.end(); ++i) {
 
  249         buffer[i->getID()].insert(i->getQ());
 
  252       for (
map<
int, 
set<double> >::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
 
  254         h1->Fill((
double) i->second.size());
 
  256         if (receivers.
has(i->first)) {
 
  258           const JLocation& location = receivers[i->first];
 
  260           const double x = 
string.getIndex(location.
getString());
 
  265           if (i->second.size() >= 2u) {
 
  269           h4->Fill(
x, 
y, log10(*(i->second.rbegin())));
 
  279   out << HA << HB << HC << HD << HE << HQ << HR << *HR << H1 << H2 << H3 << H4;
 
int main(int argc, char **argv)
 
ROOT TTree parameter settings.
 
Data structure for detector geometry and calibration.
 
General purpose class for a hash collection of unique elements.
 
General purpose class for hash map of unique elements.
 
Dynamic ROOT object management.
 
General purpose messaging.
 
#define DEBUG(A)
Message macros.
 
Scanning of objects from multiple files according a format that follows from the extension of each fi...
 
Utility class to parse command line options.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
I/O formatting auxiliaries.
 
#define MAKE_CSTRING(A)
Make C-string.
 
Auxiliary class to define a range between two values.
 
Data structure for transmitter.
 
Data structure for tripod.
 
Logical location of module.
 
int getFloor() const
Get floor number.
 
int getString() const
Get string number.
 
Data structure for position in three dimensions.
 
double getDistance(const JVector3D &pos) const
Get distance to point.
 
Utility class to parse command line options.
 
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys.
 
void Write(TDirectory &out, const bool wm=false)
Write objects to file.
 
Base class for JTreeScanner.
 
Template definition for direct access of elements in ROOT TChain.
 
JPosition3D getPosition(const Vec &pos)
Get position.
 
JContainer< std::vector< JTripod > > tripods_container
 
JContainer< std::vector< JTransmitter > > transmitters_container
 
JMODEL::JString getString(const JFit &fit)
Get model parameters of string.
 
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.
 
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Long64_t counter_type
Type definition for counter.
 
int getID() const
Get emitter identifier.
 
int getOverlays() const
Get number of overlayed events.
 
Auxiliary wrapper for I/O of container with optional comment (see JComment).
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
Auxiliary class for defining the range of iterations of objects.