Jpp
15.0.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
software
JTrigger
JPrintTriggerBits.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
4
#include "
km3net-dataformat/online/JDAQTriggerMask.hh
"
5
6
#include "
JTrigger/JTriggerBits.hh
"
7
8
#include "
Jeep/JParser.hh
"
9
#include "
Jeep/JMessage.hh
"
10
11
12
/**
13
* \file
14
*
15
* Auxiliary program to print trigger bits.
16
* \author mdejong
17
*/
18
int
main
(
int
argc,
char
**argv)
19
{
20
using namespace
std;
21
using namespace
JPP;
22
using namespace
KM3NETDAQ;
23
24
int
debug
;
25
26
try
{
27
28
JParser<>
zap(
"Auxiliary program to print trigger bits."
);
29
30
zap[
'd'
] =
make_field
(
debug
) = 1;
31
32
zap(argc, argv);
33
}
34
catch
(
const
exception &error) {
35
FATAL
(error.what() << endl);
36
}
37
38
size_t
number_of_trigger_bits = 0;
39
40
for
(
size_t
i = 1; i <=
NUMBER_OF_TRIGGER_BITS
; ++i) {
41
42
const
char
*
const
buffer =
getTriggerName
(i);
43
44
if
(buffer != NULL) {
45
46
cout << (number_of_trigger_bits == 0 ?
""
:
" "
) << buffer;
47
48
++number_of_trigger_bits;
49
}
50
}
51
52
if
(number_of_trigger_bits != 0) {
53
cout << endl;
54
}
55
56
return
0;
57
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1500
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
KM3NETDAQ::NUMBER_OF_TRIGGER_BITS
static const unsigned int NUMBER_OF_TRIGGER_BITS
Number of trigger bits.
Definition:
JDAQTriggerMask.hh:27
JDAQTriggerMask.hh
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
JParser.hh
Utility class to parse command line options.
JTRIGGER::getTriggerName
const char * getTriggerName(JTriggerbit_t bit)
Get trigger name.
Definition:
JTriggerInterface.hh:231
JTriggerBits.hh
Setting of trigger bits.
Generated by
1.8.5