CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/EventFilter/ESDigiToRaw/src/ESDataFormatter.cc

Go to the documentation of this file.
00001 
00002 #include <iostream> 
00003 #include <sstream>
00004 #include <iomanip> 
00005 
00006 #include "EventFilter/ESDigiToRaw/interface/ESDataFormatter.h"
00007 
00008 using namespace std; 
00009 using namespace edm; 
00010 
00011 
00012 
00013 string ESDataFormatter::print(const  Word64 & word) const
00014 {
00015   ostringstream str;
00016   if (printInHex_)
00017     str << "Word64:  0x" << setw(16) << setfill('0') << hex << (word) << dec ;
00018   else 
00019     str << "Word64:  " << reinterpret_cast<const bitset<64>&> (word);
00020   return str.str();
00021 }
00022 
00023 string ESDataFormatter::print(const  Word16 & word) const
00024 {
00025   ostringstream str;
00026   if (printInHex_) 
00027     str << "Word16:  0x" << setw(8) << setfill('0') << hex << (word) << dec ;
00028   else 
00029     str << "Word16:  " << reinterpret_cast<const bitset<16>&> (word);
00030   return str.str();
00031 }
00032