Jpp
18.3.1
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
JDetector
JModuleAddressMap.cc
Go to the documentation of this file.
1
2
#include <string>
3
#include <iostream>
4
#include <iomanip>
5
6
#include "
km3net-dataformat/online/JDAQ.hh
"
7
#include "
JDetector/JDetectorAddressMap.hh
"
8
#include "
JDetector/JDetectorSupportkit.hh
"
9
10
#include "
Jeep/JParser.hh
"
11
#include "
Jeep/JMessage.hh
"
12
13
14
/**
15
* \file
16
*
17
* Example program to print PMT logical addressing.
18
* \author mdejong
19
*/
20
int
main
(
int
argc,
char
**argv)
21
{
22
using namespace
std;
23
24
int
detectorID;
25
int
moduleID;
26
int
debug
;
27
28
try
{
29
30
JParser<>
zap(
"Example program to print PMT logical addressing."
);
31
32
zap[
'D'
] =
make_field
(detectorID);
33
zap[
'M'
] =
make_field
(moduleID) = -1;
34
zap[
'd'
] =
make_field
(
debug
) = 0;
35
36
zap(argc, argv);
37
}
38
catch
(
const
exception &error) {
39
FATAL
(error.what() << endl);
40
}
41
42
43
using namespace
JPP;
44
45
if
(!
hasDetectorAddressMap
(detectorID)) {
46
FATAL
(
"No detector address map for detector identifier "
<< detectorID << endl);
47
}
48
49
const
JDetectorAddressMap& demo =
getDetectorAddressMap
(detectorID);
50
const
JModuleAddressMap& memo = demo.get(moduleID);
51
52
for
(JModuleAddressMap::const_iterator
i
= memo.begin();
i
!= memo.end(); ++
i
) {
53
cout <<
i
->toString(
"TDC[%] = %%"
) << endl;
54
}
55
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JDETECTOR::hasDetectorAddressMap
bool hasDetectorAddressMap(const int id)
Check if detector address map is available.
Definition:
JDetectorSupportkit.hh:682
JDetectorAddressMap.hh
i
then rm i
Definition:
JEvtReweightMupageParameterScan.sh:309
JDetectorSupportkit.hh
Detector support kit.
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
JDETECTOR::getDetectorAddressMap
JDetectorAddressMap & getDetectorAddressMap()
Get detector address map.
Definition:
JDetectorSupportkit.hh:524
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
JDAQ.hh
KM3NeT DAQ constants, bit handling, etc.
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
Generated by
1.8.5