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 
8 #include <ostream>
9 #include <cstring>
10 #include <iostream>
11 
12 CSCDCCStatusDigi::CSCDCCStatusDigi(const uint16_t * header, const uint16_t * trailer, const uint32_t & error,
13  short unsigned tts)
14 {
16  uint16_t headerSizeInBytes =16;
17  uint16_t trailerSizeInBytes =16;
18  memcpy(header_, header, headerSizeInBytes);
19  memcpy(trailer_, trailer, trailerSizeInBytes);
20  tts_ = tts;
21 }
22 
23 const uint16_t CSCDCCStatusDigi::getDCCTTS() 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_ << " ErrorFlag: " << errorFlag_ <<
31  " TTS: " << getDCCTTS() << std::dec << std::endl;
32 }
33 
34 std::ostream & operator<<(std::ostream & o, const CSCDCCStatusDigi& digi) {
35  o << " ";
36  o <<"\n";
37 
38  return o;
39 }
40 
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