pflib v2.7.0-1-gd371ab6a
Polarfire Interaction Library
Backend.h
1#ifndef PFLIB_BACKEND_H_
2#define PFLIB_BACKEND_H_
3
4#include <pflib/Exception.h>
5#include <stdint.h>
6#include <vector>
7
8namespace pflib {
9
16class Backend {
17public:
19 virtual void fc_sendL1A() = 0;
20
22 virtual void fc_linkreset() = 0;
23
25 virtual void fc_bufferclear() = 0;
26
28 virtual void fc_calibpulse() = 0;
29
31 virtual void fc_clear_run() { }
32
34 virtual void fc_setup_calib(int pulse_len, int l1a_offset) = 0;
35
37 virtual void fc_get_setup_calib(int& pulse_len, int& l1a_offset) = 0;
38
40 virtual void fc_read_counters(int& spill_count, int& header_occ, int& header_occ_max, int& event_count, int& vetoed_counter) { }
41
43 virtual void fc_advance_l1_fifo() { }
44
46 virtual void fc_enables_read(bool& ext_l1a, bool& ext_spill, bool& timer_l1a) { }
48 virtual void fc_enables(bool ext_l1a, bool ext_spill, bool timer_l1a) { }
49
51 virtual void fc_veto_setup_read(bool& veto_daq_busy, bool& veto_l1_occ, int& l1_occ_busy, int& l1_occ_ok) { }
53 virtual void fc_veto_setup(bool veto_daq_busy, bool veto_l1_occ, int l1_occ_busy, int l1_occ_ok) { }
54
56 virtual int fc_timer_setup_read() { return -1; }
58 virtual void fc_timer_setup(int usdelay) { }
59
61 virtual void daq_reset() = 0;
62
64 virtual void daq_advance_ptr() = 0;
65
67 virtual void daq_status(bool& full, bool& empty, int& nevents, int& next_event_size) = 0;
68
71
73 virtual void daq_setup_event_tag(int run, int day, int month, int hour, int min);
74};
75
76}
77
78#endif
Abstract interface for various backend manipulations.
Definition: Backend.h:16
virtual std::vector< uint32_t > daq_read_event()=0
read the aquired event and return it
virtual void daq_status(bool &full, bool &empty, int &nevents, int &next_event_size)=0
readout the daq status into the passed variables
virtual void fc_enables_read(bool &ext_l1a, bool &ext_spill, bool &timer_l1a)
check the enables for various trigger/spill sources
Definition: Backend.h:46
virtual void fc_veto_setup(bool veto_daq_busy, bool veto_l1_occ, int l1_occ_busy, int l1_occ_ok)
set the enables for various trigger/spill sources
Definition: Backend.h:53
virtual void fc_get_setup_calib(int &pulse_len, int &l1a_offset)=0
calib pulse setup
virtual void daq_advance_ptr()=0
advance the daq pointer along buffer
virtual void fc_timer_setup(int usdelay)
set the period in us for the timer trigger
Definition: Backend.h:58
virtual int fc_timer_setup_read()
get the period in us for the timer trigger
Definition: Backend.h:56
virtual void fc_clear_run()
reset counters for a new run
Definition: Backend.h:31
virtual void fc_linkreset()=0
send a link reset
virtual void fc_bufferclear()=0
send a single L1A
virtual void fc_advance_l1_fifo()
advance the FC fifo
Definition: Backend.h:43
virtual void fc_enables(bool ext_l1a, bool ext_spill, bool timer_l1a)
set the enables for various trigger/spill sources
Definition: Backend.h:48
virtual void fc_calibpulse()=0
send a single calib pulse
virtual void fc_veto_setup_read(bool &veto_daq_busy, bool &veto_l1_occ, int &l1_occ_busy, int &l1_occ_ok)
check the setup for various busy/veto
Definition: Backend.h:51
virtual void daq_reset()=0
reset the daq buffers
virtual void fc_sendL1A()=0
send a single L1A
virtual void fc_setup_calib(int pulse_len, int l1a_offset)=0
calib pulse setup
virtual void daq_setup_event_tag(int run, int day, int month, int hour, int min)
Set the event tagging information.
Definition: Backend.cxx:5
virtual void fc_read_counters(int &spill_count, int &header_occ, int &header_occ_max, int &event_count, int &vetoed_counter)
read counters from the FC side
Definition: Backend.h:40
Polarfire Interaction Library.
Definition: Backend.h:8