CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CondFormats/L1TObjects/src/L1GtParameters.cc

Go to the documentation of this file.
00001 
00017 // this class header
00018 #include "CondFormats/L1TObjects/interface/L1GtParameters.h"
00019 
00020 // system include files
00021 #include <iomanip>
00022 
00023 
00024 // user include files
00025 //   base class
00026 
00027 // forward declarations
00028 
00029 // constructor
00030 L1GtParameters::L1GtParameters()
00031 {
00032     // empty
00033 }
00034 
00035 // destructor
00036 L1GtParameters::~L1GtParameters()
00037 {
00038     // empty
00039 }
00040 
00041 // set the total Bx's in the event
00042 void L1GtParameters::setGtTotalBxInEvent(const int& totalBxInEventValue)
00043 {
00044 
00045     m_totalBxInEvent = totalBxInEventValue;
00046 
00047 }
00048 
00049 // set active boards for L1 GT DAQ record
00050 void L1GtParameters::setGtDaqActiveBoards(const boost::uint16_t& activeBoardsValue)
00051 {
00052 
00053     m_daqActiveBoards = activeBoardsValue;
00054 
00055 }
00056 
00057 // set active boards for L1 GT EVM record
00058 void L1GtParameters::setGtEvmActiveBoards(const boost::uint16_t& activeBoardsValue)
00059 {
00060 
00061     m_evmActiveBoards = activeBoardsValue;
00062 
00063 }
00064 
00065 // set number of Bx for L1 GT DAQ record
00066 void L1GtParameters::setGtDaqNrBxBoard(const std::vector<int>& nrBxBoardValue)
00067 {
00068 
00069     m_daqNrBxBoard = nrBxBoardValue;
00070 
00071 }
00072 
00073 // set number of Bx for L1 GT EVM record
00074 void L1GtParameters::setGtEvmNrBxBoard(const std::vector<int>& nrBxBoardValue)
00075 {
00076 
00077     m_evmNrBxBoard = nrBxBoardValue;
00078 
00079 }
00080 
00081 void L1GtParameters::setGtBstLengthBytes(const unsigned int& bstLengthBytesValue) {
00082 
00083     m_bstLengthBytes = bstLengthBytesValue;
00084 
00085 }
00086 
00087 // print all the L1 GT parameters
00088 void L1GtParameters::print(std::ostream& myCout) const
00089 {
00090     myCout
00091     << "\nL1 GT Parameters" << std::endl;
00092 
00093     myCout
00094     << "\n  Total Bx's in the event             = " << m_totalBxInEvent << std::endl;
00095 
00096     myCout
00097     << "\n  Active boards in L1 GT DAQ record (hex format) = "
00098     << std::hex << std::setw(sizeof(m_daqActiveBoards)*2) << std::setfill('0')
00099     << m_daqActiveBoards
00100     << std::dec << std::setfill(' ')
00101     << std::endl;
00102 
00103     myCout
00104     << "\n  Active boards in L1 GT EVM record (hex format) = "
00105     << std::hex << std::setw(sizeof(m_evmActiveBoards)*2) << std::setfill('0')
00106     << m_evmActiveBoards
00107     << std::dec << std::setfill(' ')
00108     << std::endl;
00109 
00110     myCout
00111     << "\n"
00112     << "  Number of bunch crosses per board in L1 GT DAQ record\n"
00113     << "  Board bit gives the position of the board in the \"active boards\" word.\n"
00114     << std::endl;
00115 
00116     int iBit = 0;
00117     for (std::vector<int>::const_iterator cIt = m_daqNrBxBoard.begin(); cIt != m_daqNrBxBoard.end(); ++cIt) {
00118         myCout << "    Board active bit " << iBit << ": " << (*cIt) << " BXs" << std::endl;
00119         iBit++;
00120     }
00121 
00122 
00123     myCout
00124     << "\n"
00125     << "  Number of bunch crosses per board in L1 GT EVM record\n"
00126     << "  Board bit gives the position of the board in the \"active boards\" word.\n"
00127     << std::endl;
00128 
00129     iBit = 0;
00130     for (std::vector<int>::const_iterator cIt = m_evmNrBxBoard.begin(); cIt != m_evmNrBxBoard.end(); ++cIt) {
00131         myCout << "    Board active bit " << iBit << ": " << (*cIt) << " BXs" << std::endl;
00132         iBit++;
00133     }
00134 
00135     myCout
00136     << "\n  Length of the BST message = "
00137     << m_bstLengthBytes
00138     << std::endl;
00139 
00140     myCout
00141     << "\n" << std::endl;
00142 
00143 }
00144 
00145 // output stream operator
00146 std::ostream& operator<<(std::ostream& os, const L1GtParameters& result)
00147 {
00148     result.print(os);
00149     return os;
00150 
00151 }