pflib v3.12.0-1-g716e801
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
Elinks.h
1#ifndef pflib_Elinks_h_
2#define pflib_Elinks_h_
3
4#include <stdint.h>
5
6#include <vector>
7
8namespace pflib {
9
13class Elinks {
14 protected:
17 Elinks(int nlinks);
18
19 public:
23 int nlinks() const { return n_links; }
24
34 void markActive(int ilink, bool active) {
35 if (ilink < n_links && ilink >= 0) m_linksActive[ilink] = active;
36 }
37
44 bool isActive(int ilink) const {
45 return (ilink >= n_links || ilink < 0) ? (false) : (m_linksActive[ilink]);
46 }
47
56 virtual std::vector<uint32_t> spy(int ilink, bool new_capture) = 0;
57
64 virtual void setBitslip(int ilink, int bitslip) = 0;
65
72 virtual int scanBitslip(int ilink);
73
74 /*
75 * Get the bitslip value for a given link (word-level adjustment)
76 *
77 * @param[in] ilink link index
78 * @return value of bitslip
79 */
80 virtual int getBitslip(int ilink) = 0;
81
88 virtual uint32_t getStatusRaw(int ilink) = 0;
89
95 virtual void clearErrorCounters(int ilink) = 0;
96
105 virtual void readCounters(int link, uint32_t& nonidles, uint32_t& resyncs) {}
106
110 virtual void resetHard() = 0;
111
116 virtual int scanAlign(int ilink, bool debug = false);
117
123 virtual void setAlignPhase(int ilink, int iphase) {}
124
128 virtual int getAlignPhase(int ilink) { return -1; }
129
130 private:
135};
136
137// factories
138Elinks* get_Elinks_zcu();
139
140} // namespace pflib
141
142#endif // pflib_Elinks_h_
This version of the fast control code interfaces with the CMS Fast control library which can be contr...
Definition Backend.cxx:3