CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCDCCStatusDigi.cc
Go to the documentation of this file.
1 
10 #include <ostream>
11 #include <cstring>
12 #include <iostream>
13 
14 CSCDCCStatusDigi::CSCDCCStatusDigi(const uint16_t * header, const uint16_t * trailer, const uint32_t & error,
15  short unsigned tts)
16 {
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  std::cout << " Header: " << std::hex << *header_ <<
32  " Trailer: " << std::hex << *trailer_ << " ErrorFlag: " << errorFlag_ <<
33  " TTS: " << getDCCTTS() << std::dec << std::endl;
34 }
35 
36 std::ostream & operator<<(std::ostream & o, const CSCDCCStatusDigi& digi) {
37  o << " ";
38  o <<"\n";
39 
40  return o;
41 }
42 
void print() const
Print the content of CSCDCCStatusDigi.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
CSCDCCStatusDigi()
Default constructor.
uint16_t trailer_[8]
const uint16_t getDCCTTS() const
short unsigned tts_
uint16_t header_[8]
tuple cout
Definition: gather_cfg.py:121