CMS 3D CMS Logo

L1GtParameters.cc
Go to the documentation of this file.
1 
17 // this class header
19 
20 // system include files
21 #include <iomanip>
22 
23 
24 // user include files
25 // base class
26 
27 // forward declarations
28 
29 // constructor
31 {
32  // empty
33 }
34 
35 // destructor
37 {
38  // empty
39 }
40 
41 // set the total Bx's in the event
42 void L1GtParameters::setGtTotalBxInEvent(const int& totalBxInEventValue)
43 {
44 
45  m_totalBxInEvent = totalBxInEventValue;
46 
47 }
48 
49 // set active boards for L1 GT DAQ record
50 void L1GtParameters::setGtDaqActiveBoards(const boost::uint16_t& activeBoardsValue)
51 {
52 
53  m_daqActiveBoards = activeBoardsValue;
54 
55 }
56 
57 // set active boards for L1 GT EVM record
58 void L1GtParameters::setGtEvmActiveBoards(const boost::uint16_t& activeBoardsValue)
59 {
60 
61  m_evmActiveBoards = activeBoardsValue;
62 
63 }
64 
65 // set number of Bx for L1 GT DAQ record
66 void L1GtParameters::setGtDaqNrBxBoard(const std::vector<int>& nrBxBoardValue)
67 {
68 
69  m_daqNrBxBoard = nrBxBoardValue;
70 
71 }
72 
73 // set number of Bx for L1 GT EVM record
74 void L1GtParameters::setGtEvmNrBxBoard(const std::vector<int>& nrBxBoardValue)
75 {
76 
77  m_evmNrBxBoard = nrBxBoardValue;
78 
79 }
80 
81 void L1GtParameters::setGtBstLengthBytes(const unsigned int& bstLengthBytesValue) {
82 
83  m_bstLengthBytes = bstLengthBytesValue;
84 
85 }
86 
87 // print all the L1 GT parameters
88 void L1GtParameters::print(std::ostream& myCout) const
89 {
90  myCout
91  << "\nL1 GT Parameters" << std::endl;
92 
93  myCout
94  << "\n Total Bx's in the event = " << m_totalBxInEvent << std::endl;
95 
96  myCout
97  << "\n Active boards in L1 GT DAQ record (hex format) = "
98  << std::hex << std::setw(sizeof(m_daqActiveBoards)*2) << std::setfill('0')
100  << std::dec << std::setfill(' ')
101  << std::endl;
102 
103  myCout
104  << "\n Active boards in L1 GT EVM record (hex format) = "
105  << std::hex << std::setw(sizeof(m_evmActiveBoards)*2) << std::setfill('0')
107  << std::dec << std::setfill(' ')
108  << std::endl;
109 
110  myCout
111  << "\n"
112  << " Number of bunch crosses per board in L1 GT DAQ record\n"
113  << " Board bit gives the position of the board in the \"active boards\" word.\n"
114  << std::endl;
115 
116  int iBit = 0;
117  for (std::vector<int>::const_iterator cIt = m_daqNrBxBoard.begin(); cIt != m_daqNrBxBoard.end(); ++cIt) {
118  myCout << " Board active bit " << iBit << ": " << (*cIt) << " BXs" << std::endl;
119  iBit++;
120  }
121 
122 
123  myCout
124  << "\n"
125  << " Number of bunch crosses per board in L1 GT EVM record\n"
126  << " Board bit gives the position of the board in the \"active boards\" word.\n"
127  << std::endl;
128 
129  iBit = 0;
130  for (std::vector<int>::const_iterator cIt = m_evmNrBxBoard.begin(); cIt != m_evmNrBxBoard.end(); ++cIt) {
131  myCout << " Board active bit " << iBit << ": " << (*cIt) << " BXs" << std::endl;
132  iBit++;
133  }
134 
135  myCout
136  << "\n Length of the BST message = "
138  << std::endl;
139 
140  myCout
141  << "\n" << std::endl;
142 
143 }
144 
145 // output stream operator
146 std::ostream& operator<<(std::ostream& os, const L1GtParameters& result)
147 {
148  result.print(os);
149  return os;
150 
151 }
friend std::ostream & operator<<(std::ostream &, const L1GtParameters &)
output stream operator
virtual ~L1GtParameters()
void setGtDaqNrBxBoard(const std::vector< int > &)
void setGtBstLengthBytes(const unsigned int &)
std::vector< int > m_daqNrBxBoard
number of Bx per board in the DAQ record
unsigned int m_bstLengthBytes
length of BST message (in bytes)
void print(std::ostream &) const
print all the L1 GT parameters
boost::uint16_t m_daqActiveBoards
active boards in the L1 DAQ record
void setGtTotalBxInEvent(const int &)
void setGtEvmActiveBoards(const boost::uint16_t &)
void setGtDaqActiveBoards(const boost::uint16_t &)
boost::uint16_t m_evmActiveBoards
active boards in the L1 EVM record
void setGtEvmNrBxBoard(const std::vector< int > &)
std::vector< int > m_evmNrBxBoard
number of Bx per board in the EVM record
int m_totalBxInEvent
total Bx&#39;s in the event