Example program to test module status bits.
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "JDetector/JModule.hh"
#include "JDetector/JModuleStatus.hh"
#include "Jeep/JStreamToolkit.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Example program to test module status bits.
- Author
- mdejong
Definition in file JModuleStatusBits.cc.
◆ main()
int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 20 of file JModuleStatusBits.cc.
21{
24
26
27 try {
28
29 JParser<> zap(
"Example program to test module status bits.");
30
32
33 zap(argc, argv);
34 }
35 catch(const exception &error) {
36 FATAL(error.what() << endl);
37 }
38
39
40 if (
debug >= debug_t) {
41 cout << "Module status bits: ";
42 writeObject(cout, getModuleStatusBits<string>()) << endl;
43 }
44
46
48
49 for (vector<int>::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
50
52
53 DEBUG(
"Set module status " << putModuleStatusBit(*i) << endl);
54
55 module.set(*i);
56
58 }
59
60 return 0;
61}
#define DEBUG(A)
Message macros.
#define ASSERT(A,...)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for a composite optical module.
bool has(const int bit) const
Test PMT status.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).