1 #ifndef GAUDIUTILS_HISTOTABLEFORMAT_H 2 #define GAUDIUTILS_HISTOTABLEFORMAT_H 1 224 template <
class HISTO,
class STREAM,
class TERMINATOR>
227 for ( ; first != last; ++first ) {
228 stream <<
format( *first, fmt ) << term;
256 template <
class LIST,
class STREAM,
class TERMINATOR>
259 return printList( histos.begin(), histos.end(), fmt, stream, term );
306 template <
class HISTO,
class STREAM,
class TERMINATOR>
311 stream <<
format( begin->second,
361 template <
class MAP,
class STREAM,
class TERMINATOR>
365 return printMap( histos.begin(), histos.end(), fmt1, fmt2, stream, term );
385 Table(
const int ID = 0 );
397 template <
class HISTO,
class STREAM,
class TERMINATOR>
398 STREAM&
printList( HISTO first, HISTO last, STREAM& stream, TERMINATOR term )
const 400 if ( !
header().empty() ) {
401 stream <<
header() << term;
404 if ( !footer().empty() ) {
405 stream << footer() << term;
423 template <
class HISTO,
class STREAM,
class TERMINATOR>
425 TERMINATOR term )
const 502 #endif // GAUDIUTILS_HISTOTABLEFORMAT_H helper namespace to collect useful definitions, types, constants and functions, related to manipulati...
STREAM & printMap(HISTO begin, HISTO end, const std::string &fmt1, const std::string &fmt2, STREAM &stream, TERMINATOR term)
Print the "associative sequence" (e.g.
STREAM & printMap(const MAP &histos, const std::string &fmt1, const std::string &fmt2, STREAM &stream, TERMINATOR term)
Print the "associative sequence" (e.g.
std::string m_header
the table header
void setHeader(std::string v)
set new header
GAUDI_API std::string format(const AIDA::IHistogram1D *histo, const std::string &fmt)
Make the string representation of the historgam according to the specified format.
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::...
void setFormat(std::string v)
set new format
const std::string & header() const
the table header
GAUDI_API std::string format(const std::string &val1, const std::string &val2, const std::string &fmt)
helper method to merge the headers for short format table
STREAM & printList(HISTO first, HISTO last, STREAM &stream, TERMINATOR term) const
print the simple sequence of histograms as table
const std::string & format() const
the format
Simple class for the customizeble printout of the histogram tables.
std::string m_footer
the table footer
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
void setFooter(std::string v)
set new footer
STREAM & printList(HISTO first, HISTO last, const std::string &fmt, STREAM &stream, TERMINATOR term)
print the simple sequence (list-like) of histograms as table
AttribStringParser::Iterator begin(const AttribStringParser &parser)
Helper functions to set/get the application return code.
std::string m_format
the defautl format
std::string toString(const Type &)
STREAM & printList(const LIST &histos, const std::string &fmt, STREAM &stream, TERMINATOR term)
print the simple container of histograms as table
const std::string & footer() const
the table footer