CbmRoot
CbmFormatDecHexPrintout.h File Reference
#include <iomanip>
#include <iostream>
#include <sstream>
Include dependency graph for CbmFormatDecHexPrintout.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string FormatDecPrintout (uint64_t ulVal, char cFill=0, uint uWidth=0)
 
std::string FormatHexPrintout (uint64_t ulVal, char cFill=0, uint uWidth=0, bool bUppercase=false)
 

Function Documentation

◆ FormatDecPrintout()

std::string FormatDecPrintout ( uint64_t  ulVal,
char  cFill = 0,
uint  uWidth = 0 
)

Replaces the following block of code which generate warnings depending on the OS Form( "%llu", static_cast<uint64_t>(val) ); Form( "%lu", static_cast<uint64_t>(val) ); Form( "%0llu", static_cast<uint64_t>(val) ); Form( "%0lu", static_cast<uint64_t>(val) ); Form( "%016llu", static_cast<uint64_t>(val) ); Form( "%016lu", static_cast<uint64_t>(val) );

Set fill character and/or width if provided by user

push value

Restore fill character if needed

Definition at line 4 of file CbmFormatDecHexPrintout.cxx.

Referenced by CbmMQTsaMultiSampler::ConditionalRun(), CbmMcbm2018MonitorTofPulser::ProcessEpochCycle(), CbmMcbm2018TofTestFee::ProcessEpochCycle(), CbmMcbm2018MonitorTof::ProcessEpochCycle(), and CbmMcbm2018MsCrcCheck::Run().

◆ FormatHexPrintout()

std::string FormatHexPrintout ( uint64_t  ulVal,
char  cFill = 0,
uint  uWidth = 0,
bool  bUppercase = false 
)

Replaces the following block of code which generate warnings depending on the OS Form( "%llx", static_cast<uint64_t>(val) ); Form( "%lx", static_cast<uint64_t>(val) ); Form( "%0llx", static_cast<uint64_t>(val) ); Form( "%0lx", static_cast<uint64_t>(val) ); Form( "%016llx", static_cast<uint64_t>(val) ); Form( "%016lx", static_cast<uint64_t>(val) );

Set hex printout mode

Set fill character and/or width if provided by user

push value

Restore fill character if needed

Definition at line 21 of file CbmFormatDecHexPrintout.cxx.