Jpp
15.0.1-rc.1-highqe
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JAcoustics
JPrintChi2.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
4
#include "TROOT.h"
5
#include "TFile.h"
6
7
#include "
JSupport/JMultipleFileScanner.hh
"
8
9
#include "
JAcoustics/JEvt.hh
"
10
#include "
JAcoustics/JSupport.hh
"
11
12
#include "
JTools/JQuantile.hh
"
13
14
#include "
Jeep/JPrint.hh
"
15
#include "
Jeep/JParser.hh
"
16
#include "
Jeep/JMessage.hh
"
17
18
19
/**
20
* \file
21
*
22
* Auxiliary program to print chi2/NDF of acoustic events.
23
* \author mdejong
24
*/
25
int
main
(
int
argc,
char
**argv)
26
{
27
using namespace
std;
28
using namespace
JPP;
29
30
JMultipleFileScanner<JEvt>
inputFile;
31
JLimit_t
& numberOfEvents = inputFile.
getLimit
();
32
int
debug
;
33
34
try
{
35
36
JParser<>
zap(
"Auxiliary program to print chi2/NDF of acoustic events."
);
37
38
zap[
'f'
] =
make_field
(inputFile);
39
zap[
'n'
] =
make_field
(numberOfEvents) = JLimit_t::max();
40
zap[
'd'
] =
make_field
(
debug
) = 1;
41
42
zap(argc, argv);
43
}
44
catch
(
const
exception &error) {
45
FATAL
(error.what() << endl);
46
}
47
48
49
JQuantile
Q
;
50
51
while
(inputFile.hasNext()) {
52
53
const
JEvt
* evt = inputFile.next();
54
55
Q
.put(evt->
chi2
/ evt->
weight
);
56
}
57
58
cout <<
Q
.getMean();
59
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1500
Q
Q(UTCMax_s-UTCMin_s)-livetime_s
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JTOOLS::JQuantile
Auxiliary data structure for running average, standard deviation and quantiles.
Definition:
JQuantile.hh:43
JSupport.hh
ROOT TTree parameter settings.
JSUPPORT::JLimit
Auxiliary class for defining the range of iterations of objects.
Definition:
JLimit.hh:41
JPrint.hh
I/O formatting auxiliaries.
JACOUSTICS::JEvt
Acoustic event fit.
Definition:
JAcoustics/JEvt.hh:154
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1961
JACOUSTICS::JHead::weight
double weight
total weight of hits
Definition:
JAcoustics/JEvt.hh:146
debug
int debug
debug level
Definition:
JSirene.cc:63
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JMultipleFileScanner.hh
Scanning of objects from multiple files according a format that follows from the extension of each fi...
JSUPPORT::JMultipleFileScanner
General purpose class for object reading from a list of file names.
Definition:
JMultipleFileScanner.hh:183
JParser.hh
Utility class to parse command line options.
JQuantile.hh
JSUPPORT::JLimit::getLimit
const JLimit & getLimit() const
Get limit.
Definition:
JLimit.hh:73
JEvt.hh
Acoustic event fit.
JACOUSTICS::JHead::chi2
double chi2
chi2
Definition:
JAcoustics/JEvt.hh:147
Generated by
1.8.5