CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/DataFormats/CSCDigi/src/CSCDDUStatusDigi.cc

Go to the documentation of this file.
00001 
00009 #include "DataFormats/CSCDigi/interface/CSCDDUStatusDigi.h"
00010 #include <ostream>
00011 #include <cstring>
00012 #include <iostream>
00013 
00014 CSCDDUStatusDigi::CSCDDUStatusDigi(const uint16_t * header, const uint16_t * trailer, uint16_t tts)
00015 {
00016   uint16_t headerSizeInBytes =24;
00017   uint16_t trailerSizeInBytes =24;
00018   memcpy(header_, header, headerSizeInBytes);
00019   memcpy(trailer_, trailer, trailerSizeInBytes);
00020   tts_=tts;
00021 }
00022 
00023 const uint16_t CSCDDUStatusDigi::getDDUTTS() const {
00024          uint16_t ttsBits = (tts_ & 0x00F0) >> 4;
00025          return ttsBits;
00026 }
00027 
00028 void CSCDDUStatusDigi::print() const {
00029      std::cout << " Header: " << std::hex << *header_ <<
00030      " Trailer: " << std::hex << *trailer_ << " TTS: " << getDDUTTS() << std::dec << std::endl;
00031 }
00032 
00033 std::ostream & operator<<(std::ostream & o, const CSCDDUStatusDigi& digi) {
00034   o << " "; 
00035   o <<"\n";
00036  
00037   return o;
00038 }
00039