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
software
JPhysics
JMakeCDG.cc
Go to the documentation of this file.
1
#include <string>
2
#include <iostream>
3
#include <fstream>
4
#include <iomanip>
5
6
#include "
JTools/JFunction1D_t.hh
"
7
#include "
JTools/JFunctionalMap_t.hh
"
8
#include "
JPhysics/JPDFTable.hh
"
9
#include "
JPhysics/JCDFTable.hh
"
10
11
#include "
Jeep/JParser.hh
"
12
#include "
Jeep/JMessage.hh
"
13
14
15
/**
16
* \file
17
*
18
* Main program to create table of CDFs from table of PDFs for Cherenkov light from EM-shower.
19
* \author mdejong
20
*/
21
int
main
(
int
argc,
char
**argv)
22
{
23
using namespace
std;
24
25
string
inputFile;
26
string
outputFile
;
27
double
epsilon
;
28
int
debug
;
29
30
try
{
31
32
JParser<>
zap(
"Main program to create table of CDFs from table of PDFs for Cherenkov light from EM-shower."
);
33
34
zap[
'f'
] =
make_field
(inputFile);
35
zap[
'o'
] =
make_field
(
outputFile
);
36
zap[
'e'
] =
make_field
(
epsilon
) = 0.0;
37
zap[
'd'
] =
make_field
(
debug
) = 0;
38
39
zap(argc, argv);
40
}
41
catch
(
const
exception& error) {
42
FATAL
(error.what() << endl);
43
}
44
45
46
using namespace
JPP;
47
48
49
typedef
JMAPLIST<JPolint1FunctionalMap,
50
JPolint1FunctionalMap,
51
JPolint1FunctionalGridMap,
52
JPolint1FunctionalGridMap>::maplist JMapList_t;
53
typedef
JPDFTable<JSplineFunction1S_t, JMapList_t> JPDF_t;
54
typedef
JCDFTable<JSplineFunction1D_t, JMapList_t> JCDF_t;
55
56
JPDF_t pdf;
57
58
try
{
59
60
NOTICE
(
"loading input from file "
<< inputFile <<
"... "
<< flush);
61
62
pdf.load(inputFile.c_str());
63
64
NOTICE
(
"OK"
<< endl);
65
}
66
catch
(
const
JException& error) {
67
FATAL
(error.what() << endl);
68
}
69
70
NOTICE
(
"converting... "
<< flush);
71
72
JCDF_t
cdf
(pdf,
epsilon
);
73
74
NOTICE
(
"OK"
<< endl);
75
76
try
{
77
78
NOTICE
(
"storing output to file "
<<
outputFile
<<
"... "
<< flush);
79
80
cdf.store(
outputFile
.c_str());
81
82
NOTICE
(
"OK"
<< endl);
83
}
84
catch
(
const
JException& error) {
85
NOTICE
(error.what() << endl);
86
}
87
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
outputFile
string outputFile
Definition:
JDAQTimesliceSelector.cc:37
JFunctionalMap_t.hh
Various implementations of functional maps.
JFunction1D_t.hh
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
JPDFTable.hh
NOTICE
#define NOTICE(A)
Definition:
JMessage.hh:64
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
cdf
then for FUNCTION in pdf npe cdf
Definition:
JPlotNPE-PDG.sh:73
JParser.hh
Utility class to parse command line options.
JCDFTable.hh
GAUSS_LEGENDRE::epsilon
const double epsilon
Definition:
JQuadrature.cc:21
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
Generated by
1.8.5