Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:20:06

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 
0008 #include <iomanip>
0009 #include <iostream>
0010 #include <sstream>
0011 
0012 using namespace mvtx;
0013 
0014 //________________________________________________________________________________
0015 std::string GBTWord::asString() const
0016 {
0017   std::stringstream ss;
0018   for (int i = GBTWordLength; i--;)
0019   {
0020     ss << std::hex << std::setfill('0') << std::setw(2) << +data8[i] << " ";
0021   }
0022   return ss.str();
0023 }
0024 
0025 //________________________________________________________________________________
0026 void GBTWord::printX() const
0027 {
0028   /// print in right aligned hex format
0029   std::cout << asString() << std::endl;
0030 }