Jpp  debug
the software that should make you happy
JPMTStatus.hh
Go to the documentation of this file.
1 #ifndef __JDETECTOR__JPMTSTATUS__
2 #define __JDETECTOR__JPMTSTATUS__
3 
4 #include <string>
5 #include <vector>
6 #include <map>
7 
9 
10 #include "JLang/JType.hh"
11 #include "JLang/JVectorize.hh"
12 
13 #include "Jeep/JStatus.hh"
14 
15 
16 /**
17  * \author mdejong
18  */
19 
20 namespace JDETECTOR {}
21 namespace JPP { using namespace JDETECTOR; }
22 
23 namespace JDETECTOR {
24 
25  using JLANG::JType;
26  using JEEP::JStatus;
27  using JEEP::JPutStatusBit;
28  using JEEP::JGetStatusBit;
29 
30 
31  /**
32  * Auxiliary class to map key to PMT status bit.
33  */
35  public JGetStatusBit
36  {
37  /**
38  * Default constructor.
39  */
41  {
42 #define MAKE_ENTRY(A) std::make_pair(#A, A)
43 
44  this->insert(MAKE_ENTRY(PMT_DISABLE));
45  this->insert(MAKE_ENTRY(HIGH_RATE_VETO_DISABLE));
46  this->insert(MAKE_ENTRY(FIFO_FULL_DISABLE));
47  this->insert(MAKE_ENTRY(UDP_COUNTER_DISABLE));
48  this->insert(MAKE_ENTRY(UDP_TRAILER_DISABLE));
49  this->insert(MAKE_ENTRY(OUT_OF_SYNC));
50 
51 #undef MAKE_ENTRY
52  }
53  };
54 
55 
56  /**
57  * Type definition to map PMT status bit to key.
58  */
60 
61 
62  /**
63  * Function object to map key to PMT status bit.
64  */
66 
67 
68  /**
69  * Function object to map PMT status bit to key.
70  */
72 
73 
74  /**
75  * Get PMT status bits.
76  *
77  * \param type type
78  * \return status bits
79  */
81  {
83  }
84 
85 
86  /**
87  * Get PMT status bits.
88  *
89  * \param type type
90  * \return status bits
91  */
93  {
95  }
96 
97 
98  /**
99  * Get PMT status bits.
100  *
101  * \return status bits
102  */
103  template<class T>
105  {
106  return getPMTStatusBits(JType<T>());
107  }
108 }
109 
110 #endif
#define MAKE_ENTRY(A)
Auxiliary methods to convert data members or return values of member methods of a set of objects to a...
file Auxiliary data structures and methods for detector calibration.
Definition: JAnchor.hh:12
static const JGetPMTStatusBit getPMTStatusBit
Function object to map key to PMT status bit.
Definition: JPMTStatus.hh:65
JPutStatusBit JPutPMTStatusBit
Type definition to map PMT status bit to key.
Definition: JPMTStatus.hh:59
std::vector< T > getPMTStatusBits()
Get PMT status bits.
Definition: JPMTStatus.hh:104
static const JPutPMTStatusBit putPMTStatusBit(getPMTStatusBit)
Function object to map PMT status bit to key.
const array_type< JKey_t > & get_keys(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of keys of map.
Definition: JVectorize.hh:139
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static const int UDP_COUNTER_DISABLE
Enable (disable) use of UDP packet counter test if this status bit is 0 (1);.
Definition: pmt_status.hh:15
static const int UDP_TRAILER_DISABLE
Enable (disable) use of UDP packet trailer test if this status bit is 0 (1);.
Definition: pmt_status.hh:16
static const int FIFO_FULL_DISABLE
Enable (disable) use of FIFO (almost) full test if this status bit is 0 (1);.
Definition: pmt_status.hh:14
static const int OUT_OF_SYNC
Enable (disable) synchronous signal from this PMT if this status bit is 0 (1);.
Definition: pmt_status.hh:17
static const int HIGH_RATE_VETO_DISABLE
Enable (disable) use of high-rate veto test if this status bit is 0 (1);.
Definition: pmt_status.hh:13
static const int PMT_DISABLE
KM3NeT Data Definitions v3.4.0-8-ge14cb17 https://git.km3net.de/common/km3net-dataformat.
Definition: pmt_status.hh:12
Auxiliary class to map key to PMT status bit.
Definition: JPMTStatus.hh:36
JGetPMTStatusBit()
Default constructor.
Definition: JPMTStatus.hh:40
Auxiliary class to map key to status bit.
Definition: JStatus.hh:209
Auxiliary class to map status bit to key.
Definition: JStatus.hh:228
Auxiliary class for handling status.
Definition: JStatus.hh:39
Auxiliary class for a type holder.
Definition: JType.hh:19