EudaqNativeWriter Satellite#
A satellite that receives data and writes it to EUDAQ2 native binary formatted files
This satellite receives data from other satellites and encodes them in the EUDAQ2 native binary file format. The satellite can be used for compatibility when using analysis software that interfaces EUDAQ2 for decoding data.
Since Constellation and EUDAQ2 data transmission formats are slightly different, there are two BOR tags which sending satellites should set in order to ensure the data can be correctly decoded:
The sending satellite should set the
eudaq_event
BOR tag to a string describing the EUDAQ2 event type to be used for encoding, for exampleTluRawDataEvent
for data sent by the AIDA TLU. If this tag is not set, the satellite falls back to using the name portion of the canonical name of the sender. This can be used to improve interoperability of satellites which do not set these tags explicitly.EUDAQ2 knows data blocks per event as well as sub-events, while Constellation data messages always consist of a header followed by any number of frames. In order to encode this data correctly to EUDAQ2 native binary format, the sending satellite should specify if the Constellation data frames should be interpreted as as individual data blocks or as sub-events in the resulting EUDAQ2 native binary event by setting the BOR tag
frames_as_blocks
to eithertrue
orfalse
, respectively. If the tag is not provided, this satellite defaults to interpreting them as sub-events, repeating the message header for all of the attached frames.
BOR and EOR messages which arrive before the start of a run and after its end are treated differently from regular data messages. The corresponding EUDAQ events are marked as BORE and EORE, respectively. The header of the EUDAQ event will contain the payload frame of the corresponding Constellation message, which is the satellite configuration for the BOR message and the run metadata for the EOR message. The additional header tags of the Constellation messages are not stored but only used for configuration of the serializer as described above.
The data events can contain the following header flags which will be interpreted and translated to the corresponding EUDAQ flags or event configurations:
flag_trigger
(boolean): if this flag is set totrue
, the corresponding EUDAQFLAG_TRIG
is set on the event. This will cause analysis software to treat the information as trigger information, i.e. use the trigger number and timestamp as compound information. This flag is necessary e.g. for the AIDA TLU.trigger_number
(integer): If set, the trigger number of the current EUDAQ event will be set from this, if not set the Constellation message sequence is used instead.timestamp_begin
(integer): Timestamp of the event start in units of picoseconds. If the tag is available from the Constellation message header, the value will be translated to nanoseconds and stored as EUDAQ event timestamp. If the tag is not set,0
will be set as timestamp. This prompts analysis software to use the trigger number instead.timestamp_begin
(integer): Timestamp of the event end in units of picoseconds. If the tag is available from the Constellation message header, the value will be translated to nanoseconds and stored as EUDAQ event timestamp. If the tag is not set,0
will be set as timestamp. This prompts analysis software to use the trigger number instead.
Note
It should be noted that this satellite requires the sending satellites to receive data from to be configured via the
_data_transmitters
parameter, just as any Constellation receiver satellite deriving from the
ReceiverSatellite
class.
Messages from all sending satellites are written into the output file sequentially in the order in which they arrive.
Output files are stored under the path provided via the output_path
parameter and are named data_<run_identifier>.raw
where <run_identifier>
is the identifier of the corresponding run.
Building#
This satellite does not have any external dependencies and is therefore built by default. Should this not be desired can the build be deactivated via
meson configure build -Dsatellite_eudaq_native_writer=false
Parameters#
Parameter |
Type |
Description |
Default Value |
---|---|---|---|
|
Bool |
Switch whether overwriting files is allowed or not. If set to |
|
|
String |
Base path to which to write output files to |
- |
|
Integer |
Interval in seconds in which data should be flushed to disk |
3 |
Framework Parameters#
This satellite inherits the following framework parameters from its base classes:
Parameters inherited from ReceiverSatellite
#
Parameter |
Type |
Description |
Default Value |
---|---|---|---|
|
List of strings |
List of canonical names of transmitter satellites this receiver should connect to and receive data messages from. |
- |
|
Unsigned integer |
Timeout waiting for the reception of the end-of-run message. The receiver satellite will wait this number of seconds for receiving the EOR message from each connected transmitter satellite, and will go into error state if the message has not been received within this period. The timeout will only be started after the pending data messages have been read from the queue. |
|
Parameters inherited from Satellite
#
Parameter |
Type |
Description |
Default Value |
---|---|---|---|
|
Bool |
If |
|
|
Unsigned integer |
Interval in seconds between heartbeats to be sent to other Constellation components |
|