CMS 3D CMS Logo

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

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