CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCDCCStatusDigi.cc
Go to the documentation of this file.
1 
9 #include <ostream>
10 #include <cstring>
11 #include <iostream>
12 
13 CSCDCCStatusDigi::CSCDCCStatusDigi(const uint16_t* header,
14  const uint16_t* trailer,
15  const uint32_t& error,
16  short unsigned tts) {
17  errorFlag_ = error;
18  uint16_t headerSizeInBytes = 16;
19  uint16_t trailerSizeInBytes = 16;
20  memcpy(header_, header, headerSizeInBytes);
21  memcpy(trailer_, trailer, trailerSizeInBytes);
22  tts_ = tts;
23 }
24 
25 const uint16_t CSCDCCStatusDigi::getDCCTTS() const {
26  uint16_t ttsBits = (tts_ & 0x00F0) >> 4;
27  return ttsBits;
28 }
29 
31  edm::LogVerbatim("CSCDigi") << " Header: " << std::hex << *header_ << " Trailer: " << std::hex << *trailer_
32  << " ErrorFlag: " << errorFlag_ << " TTS: " << getDCCTTS() << std::dec;
33 }
34 
35 std::ostream& operator<<(std::ostream& o, const CSCDCCStatusDigi& digi) {
36  o << " ";
37  o << "\n";
38 
39  return o;
40 }
Log< level::Info, true > LogVerbatim
void print() const
Print the content of CSCDCCStatusDigi.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
CSCDCCStatusDigi()
Default constructor.
uint16_t trailer_[8]
const uint16_t getDCCTTS() const
short unsigned tts_
uint16_t header_[8]