pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
FastControl.h
1#ifndef PFLIB_FastControl_H_
2#define PFLIB_FastControl_H_
3
4#include <cstdint>
5#include <map>
6#include <string>
7#include <vector>
8
9namespace pflib {
10
15 public:
16 FastControl() : l1a_per_ror_{1} {}
17
22
26 virtual void resetCounters() {}
27
32 virtual void standard_setup() {}
33
35 virtual void sendL1A() = 0;
36
38 virtual void sendROR() {
39 for (int i = 0; i < l1a_per_ror_; i++) sendL1A();
40 }
41
43 virtual void setL1AperROR(int n) { l1a_per_ror_ = n; }
44
46 virtual int getL1AperROR() { return l1a_per_ror_; }
47
49 virtual void linkreset_rocs() = 0;
50
52 virtual void bx_custom(int bx_addr, int bx_mask, int bx_new) = 0;
53
55 virtual void linkreset_econs() {};
56
58 virtual void bufferclear() = 0;
59
60 // Josh
61 virtual void orbit_count_reset() = 0;
62
64 virtual void chargepulse() = 0;
65
67 virtual void ledpulse() = 0;
68
70 virtual void clear_run() {}
71
73 virtual void fc_setup_link_reset(int bx) {}
74
76 virtual void fc_get_setup_link_reset(int& bx) {}
77
79 virtual void fc_setup_calib(int charge_to_l1a) {}
80
82 virtual int fc_get_setup_calib() { return -1; }
83
85 virtual void fc_setup_led(int charge_to_l1a) {}
86
88 virtual int fc_get_setup_led() { return -1; }
89
91 virtual void read_counters(int& spill_count, int& header_occ,
92 int& event_count, int& vetoed_counter) {}
93
95 virtual void fc_enables_read(bool& l1a_overall, bool& ext_l1a) {}
96
98 virtual void fc_enables(bool l1a_overall, bool ext_l1a) {}
99
101 virtual int fc_timer_setup_read() { return -1; }
102
104 virtual void fc_timer_setup(int usdelay) {}
105
106 protected:
107 int l1a_per_ror_;
108};
109
110// factories
111FastControl* make_FastControlCMS_MMap();
112
113} // namespace pflib
114
115#endif // PFLIB_FastControl_H_
Representation of FastControl controller.
Definition FastControl.h:14
virtual void chargepulse()=0
send a single calib pulse
virtual void setL1AperROR(int n)
set the number of L1A per ROR
Definition FastControl.h:43
virtual void fc_setup_calib(int charge_to_l1a)
calib pulse setup
Definition FastControl.h:79
virtual void read_counters(int &spill_count, int &header_occ, int &event_count, int &vetoed_counter)
read counters from the FC side
Definition FastControl.h:91
virtual int fc_get_setup_calib()
calib pulse setup (charge to l1a time)
Definition FastControl.h:82
virtual std::map< std::string, uint32_t > getCmdCounters()=0
Get the counters for all the different fast control commands.
Definition FastControl.cxx:20
virtual void orbit_count_reset()=0
send a orbit count reset
virtual void fc_enables(bool l1a_overall, bool ext_l1a)
set the enables for various trigger/spill sources
Definition FastControl.h:98
virtual void sendROR()
send a single ROR
Definition FastControl.h:38
virtual void resetCounters()
clear the counters
Definition FastControl.h:26
virtual void fc_timer_setup(int usdelay)
set the period in us for the timer trigger
Definition FastControl.h:104
virtual void fc_get_setup_link_reset(int &bx)
setup the link reset timing
Definition FastControl.h:76
virtual void bufferclear()=0
send a buffer clear
virtual void standard_setup()
Do standard setup for FastControl interface e.g.
Definition FastControl.h:32
virtual int getL1AperROR()
get the number of L1A per ROR
Definition FastControl.h:46
virtual void clear_run()
reset counters for a new run
Definition FastControl.h:70
virtual void linkreset_rocs()=0
send a link reset
virtual void fc_setup_link_reset(int bx)
setup the link reset timing
Definition FastControl.h:73
virtual void fc_setup_led(int charge_to_l1a)
led pulse setup
Definition FastControl.h:85
virtual void ledpulse()=0
send a single calib pulse
virtual void fc_enables_read(bool &l1a_overall, bool &ext_l1a)
check the enables for various trigger/spill sources
Definition FastControl.h:95
virtual void bx_custom(int bx_addr, int bx_mask, int bx_new)=0
set custom bunch crossing ???? for what???
virtual int fc_timer_setup_read()
get the period in us for the timer trigger
Definition FastControl.h:101
virtual void linkreset_econs()
send a link reset to the ECONs
Definition FastControl.h:55
virtual int fc_get_setup_led()
led pulse setup (charge to l1a time)
Definition FastControl.h:88
virtual void sendL1A()=0
send a single L1A
This version of the fast control code interfaces with the CMS Fast control library which can be contr...
Definition Backend.cxx:3