Main Level#
Trigger Logic Unit#
- class aidatlu.main.tlu.AidaTLU(hw, config_dict, clock_config_path, i2c=<class 'aidatlu.hardware.i2c.I2CCore'>)[source]#
-
- handle_status() None[source]#
Status message handling in separate thread. Calculates run time and obtain trigger information and sent it out every second.
- init_raw_data_table() None[source]#
Initializes the raw data table, where the raw FIFO data is found.
- log_sent_status(time: int) None[source]#
- Logs the status of the TLU run with runtime, pre- and post-veto numbers/rates.
Also calculates the mean trigger frequency between function calls.
- Parameters:
time (int) – current runtime of the TLU
- log_trigger_inputs(event_vector: list) None[source]#
Logs which inputs triggered the event corresponding to the event vector.
- Parameters:
event_vector (list) – 6 data long event vector from the FIFO.
- run_loop() None[source]#
A single instance of the run loop. In a TLU run this function needs to be called repeatedly.
- Raises:
KeyboardInterrupt – The run loop can be interrupted when raising a KeyboardInterrupt.
Configuration parser#
Data interpretation#
- aidatlu.main.data_parser.interpret_data(filepath_in: str | Path, filepath_out: str | Path = None, chunk_size: int = 1000000) None[source]#
Interprets raw tlu data. The data is interpreted in chunksizes. The data is parsed form filepath_in to filepath_out. An event consists of six consecutive raw data entries the last entry should be always 0. The raw data is sliced and the last data entry checked for corrupted data.
- Parameters:
filepath_in (str | Path) – raw data file path as string or Path object
filepath_out (str | Path) – output path of the interpreted data as string or Path object