ICP  1
Ievent.h
Go to the documentation of this file.
1 #ifndef IEVENT_H
2 #define IEVENT_H
3 
4 
7 
8 
10 struct DAEEventHeaderInfo
11 {
12  unsigned header_type : 4;
13  unsigned header_length : 5;
14  unsigned unused1 : 2;
15  unsigned bad_frame : 1;
16  unsigned unused2 : 1;
17  unsigned fifo_read_late : 1;
18  unsigned memory_wrap : 1;
19  unsigned frame_overflow : 1;
20  unsigned fifo_overflows : 16;
21 };
22 
23 
24  struct DAEEventHeaderVetos // 32bits
25  {
26  unsigned fifo : 1;
27  unsigned smp : 1;
28  unsigned unused4 : 2;
29  unsigned ts2_pulse : 1;
30  unsigned wrong_pulse : 1;
31  unsigned isis_slow : 1;
32  unsigned unused3 : 5;
33  unsigned external : 4;
34  unsigned unused2 : 8;
35  unsigned fast_chopper : 4;
36  unsigned unused1 : 4;
37  };
38 
39 
41 
42 static const int DAEEventHeaderFixedMarker = 0xffffffff;
43 
44 struct DAEEventHeader
45 {
46  uint32_t marker0;
47  uint32_t marker1;
49  uint32_t frame_number;
50  struct
51  {
52  uint32_t low;
53  uint32_t high;
54  } time;
55  struct
56  {
57  unsigned period : 23;
58  unsigned unused1 : 9;
59  };
60  uint32_t num_events;
61  struct
62  {
63  unsigned protons : 10;
64  unsigned unused : 22;
65  };
67 };
68 
69 
70 // POSLUT spectrum number and time channels from card. Should not see time_channel=0, first time_channel=1
71 struct DetectorEvent32
72 {
73  unsigned time_channel : 16;
74  unsigned spectrum : 16;
75 };
76 
77 
78 // for 32MHz timing, time is after frame sync in 31.25 ns steps
79 struct DetectorEvent64
80 {
81  unsigned position : 12;
82  unsigned dim : 4;
83  unsigned unused1 : 16;
84  unsigned time : 31;
85  unsigned unused2 : 1;
86 };
87 
88 namespace Ievent_conditions {
91  BOOST_STATIC_ASSERT(sizeof(DAEEventHeader) == 40);
94 }
95 
96 class Ievent
97 {
98 };
99 
100 #endif /* IEVENT_H
101  */
static const int DAEEventHeaderFixedMarker
Definition: Ievent.h:42
unsigned header_type
Definition: dae_events.h:10
uint32_t num_events
Definition: dae_events.h:60
Sutucture of an Event in DAE memory (32bits)
Definition: dae_events.h:8
uint32_t marker1
should always be DAEEventHeaderFixedMarker
Definition: dae_events.h:47
unsigned unused1
Definition: dae_events.h:88
unsigned dim
Definition: dae_events.h:87
unsigned unused
Definition: dae_events.h:64
fixed header marker for DAEEventHeader
Definition: dae_events.h:44
unsigned ts2_pulse
Definition: dae_events.h:27
DAEEventHeaderVetos vetos
Definition: dae_events.h:66
unsigned wrong_pulse
Definition: dae_events.h:28
unsigned memory_wrap
Definition: dae_events.h:16
unsigned period
Definition: dae_events.h:57
unsigned header_length
Definition: dae_events.h:11
unsigned unused2
Definition: dae_events.h:90
unsigned fast_chopper
Definition: dae_events.h:33
unsigned isis_slow
Definition: dae_events.h:29
unsigned frame_overflow
Definition: dae_events.h:17
unsigned time
Definition: dae_events.h:89
Definition: Ievent.h:96
unsigned protons
Definition: dae_events.h:63
unsigned fifo_overflows
Definition: dae_events.h:18
DAEEventHeaderInfo info
should be DAEEventHeaderMarker
Definition: dae_events.h:48
uint32_t marker0
Definition: dae_events.h:46
BOOST_STATIC_ASSERT(sizeof(DAEEventHeaderInfo)==4)
struct DAEEventHeader::DAETime time
unsigned unused1
Definition: dae_events.h:12
unsigned bad_frame
Definition: dae_events.h:13
unsigned time_channel
Definition: dae_events.h:78
uint32_t frame_number
Definition: dae_events.h:49
unsigned spectrum
Definition: dae_events.h:79
unsigned fifo_read_late
Definition: dae_events.h:15
uint32_t low
Definition: Ievent.h:52
uint32_t high
Definition: Ievent.h:53
DAEEventHeaderMarker
Definition: dae_events.h:38
unsigned position
Definition: dae_events.h:86
unsigned unused2
Definition: dae_events.h:14
unsigned unused1
Definition: dae_events.h:58