Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JTrigger
JTriggerMask.cc
Go to the documentation of this file.
1
2
#include <string>
3
#include <iostream>
4
#include <iomanip>
5
6
#include "
km3net-dataformat/online/JDAQTriggerMask.hh
"
7
#include "
JTrigger/JTriggerBits.hh
"
8
9
#include "
Jeep/JParser.hh
"
10
#include "
Jeep/JMessage.hh
"
11
12
13
/**
14
* \file
15
*
16
* Example program to test I/O of trigger mask.
17
* \author mdejong
18
*/
19
int
main
(
int
argc,
char
**argv)
20
{
21
using namespace
std;
22
using namespace
KM3NETDAQ;
23
24
JDAQTriggerMask
trigger_mask;
25
int
debug
;
26
27
try
{
28
29
JParser<>
zap(
"Example program to test I/O of trigger mask."
);
30
31
zap[
'T'
] =
make_field
(trigger_mask);
32
zap[
'd'
] =
make_field
(
debug
) = 0;
33
34
zap(argc, argv);
35
}
36
catch
(
const
exception& error) {
37
FATAL
(error.what() << endl);
38
}
39
40
41
using namespace
JPP;
42
43
44
cout << trigger_mask.getTriggerMask() << endl;
45
cout << trigger_mask << endl;
46
47
cout << setw(16) << left <<
"JTrigger3DMuon"
<<
' '
<< trigger_mask.hasTriggerBit(getTriggerBit<JTrigger3DMuon>()) << endl;
48
cout << setw(16) << left <<
"JTrigger3DShower"
<<
' '
<< trigger_mask.hasTriggerBit(getTriggerBit<JTrigger3DShower>()) << endl;
49
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1493
KM3NETDAQ::JDAQTriggerMask
Auxiliary class for trigger mask.
Definition:
JDAQTriggerMask.hh:48
JDAQTriggerMask.hh
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1954
debug
int debug
debug level
Definition:
JSirene.cc:61
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
JTriggerBits.hh
Setting of trigger bits.
main
int main(int argc, char *argv[])
Definition:
Main.cpp:15
Generated by
1.8.5