Jpp
15.0.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
JDetector
getPMT.cc
Go to the documentation of this file.
1
#include <string>
2
#include <iostream>
3
#include <iomanip>
4
5
#include "
JDetector/JDetector.hh
"
6
#include "
JDetector/JDetectorToolkit.hh
"
7
#include "
JDetector/JPMTChannel.hh
"
8
9
#include "
Jeep/JParser.hh
"
10
#include "
Jeep/JMessage.hh
"
11
12
13
/**
14
* \file
15
*
16
* Auxiliary program to print PMT data for a given PMT channel.
17
* \author mdejong
18
*/
19
int
main
(
int
argc,
char
**argv)
20
{
21
using namespace
std;
22
using namespace
JPP;
23
24
string
detectorFile;
25
JPMTChannel
channel;
26
int
debug
;
27
28
try
{
29
30
JParser<>
zap(
"Auxiliary program to print PMT data for a given PMT channel."
);
31
32
zap[
'a'
] =
make_field
(detectorFile);
33
zap[
'P'
] =
make_field
(channel) =
JPMTChannel
();
34
zap[
'd'
] =
make_field
(
debug
) = 1;
35
36
zap(argc, argv);
37
}
38
catch
(
const
exception &error) {
39
FATAL
(error.what() << endl);
40
}
41
42
43
JDetector
detector
;
44
45
try
{
46
load
(detectorFile,
detector
);
47
}
48
catch
(
const
JException
& error) {
49
FATAL
(error);
50
}
51
52
if
(channel !=
JPMTChannel
()) {
53
54
cout <<
detector
.getModule(channel.getLocation()).getPMT(channel.getTDC()) << endl;
55
56
}
else
{
57
58
while
(cin >> channel && channel !=
JPMTChannel
()) {
59
cout <<
detector
.getModule(channel.getLocation()).getPMT(channel.getTDC()) << endl;
60
}
61
}
62
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1500
JLANG::JException
General exception.
Definition:
JException.hh:23
JDETECTOR::JPMTChannel
Auxiliary class to uniquely identify PMT readout channel.
Definition:
JPMTChannel.hh:30
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JPMTChannel.hh
Data structure to uniquely identify PMT readout channel.
JDETECTOR::JDetector
Detector data structure.
Definition:
JDetector.hh:89
JDetector.hh
Data structure for detector geometry and calibration.
JAANET::detector
Detector file.
Definition:
JHead.hh:196
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1961
debug
int debug
debug level
Definition:
JSirene.cc:63
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JDETECTOR::load
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
Definition:
JDetectorToolkit.hh:475
JParser.hh
Utility class to parse command line options.
JDetectorToolkit.hh
detector
do set_variable DETECTOR_TXT $WORKDIR detector
Definition:
detector-XY:fit1d.sh:38
Generated by
1.8.5