Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:10

0001 /** \class CSCDDUStatusDigi
0002  * 
0003  *  Digi for CSC DDU info available in DDU
0004  *
0005  *
0006  */
0007 #include "DataFormats/CSCDigi/interface/CSCDDUStatusDigi.h"
0008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0009 #include <ostream>
0010 #include <cstring>
0011 #include <iostream>
0012 
0013 CSCDDUStatusDigi::CSCDDUStatusDigi(const uint16_t* header, const uint16_t* trailer, uint16_t tts) {
0014   uint16_t headerSizeInBytes = 24;
0015   uint16_t trailerSizeInBytes = 24;
0016   memcpy(header_, header, headerSizeInBytes);
0017   memcpy(trailer_, trailer, trailerSizeInBytes);
0018   tts_ = tts;
0019 }
0020 
0021 const uint16_t CSCDDUStatusDigi::getDDUTTS() const {
0022   uint16_t ttsBits = (tts_ & 0x00F0) >> 4;
0023   return ttsBits;
0024 }
0025 
0026 void CSCDDUStatusDigi::print() const {
0027   edm::LogVerbatim("CSCDigi") << " Header: " << std::hex << *header_ << " Trailer: " << std::hex << *trailer_
0028                               << " TTS: " << getDDUTTS() << std::dec;
0029 }
0030 
0031 std::ostream& operator<<(std::ostream& o, const CSCDDUStatusDigi& digi) {
0032   o << " ";
0033   o << "\n";
0034 
0035   return o;
0036 }