Jpp
18.0.0-rc.4
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
JAcoustics
JFootprint.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
4
#include "TROOT.h"
5
#include "TFile.h"
6
#include "TH1D.h"
7
#include "TH2D.h"
8
9
#include "
JSupport/JMultipleFileScanner.hh
"
10
11
#include "
JROOT/JManager.hh
"
12
13
#include "
JAcoustics/JEvt.hh
"
14
#include "
JAcoustics/JSupport.hh
"
15
16
#include "
Jeep/JPrint.hh
"
17
#include "
Jeep/JParser.hh
"
18
#include "
Jeep/JMessage.hh
"
19
20
21
/**
22
* \file
23
*
24
* Auxiliary program to plot average tilt angles.
25
* \author mdejong
26
*/
27
int
main
(
int
argc,
char
**argv)
28
{
29
using namespace
std;
30
using namespace
JPP;
31
32
JMultipleFileScanner<JEvt>
inputFile;
33
JLimit_t
& numberOfEvents = inputFile.
getLimit
();
34
string
outputFile
;
35
int
debug
;
36
37
try
{
38
39
JParser<>
zap(
"Auxiliary program to plot average tilt angles."
);
40
41
zap[
'f'
] =
make_field
(inputFile,
"input file (output of JKatoomba)"
);
42
zap[
'n'
] =
make_field
(numberOfEvents) = JLimit::max();
43
zap[
'o'
] =
make_field
(
outputFile
) =
"parramatta.root"
;
44
zap[
'd'
] =
make_field
(
debug
) = 2;
45
46
zap(argc, argv);
47
}
48
catch
(
const
exception &error) {
49
FATAL
(error.what() << endl);
50
}
51
52
JManager<int, TH2D>
H2(
new
TH2D(
"string[%]"
, NULL, 500, -50.0, +50.0, 500, -50.0, +50.0));
53
54
while
(inputFile.hasNext()) {
55
56
STATUS
(
"event: "
<< setw(10) << inputFile.getCounter() <<
'\r'
);
DEBUG
(endl);
57
58
const
JEvt
* evt = inputFile.next();
59
60
for
(JEvt::const_iterator
i
= evt->begin();
i
!= evt->end(); ++
i
) {
61
H2 ->Fill(
i
->tx*1.0e3,
i
->ty*1.0e3);
// [mrad]
62
H2[
i
->id]->Fill(
i
->tx*1.0e3,
i
->ty*1.0e3);
// [mrad]
63
}
64
}
65
STATUS
(endl);
66
67
TFile out(
outputFile
.c_str(),
"recreate"
);
68
69
out << H2
70
<< *H2;
71
72
out.
Write
();
73
out.Close();
74
}
75
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
i
then rm i
Definition:
JEvtReweightGSeaGenParameterScan.sh:337
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
STATUS
#define STATUS(A)
Definition:
JMessage.hh:63
JSupport.hh
ROOT TTree parameter settings.
JManager.hh
Dynamic ROOT object management.
outputFile
string outputFile
Definition:
JDAQTimesliceSelector.cc:37
JSUPPORT::JLimit
Auxiliary class for defining the range of iterations of objects.
Definition:
JLimit.hh:41
JROOT::JManager
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
Definition:
JManager.hh:43
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
JROOT::JManager::Write
void Write(TDirectory &out, const bool wm=false)
Write objects to file.
Definition:
JManager.hh:295
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.
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