CMS 3D CMS Logo

CSCDDUStatusDigi.cc
Go to the documentation of this file.
1 
9 #include <ostream>
10 #include <cstring>
11 #include <iostream>
12 
13 CSCDDUStatusDigi::CSCDDUStatusDigi(const uint16_t* header, const uint16_t* trailer, uint16_t tts) {
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  edm::LogVerbatim("CSCDigi") << " Header: " << std::hex << *header_ << " Trailer: " << std::hex << *trailer_
28  << " TTS: " << getDDUTTS() << std::dec;
29 }
30 
31 std::ostream& operator<<(std::ostream& o, const CSCDDUStatusDigi& digi) {
32  o << " ";
33  o << "\n";
34 
35  return o;
36 }
std::ostream & operator<<(std::ostream &o, const CSCDDUStatusDigi &digi)
Log< level::Info, true > LogVerbatim
const uint16_t * trailer() const
uint16_t trailer_[12]
const uint16_t * header() const
Data Accessors.
void print() const
Print the content of CSCDDUStatusDigi.
CSCDDUStatusDigi()
Default constructor.
uint16_t header_[12]
const uint16_t getDDUTTS() const