The Gaudi Framework  v39r3 (979e3109)
Gaudi::Histograming::Sink::detail Namespace Reference

Classes

struct  IntWithFixedWidth
 helper struct to print integers with fixed width More...
 

Functions

std::string formatTitle (std::string_view title, unsigned int width)
 
template<typename T >
sqrt_or_zero (const T x)
 sqrt or zero More...
 

Variables

constexpr std::string_view histo1DFormatting
 
constexpr std::string_view histo2DFormatting
 
constexpr std::string_view histo3DFormatting
 

Function Documentation

◆ formatTitle()

std::string Gaudi::Histograming::Sink::detail::formatTitle ( std::string_view  title,
unsigned int  width 
)
inline

Definition at line 48 of file Utils.h.

48  {
49  if ( title.size() > width ) {
50  return fmt::format( "\"{:.{}s}...\"", title, width - 3 );
51  } else {
52  return fmt::format( "\"{:.{}s}\"", title, width );
53  }
54  }

◆ sqrt_or_zero()

template<typename T >
T Gaudi::Histograming::Sink::detail::sqrt_or_zero ( const T  x)
inline

sqrt or zero

Definition at line 70 of file Utils.h.

70  {
71  return ( x > 0 ? std::sqrt( x ) : T{ 0 } );
72  }

Variable Documentation

◆ histo1DFormatting

constexpr std::string_view Gaudi::Histograming::Sink::detail::histo1DFormatting
constexpr
Initial value:
=
" | {:{}.{}s} | {:{}s} | {:10} |{:11.5g} | {:<#11.5g}|{:11.5g} |{:11.5g} |"

Definition at line 55 of file Utils.h.

◆ histo2DFormatting

constexpr std::string_view Gaudi::Histograming::Sink::detail::histo2DFormatting
constexpr
Initial value:
=
" ID={:{}.{}s} {:{}s} Ents/All={:>5.0f}/{:<5.0f}<X>/sX={:.5g}/{:<.5g},<Y>/sY={:.5g}/{:<.5g}"

Definition at line 57 of file Utils.h.

◆ histo3DFormatting

constexpr std::string_view Gaudi::Histograming::Sink::detail::histo3DFormatting
constexpr
Initial value:
=
" ID={:{}.{}s} {:{}s} "
"Ents/All={:>5.0f}/{:<5.0f}<X>/sX={:.5g}/{:<.5g},<Y>/sY={:.5g}/{:<.5g},<Z>/sZ={:.5g}/{:<.5g}"

Definition at line 59 of file Utils.h.

std::sqrt
T sqrt(T... args)
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119