|
epic-drich-beam-test-analysis
ePIC dRICH beam test analysis framework
|
First-level I/O helper class from the ALCOR decoder. More...
#include <alcor_data.h>
Public Member Functions | |
Constructors | |
| alcor_data ()=default | |
| Default constructor — all fields left uninitialised. | |
| alcor_data (const alcor_data_struct &data_struct) | |
| Construct from a pre-filled storage struct. | |
| alcor_data (int device, int fifo, int type, int counter, int column, int pixel, int tdc, int rollover, int coarse, int fine, uint32_t mask) | |
| Construct field-by-field. | |
Raw field getters | |
| alcor_data_struct | get_data_struct () const |
| Return a copy of the underlying storage struct. | |
| int | get_device () const |
| Device ID (192+) | |
| int | get_fifo () const |
| FIFO number. | |
| int | get_type () const |
| Hit type — see alcor_hit_struct. | |
| int | get_counter () const |
| Event counter. | |
| int | get_column () const |
| Column address (0–7) | |
| int | get_pixel () const |
| Pixel address (0–3) | |
| int | get_tdc () const |
| TDC sub-channel (0–3) | |
| int | get_rollover () const |
| Rollover count. | |
| int | get_coarse () const |
| Coarse timestamp (cc within rollover) | |
| int | get_fine () const |
| Raw fine-time bin. | |
| uint32_t | get_mask () const |
| Processing flag bit-mask — see hit_mask. | |
Derived getters | |
Computed from the raw fields — not stored in the struct. | |
| int | get_chip () const |
| Chip number on the device (FIFO / 4) | |
| int | get_eo_channel () const |
| Even/odd channel index within the chip. | |
| int | get_calib_index () const |
| Calibration look-up index (TDC + channel + chip encoding) | |
| int | get_device_index () const |
| Flat per-device pixel index used for mapping. | |
| int | get_global_index () const |
| Packed global index encoding device, chip, channel, and TDC. | |
| int | get_global_tdc_index () const |
| Alias for get_global_index(); preferred in new code. | |
| uint64_t | get_coarse_global_time () const |
| Global coarse time including rollovers. | |
Setters | |
| void | set_data_struct_copy (alcor_data_struct input_data) |
Copy input_data into internal storage. | |
| void | set_data_struct_linked (alcor_data_struct &input_data) |
| Link internal storage to an external struct (no copy) | |
| void | set_device (int val) |
| Set device ID. | |
| void | set_fifo (int val) |
| Set FIFO number. | |
| void | set_type (int val) |
| Set hit type. | |
| void | set_counter (int val) |
| Set event counter. | |
| void | set_column (int val) |
| Set column address. | |
| void | set_pixel (int val) |
| Set pixel address. | |
| void | set_tdc (int val) |
| Set TDC sub-channel. | |
| void | set_rollover (int val) |
| Set rollover count. | |
| void | set_coarse (int val) |
| Set coarse timestamp. | |
| void | set_fine (int val) |
| Set fine-time bin (signed) | |
| void | set_fine (uint32_t val) |
| Set fine-time bin (unsigned overload) | |
| void | set_mask (uint32_t val) |
| Replace the hit mask. | |
Comparison operators | |
Order hits by global coarse time (ascending). | |
| bool | operator< (const alcor_data &c) const |
| bool | operator<= (const alcor_data &c) const |
| bool | operator> (const alcor_data &c) const |
| bool | operator>= (const alcor_data &c) const |
Hit-type predicates | |
| bool | is_alcor_hit () const |
| True if this is a normal TDC hit. | |
| bool | is_trigger_tag () const |
| True if this is a trigger-tag word. | |
| bool | is_start_spill () const |
| True if this marks the start of a spill. | |
| bool | is_end_spill () const |
| True if this marks the end of a spill. | |
Time utilities | |
| int | coarse_time_clock () const |
| Coarse time in clock counts (rollover × 32 768 + coarse) | |
| double | coarse_time_ns () const |
| Coarse time converted to nanoseconds (× 3.125 ns/cc) | |
Mask utilities | |
| void | add_mask (uint32_t new_mask) |
OR new_mask into the current hit mask. | |
| void | add_mask_bit (int new_mask) |
Set a single bit at position new_mask in the hit mask. | |
ROOT TTree I/O | |
| void | link_to_tree (TTree *input_tree) |
| Link internal members to branches of an input TTree. | |
| void | write_to_tree (TTree *output_tree) |
| Write current data as branches to an output TTree. | |
First-level I/O helper class from the ALCOR decoder.
This class wraps alcor_data_struct and provides:
The internal storage can either be copied or linked, depending on how the setters are used.
|
inline |
Global coarse time including rollovers.
| void alcor_data::link_to_tree | ( | TTree * | input_tree | ) |
Link internal members to branches of an input TTree.
| input_tree | Pointer to an existing TTree |
| void alcor_data::write_to_tree | ( | TTree * | output_tree | ) |
Write current data as branches to an output TTree.
| output_tree | Pointer to the output TTree |