NAIA  1.0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
DAQ.h
Go to the documentation of this file.
1 
8 #ifndef NAIA_DAQ_H
9 #define NAIA_DAQ_H
10 
11 // gbatch headers
12 #ifdef ENABLE_PRODUCTION_CODE
13 #include "root.h"
14 #endif
15 
17 
18 #include "TObject.h"
19 
20 #include <array>
21 #include <bitset>
22 
23 namespace NAIA {
24 
32 class DAQData : public TObject {
33 public:
37  enum DAQError : short {
38  HWError = 0x1,
39  L3ProcError = 0x2,
40  L3RunError = 0x4,
41  L3EventError = 0x8,
43  BuildErrors = 0x20,
45  };
46 
47  // clang-format off
48  unsigned int DaqEventLength = 0;
49  std::bitset<8> DaqErrors = 0;
50  std::bitset<14> DaqReplyCodeErrors = 0;
51  std::bitset<24> DaqJinfRoomErrors = 0;
52  std::bitset<24> JRoomError = 0;
53  // clang-format on
54 
55  std::array<unsigned int, 4> JINJStatus;
56  std::array<unsigned int, 24> JLength;
57 
62  void Clear();
63 
64 #ifdef ENABLE_PRODUCTION_CODE
65  bool Fill(DaqEventR &daqevent);
66 #endif
67 
68  ClassDef(DAQData, 1)
69 };
70 
79 class DAQ : public OnDemandContainer<DAQ>, public DAQData {
80 public:
81  static const std::string BranchName;
82 
84 };
85 } // namespace NAIA
86 #endif
std::array< unsigned int, 4 > JINJStatus
JINJ-[0,1,2,3] status word.
Definition: DAQ.h:55
OnDemandContainer container class description.
void Clear()
Clear the container.
Definition: DAQ.cpp:6
std::bitset< 24 > JRoomError
Flag JINJ slaves with Room Errors.
Definition: DAQ.h:52
DAQ()
Definition: DAQ.h:83
Container class for DAQ info.
Definition: DAQ.h:32
Mixin class to add &quot;read-on-demand&quot; behavior to an existing container class.
unsigned int DaqEventLength
Event length in bytes.
Definition: DAQ.h:48
static const std::string BranchName
Definition: DAQ.h:81
std::bitset< 14 > DaqReplyCodeErrors
Bit array showing presence of errors in any of the JINJ slaves reply codes as described in Table 6...
Definition: DAQ.h:50
Accessor class for DAQ info.
Definition: DAQ.h:79
std::bitset< 24 > DaqJinfRoomErrors
Bit array word flagging jinfs with room error.
Definition: DAQ.h:51
DAQError
enum for describing error type, used in DaqErrors
Definition: DAQ.h:37
std::bitset< 8 > DaqErrors
Misc DAQ errors flags.
Definition: DAQ.h:49
std::array< unsigned int, 24 > JLength
Untruncated length in bytes of corresponding slave in JINJ block.
Definition: DAQ.h:56