Jpp
17.3.0-rc.2
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
JSirene
JNPE.cc
Go to the documentation of this file.
1
#include <string>
2
#include <iostream>
3
#include <iomanip>
4
5
#include "
JSirene/JSireneToolkit.hh
"
6
7
#include "
Jeep/JPrint.hh
"
8
#include "
Jeep/JParser.hh
"
9
#include "
Jeep/JMessage.hh
"
10
11
12
/**
13
* \file
14
*
15
* Auxiliary program to print number of photo-electrons.
16
* \author mdejong
17
*/
18
int
main
(
int
argc,
char
**argv)
19
{
20
using namespace
std;
21
22
int
npe;
23
int
debug
;
24
25
try
{
26
27
JParser<>
zap(
"Auxiliary program to print number of photo-electrons."
);
28
29
zap[
'N'
] =
make_field
(npe);
30
zap[
'd'
] =
make_field
(
debug
) = 2;
31
32
zap(argc, argv);
33
}
34
catch
(
const
exception &error) {
35
FATAL
(error.what() << endl);
36
}
37
38
using namespace
JPP;
39
40
int
number_of_hits = 0;
41
42
for
(
int
n0 = npe; n0 != 0; ++number_of_hits) {
43
44
const
int
n1 =
getNumberOfPhotoElectrons
(n0);
45
46
cout << setw(3) << n1 <<
' '
<< flush;
47
48
n0 -= n1;
49
}
50
51
cout << endl;
52
cout <<
"number of hits "
<< number_of_hits << endl;
53
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1517
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JSIRENE::getNumberOfPhotoElectrons
struct JSIRENE::@63 getNumberOfPhotoElectrons
Auxiliary data structure for determination of number of photo-electrons.
JPrint.hh
I/O formatting auxiliaries.
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1993
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
JSireneToolkit.hh
Toolkit for JSirene.
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
Generated by
1.8.5