pflib v3.14.3-4-g3289bd3
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 reset_alignment() = 0;
30
32 virtual void setup_alignment(int delay, uint16_t pattern,
33 uint8_t elinks_to_ignore,
34 bool bypass_pattern) = 0;
35
37 virtual void get_alignment_setup(int& delay, uint16_t& pattern,
38 uint8_t& elinks_to_ignore,
39 bool& bypass_pattern) = 0;
40
43
48 void set_l1a_per_ror(int l1a_per_ror);
49 int get_l1a_per_ror() const;
50
51 virtual std::map<std::string, uint32_t> get_debug() { return {}; }
52
63 virtual void setup_daq(int pipeline, int econ_id, int samples_per_l1a,
64 int presamples) = 0;
65
67 virtual void get_daq_setup(int& pipeline, int& econ_id, int& samples_per_l1a,
68 int& presamples) = 0;
69
71 virtual bool is_sample_available() = 0;
72
75
81
89 virtual void setup_algo(const std::vector<uint32_t>& parameters) = 0;
90
93
95 virtual bool is_algo_output_available() = 0;
96
101
107
108 virtual bool get_enable_single_shot() = 0;
109 virtual int get_self_trigger_count() = 0;
110 virtual void enable_single_shot(bool enable = true) = 0;
111 virtual bool single_shot_fired() = 0;
112 virtual void reset_single_shot() = 0;
113
114 private:
115 int l1a_per_ror_{0};
116};
117
118} // namespace pflib
119
120#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(int delay, uint16_t pattern, uint8_t elinks_to_ignore, bool bypass_pattern)=0
Set up the alignment.
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 void get_alignment_setup(int &delay, uint16_t &pattern, uint8_t &elinks_to_ignore, bool &bypass_pattern)=0
Get the alignment setup.
virtual bool is_algo_output_available()=0
Is there trigger algorithm output data?
virtual void setup_algo(const std::vector< uint32_t > &parameters)=0
configure the trigger algorithm
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 void reset_alignment()=0
reset the aligner block
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