Hardware Link (caen.readout)
caen.readout
Binary MBLT buffer decoding for CAEN DT5780 DPP-PHA Board and Channel Aggregates.
Board_Aggregate
Decoder for the 4-word DPP-PHA Board Aggregate header.
Validates the 0xA magic header nibble and board-fail status bit, and
extracts aggregate size, counter, and active channel mask.
Attributes:
| Name | Type | Description |
|---|---|---|
consistent |
bool
|
|
AggrSize |
int
|
Total Board Aggregate size in 32-bit words. |
AggrCntr |
int
|
23-bit sequential aggregate counter. |
Channels |
list[int]
|
Active channel indices present in this aggregate (e.g., |
Source code in caen/readout.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
Channel_Aggregate
Decoder for the 2-word DPP-PHA Channel Aggregate header.
Parses format flags (dual trace, waveform, energy, time-tag presence), waveform sample count, and derives the number of events in the block.
Attributes:
| Name | Type | Description |
|---|---|---|
consistent |
bool
|
|
SZ |
int
|
Channel payload size in 32-bit words (excluding the 2-word header). |
DT |
int
|
Dual-trace mode flag ( |
WF |
int
|
Waveform recording enabled flag. |
EN |
int
|
Energy word enabled flag. |
TT |
int
|
Time-tag word enabled flag. |
NS |
int
|
Number of 32-bit waveform sample pairs per event. |
NumEvents |
int
|
Number of complete events in this channel aggregate. |
EventSize |
int
|
Size of a single event record in 32-bit words. |
Source code in caen/readout.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
Event
Decoder for a single DPP-PHA event record within a Channel Aggregate.
Extracts the 30-bit hardware trigger timestamp, optional dual analog/digital
oscilloscope traces, full 15-bit energy amplitude, and 12-bit EXTRAS flags.
Attributes:
| Name | Type | Description |
|---|---|---|
KEYS |
tuple[str, ...]
|
Bit-ordered labels for the 12-bit |
AT |
tuple[list[int], list[int]]
|
Decoded analog trace samples |
DT |
tuple[list[int], list[int]]
|
Decoded digital virtual probe samples |
TimeTag |
int
|
30-bit trigger timestamp in clock ticks. |
Energy |
int
|
15-bit pulse height ( |
Extras |
int
|
12-bit |
Source code in caen/readout.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
ReadOut(device, DEBUG=True)
Read an MBLT data block from the digitizer and decode all channel events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device |
TheBoard
|
Connected digitizer instance with an active |
required |
DEBUG |
bool
|
Print diagnostic messages on malformed aggregates or truncated blocks. |
True
|
Returns:
| Type | Description |
|---|---|
tuple[list, list] | None
|
Two-element tuple |
Source code in caen/readout.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |