CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends
L1GtPsbConfig Class Reference

#include <L1GtPsbConfig.h>

Public Member Functions

const int gtBoardSlot () const
 get / set board slot More...
 
const bool gtPsbCh0SendLvds () const
 get / set CH0_SEND_LVDS_NOT_DS92LV16 More...
 
const bool gtPsbCh1SendLvds () const
 get / set CH1_SEND_LVDS_NOT_DS92LV16 More...
 
const std::vector< bool > & gtPsbEnableRecLvds () const
 get / set enable LVDS More...
 
const std::vector< bool > & gtPsbEnableRecSerLink () const
 get / set enable channels for receiving signal via serial links More...
 
 L1GtPsbConfig ()
 constructors More...
 
 L1GtPsbConfig (const int &)
 constructor using board slot More...
 
 L1GtPsbConfig (const L1GtPsbConfig &)
 copy constructor More...
 
bool operator!= (const L1GtPsbConfig &) const
 unequal operator More...
 
bool operator< (const L1GtPsbConfig &) const
 less than operator More...
 
L1GtPsbConfigoperator= (const L1GtPsbConfig &)
 assignment operator More...
 
bool operator== (const L1GtPsbConfig &) const
 equal operator More...
 
void print (std::ostream &myCout) const
 print board More...
 
void setGtBoardSlot (const int &)
 
void setGtPsbCh0SendLvds (const bool &)
 
void setGtPsbCh1SendLvds (const bool &)
 
void setGtPsbEnableRecLvds (const std::vector< bool > &)
 
void setGtPsbEnableRecSerLink (const std::vector< bool > &)
 
virtual ~L1GtPsbConfig ()
 destructor More...
 

Static Public Attributes

static const int PsbNumberLvdsGroups = 16
 number of LVDS groups per board More...
 
static const int PsbSerLinkNumberChannels = 8
 number of channels per board More...
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

int m_gtBoardSlot
 the slot of board (part of Board_Id) More...
 
bool m_gtPsbCh0SendLvds
 CH0_SEND_LVDS_NOT_DS92LV16. More...
 
bool m_gtPsbCh1SendLvds
 CH1_SEND_LVDS_NOT_DS92LV16. More...
 
std::vector< bool > m_gtPsbEnableRecLvds
 
std::vector< bool > m_gtPsbEnableRecSerLink
 enable channels for receiving signal via serial links More...
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 
std::ostream & operator<< (std::ostream &, const L1GtPsbConfig &)
 output stream operator More...
 

Detailed Description

Description: class for L1 GT PSB board configuration.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 32 of file L1GtPsbConfig.h.

Constructor & Destructor Documentation

L1GtPsbConfig::L1GtPsbConfig ( )

constructors

Definition at line 30 of file L1GtPsbConfig.cc.

References m_gtBoardSlot, m_gtPsbCh0SendLvds, m_gtPsbCh1SendLvds, m_gtPsbEnableRecLvds, m_gtPsbEnableRecSerLink, PsbNumberLvdsGroups, and PsbSerLinkNumberChannels.

31 {
32 
33  m_gtBoardSlot = -1;
34 
35  m_gtPsbCh0SendLvds = false;
36  m_gtPsbCh1SendLvds = false;
37 
40 
41 }
bool m_gtPsbCh1SendLvds
CH1_SEND_LVDS_NOT_DS92LV16.
static const int PsbSerLinkNumberChannels
number of channels per board
Definition: L1GtPsbConfig.h:67
int m_gtBoardSlot
the slot of board (part of Board_Id)
static const int PsbNumberLvdsGroups
number of LVDS groups per board
Definition: L1GtPsbConfig.h:64
bool m_gtPsbCh0SendLvds
CH0_SEND_LVDS_NOT_DS92LV16.
std::vector< bool > m_gtPsbEnableRecLvds
std::vector< bool > m_gtPsbEnableRecSerLink
enable channels for receiving signal via serial links
L1GtPsbConfig::L1GtPsbConfig ( const int &  psbSlot)

constructor using board slot

Definition at line 44 of file L1GtPsbConfig.cc.

References m_gtPsbCh0SendLvds, m_gtPsbCh1SendLvds, m_gtPsbEnableRecLvds, m_gtPsbEnableRecSerLink, PsbNumberLvdsGroups, and PsbSerLinkNumberChannels.

44  :
45  m_gtBoardSlot(psbSlot)
46 {
47 
48  m_gtPsbCh0SendLvds = false;
49  m_gtPsbCh1SendLvds = false;
50 
53 
54 }
bool m_gtPsbCh1SendLvds
CH1_SEND_LVDS_NOT_DS92LV16.
static const int PsbSerLinkNumberChannels
number of channels per board
Definition: L1GtPsbConfig.h:67
int m_gtBoardSlot
the slot of board (part of Board_Id)
static const int PsbNumberLvdsGroups
number of LVDS groups per board
Definition: L1GtPsbConfig.h:64
bool m_gtPsbCh0SendLvds
CH0_SEND_LVDS_NOT_DS92LV16.
std::vector< bool > m_gtPsbEnableRecLvds
std::vector< bool > m_gtPsbEnableRecSerLink
enable channels for receiving signal via serial links
L1GtPsbConfig::~L1GtPsbConfig ( )
virtual

destructor

Definition at line 57 of file L1GtPsbConfig.cc.

58 {
59  // empty
60 }
L1GtPsbConfig::L1GtPsbConfig ( const L1GtPsbConfig gtb)

copy constructor

Definition at line 63 of file L1GtPsbConfig.cc.

References m_gtBoardSlot, m_gtPsbCh0SendLvds, m_gtPsbCh1SendLvds, m_gtPsbEnableRecLvds, and m_gtPsbEnableRecSerLink.

64 {
65 
67 
70 
73 
74 }
bool m_gtPsbCh1SendLvds
CH1_SEND_LVDS_NOT_DS92LV16.
int m_gtBoardSlot
the slot of board (part of Board_Id)
bool m_gtPsbCh0SendLvds
CH0_SEND_LVDS_NOT_DS92LV16.
std::vector< bool > m_gtPsbEnableRecLvds
std::vector< bool > m_gtPsbEnableRecSerLink
enable channels for receiving signal via serial links

Member Function Documentation

const int L1GtPsbConfig::gtBoardSlot ( ) const
inline

get / set board slot

Definition at line 72 of file L1GtPsbConfig.h.

References m_gtBoardSlot, and setGtBoardSlot().

73  {
74  return m_gtBoardSlot;
75  }
int m_gtBoardSlot
the slot of board (part of Board_Id)
const bool L1GtPsbConfig::gtPsbCh0SendLvds ( ) const
inline

get / set CH0_SEND_LVDS_NOT_DS92LV16

Definition at line 80 of file L1GtPsbConfig.h.

References m_gtPsbCh0SendLvds, and setGtPsbCh0SendLvds().

81  {
82  return m_gtPsbCh0SendLvds;
83  }
bool m_gtPsbCh0SendLvds
CH0_SEND_LVDS_NOT_DS92LV16.
const bool L1GtPsbConfig::gtPsbCh1SendLvds ( ) const
inline

get / set CH1_SEND_LVDS_NOT_DS92LV16

Definition at line 88 of file L1GtPsbConfig.h.

References m_gtPsbCh1SendLvds, and setGtPsbCh1SendLvds().

89  {
90  return m_gtPsbCh1SendLvds;
91  }
bool m_gtPsbCh1SendLvds
CH1_SEND_LVDS_NOT_DS92LV16.
const std::vector<bool>& L1GtPsbConfig::gtPsbEnableRecLvds ( ) const
inline

get / set enable LVDS

Definition at line 96 of file L1GtPsbConfig.h.

References m_gtPsbEnableRecLvds, and setGtPsbEnableRecLvds().

97  {
98  return m_gtPsbEnableRecLvds;
99  }
std::vector< bool > m_gtPsbEnableRecLvds
const std::vector<bool>& L1GtPsbConfig::gtPsbEnableRecSerLink ( ) const
inline

get / set enable channels for receiving signal via serial links

Definition at line 104 of file L1GtPsbConfig.h.

References m_gtPsbEnableRecSerLink, operator<<, print(), and setGtPsbEnableRecSerLink().

105  {
107  }
std::vector< bool > m_gtPsbEnableRecSerLink
enable channels for receiving signal via serial links
bool L1GtPsbConfig::operator!= ( const L1GtPsbConfig result) const

unequal operator

Definition at line 125 of file L1GtPsbConfig.cc.

126 {
127 
128  return !(result == *this);
129 
130 }
bool L1GtPsbConfig::operator< ( const L1GtPsbConfig gtb) const

less than operator

Definition at line 133 of file L1GtPsbConfig.cc.

References m_gtBoardSlot.

134 {
135  if (m_gtBoardSlot < gtb.m_gtBoardSlot) {
136  return true;
137  }
138  else {
139  return false;
140  }
141 
142  return false;
143 }
int m_gtBoardSlot
the slot of board (part of Board_Id)
L1GtPsbConfig & L1GtPsbConfig::operator= ( const L1GtPsbConfig gtb)

assignment operator

Definition at line 77 of file L1GtPsbConfig.cc.

References m_gtBoardSlot, m_gtPsbCh0SendLvds, m_gtPsbCh1SendLvds, m_gtPsbEnableRecLvds, and m_gtPsbEnableRecSerLink.

78 {
79 
80  if (this != &gtb) {
81 
83 
86 
89  }
90 
91  return *this;
92 
93 }
bool m_gtPsbCh1SendLvds
CH1_SEND_LVDS_NOT_DS92LV16.
int m_gtBoardSlot
the slot of board (part of Board_Id)
bool m_gtPsbCh0SendLvds
CH0_SEND_LVDS_NOT_DS92LV16.
std::vector< bool > m_gtPsbEnableRecLvds
std::vector< bool > m_gtPsbEnableRecSerLink
enable channels for receiving signal via serial links
bool L1GtPsbConfig::operator== ( const L1GtPsbConfig gtb) const

equal operator

Definition at line 96 of file L1GtPsbConfig.cc.

References m_gtBoardSlot, m_gtPsbCh0SendLvds, m_gtPsbCh1SendLvds, m_gtPsbEnableRecLvds, and m_gtPsbEnableRecSerLink.

97 {
98 
99  if (m_gtBoardSlot != gtb.m_gtBoardSlot) {
100  return false;
101  }
102 
104  return false;
105  }
106 
108  return false;
109  }
110 
112  return false;
113  }
114 
116  return false;
117  }
118 
119  // all members identical
120  return true;
121 
122 }
bool m_gtPsbCh1SendLvds
CH1_SEND_LVDS_NOT_DS92LV16.
int m_gtBoardSlot
the slot of board (part of Board_Id)
bool m_gtPsbCh0SendLvds
CH0_SEND_LVDS_NOT_DS92LV16.
std::vector< bool > m_gtPsbEnableRecLvds
std::vector< bool > m_gtPsbEnableRecSerLink
enable channels for receiving signal via serial links
void L1GtPsbConfig::print ( std::ostream &  myCout) const

print board

Definition at line 179 of file L1GtPsbConfig.cc.

References TauDecayModes::dec, m_gtBoardSlot, m_gtPsbCh0SendLvds, m_gtPsbCh1SendLvds, m_gtPsbEnableRecLvds, and m_gtPsbEnableRecSerLink.

Referenced by gtPsbEnableRecSerLink(), and operator<<().

180 {
181 
182  myCout << "PSB Board slot " << m_gtBoardSlot << " ( 0x" << std::hex
183  << m_gtBoardSlot << std::dec << " ):" << std::endl;
184 
185  myCout << " CH0_SEND_LVDS_NOT_DS92LV16 = "
186  << (m_gtPsbCh0SendLvds ? "True" : "False") << std::endl;
187  myCout << " CH1_SEND_LVDS_NOT_DS92LV16 = "
188  << (m_gtPsbCh1SendLvds ? "True" : "False") << std::endl;
189  myCout << std::endl;
190 
191  int iLvds = -1;
192  for (std::vector<bool>::const_iterator cIt = m_gtPsbEnableRecLvds.begin(); cIt
193  != m_gtPsbEnableRecLvds.end(); ++cIt) {
194 
195  iLvds++;
196  myCout << "\n Enable_Rec_LVDS [" << iLvds << "] = "
197  << ((*cIt) ? "True" : "False");
198  }
199  myCout << std::endl;
200 
201  int iCh = -1;
202  for (std::vector<bool>::const_iterator cIt =
203  m_gtPsbEnableRecSerLink.begin(); cIt
204  != m_gtPsbEnableRecSerLink.end(); ++cIt) {
205 
206  iCh++;
207  myCout << "\n SerLink_Ch" << iCh << "_Rec_Enable = "
208  << ((*cIt) ? "True" : "False");
209  }
210  myCout << std::endl;
211 }
bool m_gtPsbCh1SendLvds
CH1_SEND_LVDS_NOT_DS92LV16.
int m_gtBoardSlot
the slot of board (part of Board_Id)
bool m_gtPsbCh0SendLvds
CH0_SEND_LVDS_NOT_DS92LV16.
std::vector< bool > m_gtPsbEnableRecLvds
std::vector< bool > m_gtPsbEnableRecSerLink
enable channels for receiving signal via serial links
template<class Archive >
void L1GtPsbConfig::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void L1GtPsbConfig::setGtBoardSlot ( const int &  gtBoardSlotValue)

Definition at line 146 of file L1GtPsbConfig.cc.

References m_gtBoardSlot.

Referenced by L1GtPsbSetupConfigOnlineProd::addDefaultPsb(), L1GtPsbSetupConfigOnlineProd::addPsbFromDb(), and gtBoardSlot().

147 {
148  m_gtBoardSlot = gtBoardSlotValue;
149 }
int m_gtBoardSlot
the slot of board (part of Board_Id)
void L1GtPsbConfig::setGtPsbCh0SendLvds ( const bool &  gtPsbCh0SendLvdsValue)
void L1GtPsbConfig::setGtPsbCh1SendLvds ( const bool &  gtPsbCh1SendLvdsValue)
void L1GtPsbConfig::setGtPsbEnableRecLvds ( const std::vector< bool > &  gtPsbEnableRecLvdsValue)
void L1GtPsbConfig::setGtPsbEnableRecSerLink ( const std::vector< bool > &  gtPsbEnableRecSerLinkValue)

Definition at line 172 of file L1GtPsbConfig.cc.

References m_gtPsbEnableRecSerLink.

Referenced by L1GtPsbSetupConfigOnlineProd::addDefaultPsb(), L1GtPsbSetupConfigOnlineProd::addPsbFromDb(), gtPsbEnableRecSerLink(), and L1GtPsbSetupTrivialProducer::L1GtPsbSetupTrivialProducer().

174 {
175  m_gtPsbEnableRecSerLink = gtPsbEnableRecSerLinkValue;
176 }
std::vector< bool > m_gtPsbEnableRecSerLink
enable channels for receiving signal via serial links

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 136 of file L1GtPsbConfig.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 136 of file L1GtPsbConfig.h.

std::ostream& operator<< ( std::ostream &  os,
const L1GtPsbConfig result 
)
friend

output stream operator

Definition at line 214 of file L1GtPsbConfig.cc.

Referenced by gtPsbEnableRecSerLink().

215 {
216  result.print(os);
217  return os;
218 
219 }
void print(std::ostream &myCout) const
print board

Member Data Documentation

int L1GtPsbConfig::m_gtBoardSlot
private

the slot of board (part of Board_Id)

Definition at line 120 of file L1GtPsbConfig.h.

Referenced by gtBoardSlot(), L1GtPsbConfig(), operator<(), operator=(), operator==(), print(), and setGtBoardSlot().

bool L1GtPsbConfig::m_gtPsbCh0SendLvds
private

CH0_SEND_LVDS_NOT_DS92LV16.

Definition at line 123 of file L1GtPsbConfig.h.

Referenced by gtPsbCh0SendLvds(), L1GtPsbConfig(), operator=(), operator==(), print(), and setGtPsbCh0SendLvds().

bool L1GtPsbConfig::m_gtPsbCh1SendLvds
private

CH1_SEND_LVDS_NOT_DS92LV16.

Definition at line 126 of file L1GtPsbConfig.h.

Referenced by gtPsbCh1SendLvds(), L1GtPsbConfig(), operator=(), operator==(), print(), and setGtPsbCh1SendLvds().

std::vector<bool> L1GtPsbConfig::m_gtPsbEnableRecLvds
private

enable LVDS (PsbNumberLvdsGroups = 16 groups of four bits) can be enabled/disabled per group

Definition at line 130 of file L1GtPsbConfig.h.

Referenced by gtPsbEnableRecLvds(), L1GtPsbConfig(), operator=(), operator==(), print(), and setGtPsbEnableRecLvds().

std::vector<bool> L1GtPsbConfig::m_gtPsbEnableRecSerLink
private

enable channels for receiving signal via serial links

Definition at line 133 of file L1GtPsbConfig.h.

Referenced by gtPsbEnableRecSerLink(), L1GtPsbConfig(), operator=(), operator==(), print(), and setGtPsbEnableRecSerLink().

const int L1GtPsbConfig::PsbNumberLvdsGroups = 16
static
const int L1GtPsbConfig::PsbSerLinkNumberChannels = 8
static