pflib v3.13.3-1-gf856638
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
TRIG.h
1#ifndef PFLIB_TRIG_H_INCLUDED
2#define PFLIB_TRIG_H_INCLUDED 1
3
4#include <stdint.h>
5
6#include <map>
7#include <string>
8#include <vector>
9
10namespace pflib {
11
20class TRIG {
21 public:
23 virtual void reset() {}
24
26 virtual int n_elinks() const = 0;
27
29 virtual void setup_alignment_capture(int delay) = 0;
30
32 virtual int get_alignment_capture() = 0;
33
36
38 virtual void set_bx_delay(int ilink, int delay) = 0;
39
41 virtual int get_bx_delay(int ilink) = 0;
42
47 void set_l1a_per_ror(int l1a_per_ror);
48 int get_l1a_per_ror() const;
49
50 virtual std::map<std::string, uint32_t> get_debug() { return {}; }
51
62 virtual void setup_daq(int pipeline, int econ_id, int samples_per_l1a,
63 int presamples) = 0;
64
66 virtual void get_daq_setup(int& pipeline, int& econ_id, int& samples_per_l1a,
67 int& presamples) = 0;
68
70 virtual bool is_sample_available() = 0;
71
74
80
88 virtual void setup_algo(const std::vector<uint32_t>& parameters) = 0;
89
92
94 virtual bool is_algo_output_available() = 0;
95
100
106
107 virtual bool get_enable_single_shot() = 0;
108 virtual int get_self_trigger_count() = 0;
109 virtual void enable_single_shot(bool enable = true) = 0;
110 virtual bool single_shot_fired() = 0;
111 virtual void reset_single_shot() = 0;
112
113 private:
114 int l1a_per_ror_{0};
115};
116
117} // namespace pflib
118
119#endif // PFLIB_TRIG_H_INCLUDED
Trigger path management interface.
Definition TRIG.h:20
std::vector< uint32_t > read_event()
Read l1a_per_ror() number of samples and concatenate them into the same buffer.
Definition TRIG.cxx:11
virtual void setup_alignment_capture(int delay)=0
Set up the alignment capture function.
virtual void setup_daq(int pipeline, int econ_id, int samples_per_l1a, int presamples)=0
Setup the data collection of raw trigger data path.
virtual std::vector< uint32_t > get_algo_setup()=0
get the trigger algorithm configuration
virtual void reset()
Reset the internals.
Definition TRIG.h:23
virtual int n_elinks() const =0
How many elinks are there?
virtual bool is_algo_output_available()=0
Is there trigger algorithm output data?
virtual int get_alignment_capture()=0
Get the alignment capture function.
virtual void setup_algo(const std::vector< uint32_t > &parameters)=0
configure the trigger algorithm
virtual void set_bx_delay(int ilink, int delay)=0
Set the BX delay for the given elink.
void set_l1a_per_ror(int l1a_per_ror)
Definition TRIG.cxx:7
virtual std::vector< uint32_t > read_algo_output_sample()=0
read the next sample of the output of the trigger algorithm
virtual std::vector< uint32_t > read_sample()=0
Read the next sample of raw trigger path data.
virtual bool is_sample_available()=0
Is there a sample available?
virtual int get_bx_delay(int ilink)=0
Get the BX delay for the given elink.
std::vector< uint32_t > read_algo_output()
read l1a_per_ror() number of samples of the algo output and concatenate them into the same buffer
Definition TRIG.cxx:25
virtual void get_daq_setup(int &pipeline, int &econ_id, int &samples_per_l1a, int &presamples)=0
get the data collection setup
virtual std::vector< uint32_t > read_capture_buffer(int ilink)=0
Read the capture block for the given elink.
This version of the fast control code interfaces with the CMS Fast control library which can be contr...
Definition Backend.cxx:3