WIP: Create base class for event data for each of the front ends
What
This MR adds a few classes to libYarr
that are more or less analogous to their counterparts in the current libFei4
structures for handling the front-end hit data:
New Class/Structure |
libFei4 counterpart |
---|---|
FrontEndData |
Fei4Data |
FrontEndEvent |
Fei4Event |
FrontEndHit |
Fei4Hit |
The FrontEndData
class derives from EventDataBase
, as with Fei4Data
.
The aim is for the above FrontEnd*
classes to provide the same interface to the user as the current libFei4
counterparts, so that they can be easily switched (and the libFei4
ones removed).
The secondary aim is for the separate front-end libraries (e.g. libRd53b
) to be able to implement their own structures that derive from the FrontEnd*
ones above if they need to implement front-end specific functionality. If they do not, then they can use the libYarr/FrontEnd*
data structures directly.
An example of a front-end deriving from these classes is provided for in this MR for libRd53b
, which implements Rd53bData
, Rd53bEvent
, and Rd53bHit
. Overriding the virtual methods in libYarr/FrontEnd*
allows for customizing the reading/writing from binary/file for each front-end if there are specifics, as well as adding additional data fields. For example, the Rd53bHit
class derives from FrontEndHit
and adds two new fields for ptot
and ptoa
.
In this MR I have replaced the use of libFei4
from libRd53b
by replacing the data structures in Rd53bDataProcessor
with the Rd53b
implementations of FrontEndHit
.