Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:18

0001 // @file GBTWord.cxx
0002 // @brief Classes for creation/interpretation of MVTX GBT data
0003 // @sa <O2/Detectors/ITSMFT/common/reconstruction/src/GBTWord.cxx>
0004 //     <1ecb2b0a2>
0005 
0006 #include "GBTWord.h"
0007 #include <iomanip>
0008 #include <iostream>
0009 #include <sstream>
0010 
0011 using namespace mvtx;
0012 
0013 //________________________________________________________________________________
0014 std::string GBTWord::asString() const
0015 {
0016   std::stringstream ss;
0017   for (int i = GBTWordLength; i--;)
0018   {
0019     ss << std::hex << std::setfill('0') << std::setw(2) << +data8[i] << " ";
0020   }
0021   return ss.str();
0022 }
0023 
0024 //________________________________________________________________________________
0025 void GBTWord::printX() const
0026 {
0027   /// print in right aligned hex format
0028   std::cout << asString() << std::endl;
0029 }