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 
10 #include <ostream>
11 #include <cstring>
12 #include <iostream>
13 
14 CSCDDUStatusDigi::CSCDDUStatusDigi(const uint16_t * header, const uint16_t * trailer, uint16_t tts)
15 {
16  uint16_t headerSizeInBytes =24;
17  uint16_t trailerSizeInBytes =24;
18  memcpy(header_, header, headerSizeInBytes);
19  memcpy(trailer_, trailer, trailerSizeInBytes);
20  tts_=tts;
21 }
22 
23 const uint16_t CSCDDUStatusDigi::getDDUTTS() const {
24  uint16_t ttsBits = (tts_ & 0x00F0) >> 4;
25  return ttsBits;
26 }
27 
29  std::cout << " Header: " << std::hex << *header_ <<
30  " Trailer: " << std::hex << *trailer_ << " TTS: " << getDDUTTS() << std::dec << std::endl;
31 }
32 
33 std::ostream & operator<<(std::ostream & o, const CSCDDUStatusDigi& digi) {
34  o << " ";
35  o <<"\n";
36 
37  return o;
38 }
39 
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