CMS 3D CMS Logo

L1GtPsbConfig.cc
Go to the documentation of this file.
1 
17 // this class header
19 
20 // system include files
21 #include <iostream>
22 #include <iomanip>
23 
24 // user include files
25 // base class
26 
27 // forward declarations
28 
29 // constructors
31  m_gtBoardSlot = -1;
32 
33  m_gtPsbCh0SendLvds = false;
34  m_gtPsbCh1SendLvds = false;
35 
38 }
39 
40 // constructor using board slot
41 L1GtPsbConfig::L1GtPsbConfig(const int& psbSlot) : m_gtBoardSlot(psbSlot) {
42  m_gtPsbCh0SendLvds = false;
43  m_gtPsbCh1SendLvds = false;
44 
47 }
48 
49 // destructor
51  // empty
52 }
53 
54 // copy constructor
57 
60 
63 }
64 
65 // assignment operator
67  if (this != &gtb) {
69 
72 
75  }
76 
77  return *this;
78 }
79 
80 // equal operator
81 bool L1GtPsbConfig::operator==(const L1GtPsbConfig& gtb) const {
82  if (m_gtBoardSlot != gtb.m_gtBoardSlot) {
83  return false;
84  }
85 
87  return false;
88  }
89 
91  return false;
92  }
93 
95  return false;
96  }
97 
99  return false;
100  }
101 
102  // all members identical
103  return true;
104 }
105 
106 // unequal operator
107 bool L1GtPsbConfig::operator!=(const L1GtPsbConfig& result) const { return !(result == *this); }
108 
109 // less than operator
110 bool L1GtPsbConfig::operator<(const L1GtPsbConfig& gtb) const {
111  if (m_gtBoardSlot < gtb.m_gtBoardSlot) {
112  return true;
113  } else {
114  return false;
115  }
116 
117  return false;
118 }
119 
120 // set board slot
121 void L1GtPsbConfig::setGtBoardSlot(const int& gtBoardSlotValue) { m_gtBoardSlot = gtBoardSlotValue; }
122 
123 // set CH0_SEND_LVDS_NOT_DS92LV16
124 void L1GtPsbConfig::setGtPsbCh0SendLvds(const bool& gtPsbCh0SendLvdsValue) {
125  m_gtPsbCh0SendLvds = gtPsbCh0SendLvdsValue;
126 }
127 
128 // set CH1_SEND_LVDS_NOT_DS92LV16
129 void L1GtPsbConfig::setGtPsbCh1SendLvds(const bool& gtPsbCh1SendLvdsValue) {
130  m_gtPsbCh1SendLvds = gtPsbCh1SendLvdsValue;
131 }
132 
133 // set enable LVDS
134 void L1GtPsbConfig::setGtPsbEnableRecLvds(const std::vector<bool>& gtPsbEnableRecLvdsValue) {
135  m_gtPsbEnableRecLvds = gtPsbEnableRecLvdsValue;
136 }
137 
138 // set enable channels for receiving signal via serial links
139 void L1GtPsbConfig::setGtPsbEnableRecSerLink(const std::vector<bool>& gtPsbEnableRecSerLinkValue) {
140  m_gtPsbEnableRecSerLink = gtPsbEnableRecSerLinkValue;
141 }
142 
143 // print board
144 void L1GtPsbConfig::print(std::ostream& myCout) const {
145  myCout << "PSB Board slot " << m_gtBoardSlot << " ( 0x" << std::hex << m_gtBoardSlot << std::dec
146  << " ):" << std::endl;
147 
148  myCout << " CH0_SEND_LVDS_NOT_DS92LV16 = " << (m_gtPsbCh0SendLvds ? "True" : "False") << std::endl;
149  myCout << " CH1_SEND_LVDS_NOT_DS92LV16 = " << (m_gtPsbCh1SendLvds ? "True" : "False") << std::endl;
150  myCout << std::endl;
151 
152  int iLvds = -1;
153  for (std::vector<bool>::const_iterator cIt = m_gtPsbEnableRecLvds.begin(); cIt != m_gtPsbEnableRecLvds.end(); ++cIt) {
154  iLvds++;
155  myCout << "\n Enable_Rec_LVDS [" << iLvds << "] = " << ((*cIt) ? "True" : "False");
156  }
157  myCout << std::endl;
158 
159  int iCh = -1;
160  for (std::vector<bool>::const_iterator cIt = m_gtPsbEnableRecSerLink.begin(); cIt != m_gtPsbEnableRecSerLink.end();
161  ++cIt) {
162  iCh++;
163  myCout << "\n SerLink_Ch" << iCh << "_Rec_Enable = " << ((*cIt) ? "True" : "False");
164  }
165  myCout << std::endl;
166 }
167 
168 // output stream operator
169 std::ostream& operator<<(std::ostream& os, const L1GtPsbConfig& result) {
170  result.print(os);
171  return os;
172 }
173 
174 // number of LVDS groups per board
176 
177 // number of channels per board
L1GtPsbConfig::~L1GtPsbConfig
virtual ~L1GtPsbConfig()
destructor
Definition: L1GtPsbConfig.cc:50
L1GtPsbConfig::m_gtPsbEnableRecSerLink
std::vector< bool > m_gtPsbEnableRecSerLink
enable channels for receiving signal via serial links
Definition: L1GtPsbConfig.h:112
L1GtPsbConfig::L1GtPsbConfig
L1GtPsbConfig()
constructors
Definition: L1GtPsbConfig.cc:30
L1GtPsbConfig::m_gtBoardSlot
int m_gtBoardSlot
the slot of board (part of Board_Id)
Definition: L1GtPsbConfig.h:99
L1GtPsbConfig::m_gtPsbCh0SendLvds
bool m_gtPsbCh0SendLvds
CH0_SEND_LVDS_NOT_DS92LV16.
Definition: L1GtPsbConfig.h:102
L1GtPsbConfig::setGtPsbEnableRecSerLink
void setGtPsbEnableRecSerLink(const std::vector< bool > &)
Definition: L1GtPsbConfig.cc:139
L1GtPsbConfig::setGtPsbCh0SendLvds
void setGtPsbCh0SendLvds(const bool &)
Definition: L1GtPsbConfig.cc:124
L1GtPsbConfig::print
void print(std::ostream &myCout) const
print board
Definition: L1GtPsbConfig.cc:144
L1GtPsbConfig::PsbNumberLvdsGroups
static const int PsbNumberLvdsGroups
number of LVDS groups per board
Definition: L1GtPsbConfig.h:60
L1GtPsbConfig::setGtBoardSlot
void setGtBoardSlot(const int &)
Definition: L1GtPsbConfig.cc:121
L1GtPsbConfig::operator!=
bool operator!=(const L1GtPsbConfig &) const
unequal operator
Definition: L1GtPsbConfig.cc:107
L1GtPsbConfig::operator<
bool operator<(const L1GtPsbConfig &) const
less than operator
Definition: L1GtPsbConfig.cc:110
L1GtPsbConfig.h
operator<<
std::ostream & operator<<(std::ostream &os, const L1GtPsbConfig &result)
Definition: L1GtPsbConfig.cc:169
L1GtPsbConfig::operator=
L1GtPsbConfig & operator=(const L1GtPsbConfig &)
assignment operator
Definition: L1GtPsbConfig.cc:66
L1GtPsbConfig::m_gtPsbEnableRecLvds
std::vector< bool > m_gtPsbEnableRecLvds
Definition: L1GtPsbConfig.h:109
L1GtPsbConfig
Definition: L1GtPsbConfig.h:32
L1GtPsbConfig::m_gtPsbCh1SendLvds
bool m_gtPsbCh1SendLvds
CH1_SEND_LVDS_NOT_DS92LV16.
Definition: L1GtPsbConfig.h:105
L1GtPsbConfig::PsbSerLinkNumberChannels
static const int PsbSerLinkNumberChannels
number of channels per board
Definition: L1GtPsbConfig.h:63
mps_fire.result
result
Definition: mps_fire.py:303
L1GtPsbConfig::operator==
bool operator==(const L1GtPsbConfig &) const
equal operator
Definition: L1GtPsbConfig.cc:81
L1GtPsbConfig::setGtPsbEnableRecLvds
void setGtPsbEnableRecLvds(const std::vector< bool > &)
Definition: L1GtPsbConfig.cc:134
L1GtPsbConfig::setGtPsbCh1SendLvds
void setGtPsbCh1SendLvds(const bool &)
Definition: L1GtPsbConfig.cc:129
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143