File indexing completed on 2024-04-06 12:03:59
0001
0002
0003
0004
0005
0006
0007 #include "DataFormats/CSCDigi/interface/CSCDCCStatusDigi.h"
0008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0009 #include <ostream>
0010 #include <cstring>
0011 #include <iostream>
0012
0013 CSCDCCStatusDigi::CSCDCCStatusDigi(const uint16_t* header,
0014 const uint16_t* trailer,
0015 const uint32_t& error,
0016 short unsigned tts) {
0017 errorFlag_ = error;
0018 uint16_t headerSizeInBytes = 16;
0019 uint16_t trailerSizeInBytes = 16;
0020 memcpy(header_, header, headerSizeInBytes);
0021 memcpy(trailer_, trailer, trailerSizeInBytes);
0022 tts_ = tts;
0023 }
0024
0025 const uint16_t CSCDCCStatusDigi::getDCCTTS() const {
0026 uint16_t ttsBits = (tts_ & 0x00F0) >> 4;
0027 return ttsBits;
0028 }
0029
0030 void CSCDCCStatusDigi::print() const {
0031 edm::LogVerbatim("CSCDigi") << " Header: " << std::hex << *header_ << " Trailer: " << std::hex << *trailer_
0032 << " ErrorFlag: " << errorFlag_ << " TTS: " << getDCCTTS() << std::dec;
0033 }
0034
0035 std::ostream& operator<<(std::ostream& o, const CSCDCCStatusDigi& digi) {
0036 o << " ";
0037 o << "\n";
0038
0039 return o;
0040 }