57 JParser<> zap(
"Example program to monitor acoustic events.");
59 zap[
'f'] =
make_field(inputFile,
"output of JAcousticEventBuilder[.sh]");
60 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
68 catch(
const exception &error) {
69 FATAL(error.what() << endl);
83 for (JDetector::const_iterator i =
detector.begin(); i !=
detector.end(); ++i) {
84 receivers[i->getID()] = i->getLocation();
100 string.size(), -0.5,
string.size() - 0.5,
101 floor.getUpperLimit() + 1, - 0.5, floor.getUpperLimit() + 0.5));
109 for (Int_t i = 1; i <= H2->GetXaxis()->GetNbins(); ++i) {
110 H2->GetXaxis()->SetBinLabel(i,
MAKE_CSTRING(
string.at(i-1)));
111 H3->GetXaxis()->SetBinLabel(i,
MAKE_CSTRING(
string.at(i-1)));
114 for (Int_t i = 1; i <= H2->GetYaxis()->GetNbins(); ++i) {
125 for (JTreeScanner_t::iterator event =
in.begin();
event !=
in.end(); ++event) {
127 STATUS(
"event " << setw(8) << event->getCounter() <<
'\r');
DEBUG(endl);
133 const double t1 = evt.begin()->getToE();
137 for (JEvent::const_iterator i = evt.begin(); i != evt.end(); ++i) {
138 QD.
put(i->getToE() - t1);
142 HA[evt.
getID()]->Fill((
double) evt.size());
145 if (toe.has(evt.
getID())) {
146 HC[evt.
getID()]->Fill(
log10(evt.begin()->getToE() - toe[evt.
getID()]));
157 toe[evt.
getID()] = evt.begin()->getToE();
160 TH1D* hq = HQ[evt.
getID()];
161 TH2D* h2 = H2[evt.
getID()];
162 TH2D* h3 = H3[evt.
getID()];
166 for (JEvent::const_iterator i = evt.begin(); i != evt.end(); ++i) {
167 buffer[i->getID()].insert(i->getQ());
170 for (
map<
int,
set<double> >::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
172 h1->Fill((
double) i->second.size());
174 hq->Fill(
log10(*(i->second.rbegin())));
176 if (receivers.has(i->first)) {
178 const JLocation& location = receivers[i->first];
182 if (i->second.size() > 1
u) {
193 out << HA << HB << HC << HD << HE << HQ << H1 << H2 << H3;
194 out << GA << GD << GE << GQ;
Utility class to parse command line options.
int getOverlays() const
Get overlays.
void AddPoint(TGraph *g1, const Double_t x, const Double_t y)
Add point to TGraph.
int getFloor() const
Get floor number.
*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.
then for HISTOGRAM in h0 h1
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Template definition for direct access of elements in ROOT TChain.
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...
Logical location of module.
#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.
int getIndex()
Get index for user I/O manipulation.
Base class for JTreeScanner.
int getString() const
Get string number.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
void remove(const size_t ns, const double stdev)
Remove outliers.
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
const JLimit & getLimit() const
Get limit.
int getID() const
Get identifier.
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 source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in