CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCDDUStatusDigi.cc
Go to the documentation of this file.
1 
8 #include <ostream>
9 #include <cstring>
10 #include <iostream>
11 
12 CSCDDUStatusDigi::CSCDDUStatusDigi(const uint16_t * header, const uint16_t * trailer, uint16_t tts)
13 {
14  uint16_t headerSizeInBytes =24;
15  uint16_t trailerSizeInBytes =24;
16  memcpy(header_, header, headerSizeInBytes);
17  memcpy(trailer_, trailer, trailerSizeInBytes);
18  tts_=tts;
19 }
20 
21 const uint16_t CSCDDUStatusDigi::getDDUTTS() const {
22  uint16_t ttsBits = (tts_ & 0x00F0) >> 4;
23  return ttsBits;
24 }
25 
27  std::cout << " Header: " << std::hex << *header_ <<
28  " Trailer: " << std::hex << *trailer_ << " TTS: " << getDDUTTS() << std::dec << std::endl;
29 }
30 
31 std::ostream & operator<<(std::ostream & o, const CSCDDUStatusDigi& digi) {
32  o << " ";
33  o <<"\n";
34 
35  return o;
36 }
37 
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
uint16_t trailer_[12]
void print() const
Print the content of CSCDDUStatusDigi.
CSCDDUStatusDigi()
Default constructor.
uint16_t header_[12]
const uint16_t getDDUTTS() const
tuple cout
Definition: gather_cfg.py:121