File indexing completed on 2024-04-06 12:10:39
0001
0002 #include <iostream>
0003 #include <sstream>
0004 #include <iomanip>
0005
0006 #include "EventFilter/ESDigiToRaw/interface/ESDataFormatter.h"
0007
0008 using namespace std;
0009 using namespace edm;
0010
0011 string ESDataFormatter::print(const Word64& word) const {
0012 ostringstream str;
0013 if (printInHex_)
0014 str << "Word64: 0x" << setw(16) << setfill('0') << hex << (word) << dec;
0015 else
0016 str << "Word64: " << reinterpret_cast<const bitset<64>&>(word);
0017 return str.str();
0018 }
0019
0020 string ESDataFormatter::print(const Word16& word) const {
0021 ostringstream str;
0022 if (printInHex_)
0023 str << "Word16: 0x" << setw(8) << setfill('0') << hex << (word) << dec;
0024 else
0025 str << "Word16: " << reinterpret_cast<const bitset<16>&>(word);
0026 return str.str();
0027 }