Jpp
18.1.0
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
JCreep.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
4
#include "
JSupport/JMultipleFileScanner.hh
"
5
6
#include "
JTools/JQuantile.hh
"
7
8
#include "
JAcoustics/JEvt.hh
"
9
#include "
JAcoustics/JSupport.hh
"
10
11
#include "
Jeep/JPrint.hh
"
12
#include "
Jeep/JParser.hh
"
13
#include "
Jeep/JMessage.hh
"
14
15
16
/**
17
* \file
18
*
19
* Auxialiry program to determine average creep of strings.
20
* \author mdejong
21
*/
22
int
main
(
int
argc,
char
**argv)
23
{
24
using namespace
std;
25
using namespace
JPP;
26
27
JMultipleFileScanner<JEvt>
inputFile;
28
JLimit_t
& numberOfEvents = inputFile.
getLimit
();
29
int
debug
;
30
31
try
{
32
33
JParser<>
zap(
"Auxialiry program to determine average creep of strings."
);
34
35
zap[
'f'
] =
make_field
(inputFile,
"input file (output of JKatoomba[.sh])"
);
36
zap[
'n'
] =
make_field
(numberOfEvents) = JLimit::max();
37
zap[
'd'
] =
make_field
(
debug
) = 2;
38
39
zap(argc, argv);
40
}
41
catch
(
const
exception &error) {
42
FATAL
(error.what() << endl);
43
}
44
45
46
map<int, JQuantile>
Q
;
47
48
while
(inputFile.hasNext()) {
49
50
STATUS
(
"event: "
<< setw(10) << inputFile.getCounter() <<
'\r'
);
DEBUG
(endl);
51
52
const
JEvt
* evt = inputFile.next();
53
54
for
(JEvt::const_iterator
i
= evt->begin();
i
!= evt->end(); ++
i
) {
55
Q
[
i
->id].put(
i
->vs);
56
}
57
}
58
STATUS
(endl);
59
60
for
(
map<int, JQuantile>::const_iterator
i
=
Q
.begin();
i
!=
Q
.end(); ++
i
) {
61
cout << setw(4) <<
i
->first <<
' '
62
<<
FIXED
(9,6) <<
i
->second.getMean() <<
' '
63
<<
FIXED
(9,6) <<
i
->second.getSTDev() << endl;
64
}
65
}
66
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
i
then rm i
Definition:
JEvtReweightGSeaGenParameterScan.sh:337
Q
Q(UTCMax_s-UTCMin_s)-livetime_s
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
std::map
Definition:
JSTDTypes.hh:16
STATUS
#define STATUS(A)
Definition:
JMessage.hh:63
JSupport.hh
ROOT TTree parameter settings.
FIXED
Auxiliary data structure for floating point format specification.
Definition:
JManip.hh:446
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:299
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
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:199
JParser.hh
Utility class to parse command line options.
JQuantile.hh
JSUPPORT::JLimit::getLimit
const JLimit & getLimit() const
Get limit.
Definition:
JLimit.hh:84
JEvt.hh
Acoustic event fit.
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
DEBUG
#define DEBUG(A)
Message macros.
Definition:
JMessage.hh:62
Generated by
1.8.5