23 #ifndef RestCore_TRestBiPoToSignalProcess
24 #define RestCore_TRestBiPoToSignalProcess
26 #include "TRestRawSignalEvent.h"
27 #include "TRestRawToSignalProcess.h"
29 constexpr
size_t CTAG_SZ = 4;
31 constexpr
int MATACQ_N_CH = 4;
32 constexpr
int MATACQ_MAX_DATA_SAMP = 10240;
33 constexpr
int MATACQ_BIPO_TIMEOUT = 0;
35 constexpr uint32_t MATACQ_UNDERFLOW = 0x0000;
36 constexpr uint32_t MATACQ_ZERO = 0x8000;
37 constexpr uint32_t MATACQ_OVERFLOW = 0xFFFF;
39 constexpr
char TAG_RUN_START[] =
"STA";
40 constexpr
char TAG_RUN_BIPO[] =
"ST2";
41 constexpr
char TAG_RUN_STOP[] =
"STO";
42 constexpr
char TAG_ACQ[] =
"ACQ";
43 constexpr
char TAG_ACQ_2[] =
"AC2";
53 std::array<int32_t, MATACQ_N_CH> en_ch;
54 std::array<int32_t, MATACQ_N_CH> trg_ch;
63 std::array<int32_t, MATACQ_N_CH> ch_shifts;
69 int32_t trigger_address;
71 int32_t Win1_Posttrig;
72 int32_t Timeout_200KHz;
74 std::array<int32_t, MATACQ_N_CH> Trig_Chan;
75 std::array<int32_t, MATACQ_N_CH> Level1_mV;
76 std::array<int32_t, MATACQ_N_CH> Level2_mV;
80 int32_t t1_t2_timeout;
103 Int_t
GetBin(Int_t boardIndex, Int_t channel, Int_t bin);
A base class for any REST event.
An process to read binary data from BiPo electronics.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
The main processing event function.
MatacqBoard GetMatacqBoard(Int_t n)
It gives access to a Matacq board confituration.
Int_t GetBin(Int_t boardIndex, Int_t channel, Int_t bin)
It returns the ordered channel value from the Matacq memory buffer for a given board,...
std::vector< BiPoSettings > fBiPoSettings
A vector of BiPo settings.
Int_t ReadBiPoEventData(std::vector< uint16_t > &mdata)
This method reads the event data corresponding to one event. The sampled channel data that will be ma...
void ReadBoard()
This method reads the settings of one of the Matacq boards.
void ReadFooter()
This method reads the header data containing the run timestamp, the number of Matacq boards,...
TRestRawBiPoToSignalProcess()
Default constructor.
Int_t fNBoards
The number of Matacq boards present on the setup.
void ReadHeader()
This method reads the header data containing the run timestamp, the number of Matacq boards,...
UInt_t GetBoardIndex(Int_t address)
It returns the std::vector storage index using the hardware address of the Matacq board.
BiPoSettings GetBiPoSettings(Int_t n)
It gives access to confituration of BiPo settings.
~TRestRawBiPoToSignalProcess()
Default destructor.
Int_t fEventCounter
A temporary counter used to define the event id.
std::vector< MatacqBoard > fMatacqBoard
A vector of Matacq boards that contain the information of each card.
void InitProcess() override
Process initialization. Data members that require initialization just before start processing should ...
void PrintMetadata() override
Prints out the Matacq boards configuration and BiPo setup.
void ReadBiPoSetup()
This method reads the header data corresponding to the BiPo settings of one card.
void Initialize() override
Function to initialize input/output event members and define the section name.
const char * GetProcessName() const override
Returs a given process name.
A base class for any process reading a binary external file as input to REST.
A structure to store the BiPo settings.
A structure to store the configuration settings of Matacq board.
int32_t address
The base memory address of the Matacq board.