Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JAAnet
JWeightFileScanner.cc
Go to the documentation of this file.
1
2
#include "
JWeightFileScanner.hh
"
3
#include "
JWeightMupage.hh
"
4
5
#include "
Jeep/JParser.hh
"
6
#include "
Jeep/JMessage.hh
"
7
8
9
int
main
(
int
argc,
char
**argv)
10
{
11
using namespace
std;
12
using namespace
JPP;
13
14
JMultipleFileScanner<Evt>
inputFile;
15
int
debug
;
16
17
try
{
18
19
JParser<>
zap;
20
21
zap[
'f'
] =
make_field
(inputFile);
22
zap[
'd'
] =
make_field
(
debug
) = 1;
23
24
zap(argc, argv);
25
}
26
catch
(
const
exception& error) {
27
FATAL
(error.what() << endl);
28
}
29
30
31
JHead
header;
// selection
32
33
header.
physics
.resize(1);
34
header.physics[0].program =
"MUPAGE"
;
35
header.livetime.numberOfSeconds = 1.0;
36
37
JWeightFileScanner<>
in
(
getAAnetFiles
(inputFile, header),
JWeightMupage
());
38
39
// following syntax should be universal
40
41
while
(in.hasNext()) {
42
43
const
Evt
* evt = in.next();
44
45
const
double
W = in.
getWeight
(*evt);
46
47
DEBUG
(
"Weight: "
<< W << endl);
48
49
//TH1D::Fill(.., W);
50
}
51
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1493
JWeightFileScanner.hh
JAANET::JWeightMupage
Implementation of event weighing for MUPAGE data.
Definition:
JWeightDAQ.hh:12
JSUPPORT::getAAnetFiles
JMultipleFileScanner_t getAAnetFiles(const JMultipleFileScanner_t &input, const JHead &header, const bool option=false)
Get list of files compatible with geven header.
Definition:
JMonteCarloFileSupportkit.hh:474
JAANET::JWeightEventHelper::getWeight
double getWeight(const Evt &evt) const
Get weight of given event.
Definition:
JWeightEventHelper.hh:54
in
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition:
JSirene.sh:45
JAANET::JHead::physics
std::vector< JAANET::physics > physics
Definition:
JHead.hh:1089
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1954
debug
int debug
debug level
Definition:
JSirene.cc:61
JAANET::JWeightFileScanner
Template file scanner with event weight.
Definition:
JWeightFileScanner.hh:22
JMessage.hh
General purpose messaging.
JAANET::JHead
Monte Carlo run header.
Definition:
JHead.hh:836
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JWeightMupage.hh
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.
Evt
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Definition:
Evt.hh:19
DEBUG
#define DEBUG(A)
Message macros.
Definition:
JMessage.hh:62
main
int main(int argc, char *argv[])
Definition:
Main.cpp:15
Generated by
1.8.5