pflib v3.9.0-rc3-11-g2537d8f
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
54 virtual std::vector<uint32_t> spy(int ilink) = 0;
55
62 virtual void setBitslip(int ilink, int bitslip) = 0;
63
70 virtual int scanBitslip(int ilink);
71
72 /*
73 * Get the bitslip value for a given link (word-level adjustment)
74 *
75 * @param[in] ilink link index
76 * @return value of bitslip
77 */
78 virtual int getBitslip(int ilink) = 0;
79
86 virtual uint32_t getStatusRaw(int ilink) = 0;
87
93 virtual void clearErrorCounters(int ilink) = 0;
94
103 virtual void readCounters(int link, uint32_t& nonidles, uint32_t& resyncs) {}
104
108 virtual void resetHard() = 0;
109
114 virtual int scanAlign(int ilink, bool debug = false);
115
121 virtual void setAlignPhase(int ilink, int iphase) {}
122
126 virtual int getAlignPhase(int ilink) { return -1; }
127
128 private:
133};
134
135// factories
136Elinks* get_Elinks_zcu();
137
138} // namespace pflib
139
140#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