Jpp - 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
software
JReconstruction
JQuality.cc
Go to the documentation of this file.
1
#include <string>
2
#include <iostream>
3
#include <iomanip>
4
5
#include "
JTools/JWeight.hh
"
6
#include "
JSupport/JMultipleFileScanner.hh
"
7
#include "
JSupport/JSupport.hh
"
8
#include "
JReconstruction/JEvt.hh
"
9
10
#include "
Jeep/JParser.hh
"
11
#include "
Jeep/JMessage.hh
"
12
13
14
/**
15
* \file
16
*
17
* Auxiliary program to sum fit quality.
18
*/
19
int
main
(
int
argc,
char
**argv)
20
{
21
using namespace
std;
22
using namespace
JPP;
23
24
JMultipleFileScanner<JEvt>
inputFile;
25
JLimit_t
& numberOfEvents = inputFile.
getLimit
();
26
int
debug
;
27
28
try
{
29
30
JParser<>
zap(
"Auxiliary program to sum fit quality."
);
31
32
zap[
'f'
] =
make_field
(inputFile);
33
zap[
'n'
] =
make_field
(numberOfEvents) = JLimit::max();
34
zap[
'd'
] =
make_field
(
debug
) = 2;
35
36
zap(argc, argv);
37
}
38
catch
(
const
exception& error) {
39
FATAL
(error.what() << endl);
40
}
41
42
JWeight
W(
"Quality"
);
43
44
while
(inputFile.hasNext()) {
45
46
STATUS
(
"event: "
<< setw(10) << inputFile.getCounter() <<
'\r'
);
DEBUG
(endl);
47
48
const
JEvt
* evt = inputFile.next();
49
50
if
(!evt->empty()) {
51
if
(evt->begin()->getQ() >= 0.0) {
52
W.
put
(evt->begin()->getQ());
53
}
54
}
55
}
56
STATUS
(endl);
57
58
cout <<
"Total quality "
<<
FIXED
(12,1) << W.
getTotal
() <<
' '
<<
FIXED
(12,1) << W.
getError
()<< endl;
59
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1500
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JSupport.hh
ROOT TTree parameter settings of various packages.
JTOOLS::JWeight::getTotal
double getTotal() const
Get total weight.
Definition:
JWeight.hh:79
STATUS
#define STATUS(A)
Definition:
JMessage.hh:63
FIXED
Auxiliary data structure for floating point format specification.
Definition:
JManip.hh:446
JTOOLS::JWeight::getError
double getError() const
Get total error.
Definition:
JWeight.hh:90
JSUPPORT::JLimit
Auxiliary class for defining the range of iterations of objects.
Definition:
JLimit.hh:41
JTOOLS::JWeight::put
void put(const double w)
Put weight.
Definition:
JWeight.hh:55
JEvt.hh
JWeight.hh
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
JTOOLS::JWeight
Weight calculator.
Definition:
JWeight.hh:23
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:167
JParser.hh
Utility class to parse command line options.
DEBUG
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
Definition:
JCalibratePMT.sh:21
JSUPPORT::JLimit::getLimit
const JLimit & getLimit() const
Get limit.
Definition:
JLimit.hh:73
Generated by
1.8.5