The Gaudi Framework  v39r2 (37c0b60a)
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 47 of file Utils.h.

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

◆ sqrt_or_zero()

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

sqrt or zero

Definition at line 69 of file Utils.h.

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

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 54 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 56 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 58 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