133 GAUDI_API std::string
path(
const AIDA::IBaseHistogram* aida );
173 GAUDI_API std::string
format(
const AIDA::IHistogram1D* histo,
const std::string& fmt );
198 GAUDI_API std::string
format(
const AIDA::IProfile1D* histo,
const std::string& fmt );
228 GAUDI_API std::string
format(
const AIDA::IHistogram1D* histo,
const std::string& ID,
const std::string& fmt1,
229 const std::string& fmt2 );
259 GAUDI_API std::string
format(
const AIDA::IProfile1D* histo,
const std::string& ID,
const std::string& fmt1,
260 const std::string& fmt2 );
285 template <
class HISTO,
class STREAM,
class TERMINATOR>
286 inline STREAM&
printList( HISTO first, HISTO last,
const std::string& fmt, STREAM& stream, TERMINATOR term ) {
287 for ( ; first != last; ++first ) { stream <<
format( *first, fmt ) << term; }
314 template <
class LIST,
class STREAM,
class TERMINATOR>
315 inline STREAM&
printList(
const LIST& histos,
const std::string& fmt, STREAM& stream, TERMINATOR term ) {
316 return printList( histos.begin(), histos.end(), fmt, stream, term );
363 template <
class HISTO,
class STREAM,
class TERMINATOR>
364 inline STREAM&
printMap( HISTO
begin, HISTO
end,
const std::string& fmt1,
const std::string& fmt2, STREAM& stream,
417 template <
class MAP,
class STREAM,
class TERMINATOR>
418 inline STREAM&
printMap(
const MAP& histos,
const std::string& fmt1,
const std::string& fmt2, STREAM& stream,
420 return printMap( histos.begin(), histos.end(), fmt1, fmt2, stream, term );
427 GAUDI_API std::string
format(
const std::string& val1,
const std::string& val2,
const std::string& fmt );
439 Table(
const int ID = 0 );
451 template <
class HISTO,
class STREAM,
class TERMINATOR>
452 STREAM&
printList( HISTO first, HISTO last, STREAM& stream, TERMINATOR term )
const {
453 if ( !
header().empty() ) { stream <<
header() << term; }
455 if ( !
footer().empty() ) { stream <<
footer() << term; }
472 template <
class HISTO,
class STREAM,
class TERMINATOR>
473 STREAM&
printMap( HISTO first, HISTO last,
const std::string& fmt,
const std::string& hval, STREAM& stream,
474 TERMINATOR term )
const {
475 if ( !hval.empty() || !
header().empty() ) {
506 std::string
toString(
const AIDA::IHistogram1D* histo )
const;
509 std::string
toString(
const AIDA::IProfile1D* histo )
const;
536 std::string
toString(
const AIDA::IHistogram1D* histo,
const std::string& ID,
const std::string& fmt )
const;
560 std::string
toString(
const AIDA::IProfile1D* histo,
const std::string& ID,
const std::string& fmt )
const;
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
const std::string & format() const
the format
std::string m_footer
the table footer
STREAM & printMap(HISTO first, HISTO last, const std::string &fmt, const std::string &hval, STREAM &stream, TERMINATOR term) const
print as table the content of the accociative map (key->histogram) with the key, convertible to std::...
Table(const int ID=0)
constructor from enum
void setFooter(std::string v)
set new footer
std::string m_format
the defautl format
void setHeader(std::string v)
set new header
std::string m_header
the table header
const std::string & footer() const
the table footer
void setFormat(std::string v)
set new format
const std::string & header() const
the table header
STREAM & printList(HISTO first, HISTO last, STREAM &stream, TERMINATOR term) const
print the simple sequence of histograms as table
Collection of useful utilities for manipulations with AIDA hisgograms.
GAUDI_API std::string format(const AIDA::IHistogram1D *histo, const std::string &fmt)
Make the string representation of the histogram according to the specified format.
STREAM & printList(HISTO first, HISTO last, const std::string &fmt, STREAM &stream, TERMINATOR term)
print the simple sequence (list-like) of histograms as table
STREAM & printMap(HISTO begin, HISTO end, const std::string &fmt1, const std::string &fmt2, STREAM &stream, TERMINATOR term)
Print the "associative sequence" (e.g.
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
AttribStringParser::Iterator begin(const AttribStringParser &parser)
AttribStringParser::Iterator end(const AttribStringParser &)
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...