The Gaudi Framework  v36r9p1 (5c15b2bb)
Gaudi::Utils::Histos Namespace Reference

Namespaces

 Formats
 

Classes

class  HistoStrings
 
class  Table
 

Typedefs

typedef std::vector< std::stringLabels
 Typedef for a list of labels. More...
 
typedef std::pair< unsigned, std::stringBinLabel
 Typedef for a bin number and its associated label. More...
 
typedef std::vector< BinLabelBinLabels
 Typedef for a list of bin numbers and their associated label. More...
 

Functions

GAUDI_API void fill (AIDA::IHistogram1D *histo, const double value, const double weight=1.0)
 simple function to fill AIDA::IHistogram1D objects More...
 
GAUDI_API void fill (AIDA::IHistogram2D *histo, const double valueX, const double valueY, const double weight=1.0)
 simple function to fill AIDA::IHistogram2D objects More...
 
GAUDI_API void fill (AIDA::IHistogram3D *histo, const double valueX, const double valueY, const double valueZ, const double weight=1.0)
 simple function to fill AIDA::IHistogram3D objects More...
 
GAUDI_API void fill (AIDA::IProfile1D *histo, const double valueX, const double valueY, const double weight=1.0)
 simple function to fill AIDA::IProfile1D objects More...
 
GAUDI_API void fill (AIDA::IProfile2D *histo, const double valueX, const double valueY, const double valueZ, const double weight=1.0)
 simple function to fill AIDA::IProfile2D objects More...
 
GAUDI_API std::string htitle (const AIDA::IBaseHistogram *histo, const std::string &title="")
 get the title More...
 
GAUDI_API std::string htitle (const AIDA::IHistogram *histo, const std::string &title="")
 get the title More...
 
GAUDI_API std::string htitle (const AIDA::IHistogram1D *histo, const std::string &title="")
 get the title More...
 
GAUDI_API std::string htitle (const AIDA::IHistogram2D *histo, const std::string &title="")
 get the title More...
 
GAUDI_API std::string htitle (const AIDA::IHistogram3D *histo, const std::string &title="")
 get the title More...
 
GAUDI_API std::string htitle (const AIDA::IProfile *histo, const std::string &title="")
 get the title More...
 
GAUDI_API std::string htitle (const AIDA::IProfile1D *histo, const std::string &title="")
 get the title More...
 
GAUDI_API std::string htitle (const AIDA::IProfile2D *histo, const std::string &title="")
 get the title More...
 
GAUDI_API AIDA::IBaseHistogram * toBase (AIDA::IHistogram1D *histo)
 
GAUDI_API AIDA::IBaseHistogram * toBase (AIDA::IHistogram2D *histo)
 
GAUDI_API AIDA::IBaseHistogram * toBase (AIDA::IHistogram3D *histo)
 
GAUDI_API AIDA::IBaseHistogram * toBase (AIDA::IProfile1D *histo)
 
GAUDI_API AIDA::IBaseHistogram * toBase (AIDA::IProfile2D *histo)
 
GAUDI_API std::ostreamhistoDump_ (const AIDA::IHistogram1D *histo, std::ostream &stream, const std::size_t width=80, const std::size_t height=50, const bool errors=false)
 dump the text representation of the histogram More...
 
GAUDI_API std::string histoDump (const AIDA::IHistogram1D *histo, const std::size_t width=80, const std::size_t height=50, const bool errors=false)
 dump the text representation of the histogram More...
 
GAUDI_API std::ostreamhistoDump_ (const AIDA::IProfile1D *histo, std::ostream &stream, const std::size_t width=80, const std::size_t height=50, const bool spread=true)
 dump the text representation of 1D-profile More...
 
GAUDI_API std::string histoDump (const AIDA::IProfile1D *histo, const std::size_t width=80, const std::size_t height=50, const bool spread=true)
 dump the text representation of the 1D-profile More...
 
GAUDI_API std::ostreamhistoDump_ (const TProfile *histo, std::ostream &stream, const std::size_t width=80, const std::size_t height=50)
 dump the text representation of the Profile More...
 
GAUDI_API std::string histoDump (const TProfile *histo, const std::size_t width=80, const std::size_t height=50)
 dump the text representation of the histogram More...
 
GAUDI_API std::ostreamhistoDump_ (const TH1 *histo, std::ostream &stream, const std::size_t width=80, const std::size_t height=50, const bool errors=false)
 dump the text representation of the histogram More...
 
GAUDI_API std::string histoDump (const TH1 *histo, const std::size_t width=80, const std::size_t height=50, const bool errors=false)
 dump the text representation of the histogram More...
 
GAUDI_API bool setBinLabels (AIDA::IHistogram1D *hist, const Labels &labels)
 Set the Bin labels for a given 1D histogram. More...
 
GAUDI_API bool setBinLabels (AIDA::IHistogram1D *hist, const BinLabels &labels)
 Set the Bin labels for a given 1D histogram. More...
 
GAUDI_API bool setBinLabels (AIDA::IProfile1D *hist, const Labels &labels)
 Set the Bin labels for a given 1D profile histogram. More...
 
GAUDI_API bool setBinLabels (AIDA::IProfile1D *hist, const BinLabels &labels)
 Set the Bin labels for a given 1D profile histogram. More...
 
GAUDI_API bool setBinLabels (AIDA::IHistogram2D *hist, const Labels &xlabels, const Labels &ylabels)
 Set the Bin labels for a given 2D histogram. More...
 
GAUDI_API bool setBinLabels (AIDA::IHistogram2D *hist, const BinLabels &xlabels, const BinLabels &ylabels)
 Set the Bin labels for a given 2D histogram. More...
 
GAUDI_API bool setBinLabels (AIDA::IProfile2D *hist, const Labels &xlabels, const Labels &ylabels)
 Set the Bin labels for a given 2D profile histogram. More...
 
GAUDI_API bool setBinLabels (AIDA::IProfile2D *hist, const BinLabels &xlabels, const BinLabels &ylabels)
 Set the Bin labels for a given 2D profile histogram. More...
 
GAUDI_API bool setAxisLabels (AIDA::IHistogram1D *hist, const std::string &xAxis, const std::string &yAxis)
 Set the axis labels for the given 1D histogram. More...
 
GAUDI_API bool setAxisLabels (AIDA::IProfile1D *hist, const std::string &xAxis, const std::string &yAxis)
 Set the axis labels for the given 1D profile histogram. More...
 
GAUDI_API bool setAxisLabels (AIDA::IHistogram2D *hist, const std::string &xAxis, const std::string &yAxis)
 Set the axis labels for the given 2D histogram. More...
 
GAUDI_API bool setAxisLabels (AIDA::IProfile2D *hist, const std::string &xAxis, const std::string &yAxis)
 Set the axis labels for the given 2D profile histogram. More...
 
GAUDI_API std::string path (const AIDA::IBaseHistogram *aida)
 get the path in THS for AIDA histogram More...
 
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. More...
 
GAUDI_API std::string format (const AIDA::IProfile1D *histo, const std::string &fmt)
 Make the string representation of the profile histogram according to the specified format. More...
 
GAUDI_API std::string format (const AIDA::IHistogram1D *histo, const std::string &ID, const std::string &fmt1, const std::string &fmt2)
 format a full row in table, including ID, label, path or any other "extra" identifier in string form More...
 
GAUDI_API std::string format (const AIDA::IProfile1D *histo, const std::string &ID, const std::string &fmt1, const std::string &fmt2)
 format a full row in table, including ID, label, path or any other "extra" identifier in string form More...
 
template<class HISTO , class STREAM , class TERMINATOR >
STREAM & printList (HISTO first, HISTO last, const std::string &fmt, STREAM &stream, TERMINATOR term)
 print the simple sequence (list-like) of histograms as table More...
 
template<class LIST , class STREAM , class TERMINATOR >
STREAM & printList (const LIST &histos, const std::string &fmt, STREAM &stream, TERMINATOR term)
 print the simple container of histograms as table More...
 
template<class HISTO , class STREAM , class TERMINATOR >
STREAM & printMap (HISTO begin, HISTO end, const std::string &fmt1, const std::string &fmt2, STREAM &stream, TERMINATOR term)
 Print the "associative sequence" (e.g. More...
 
template<class MAP , class STREAM , class TERMINATOR >
STREAM & printMap (const MAP &histos, const std::string &fmt1, const std::string &fmt2, STREAM &stream, TERMINATOR term)
 Print the "associative sequence" (e.g. More...
 
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 More...
 
GAUDI_API std::ostreamtoXml (const TH1D &histo, std::ostream &stream)
 stream the ROOT histogram into output stream as XML More...
 
GAUDI_API std::ostreamtoXml (const TH2D &histo, std::ostream &stream)
 stream the ROOT histogram into output stream as XML More...
 
GAUDI_API std::ostreamtoXml (const TH3D &histo, std::ostream &stream)
 stream the ROOT histogram into output stream as XML More...
 
GAUDI_API std::ostreamtoXml (const TProfile &histo, std::ostream &stream)
 stream the ROOT histogram into output stream as XML More...
 
GAUDI_API std::ostreamtoXml (const TProfile2D &histo, std::ostream &stream)
 stream the ROOT histogram into output stream as XML More...
 
GAUDI_API std::ostreamtoXml (const AIDA::IHistogram1D &histo, std::ostream &stream)
 stream the AIDA histogram into the output stream as XML More...
 
GAUDI_API std::ostreamtoXml (const AIDA::IHistogram2D &histo, std::ostream &stream)
 stream the AIDA histogram into the output stream as XML More...
 
GAUDI_API std::ostreamtoXml (const AIDA::IHistogram3D &histo, std::ostream &stream)
 stream the AIDA histogram into the output stream as XML More...
 
GAUDI_API std::ostreamtoXml (const AIDA::IProfile1D &histo, std::ostream &stream)
 stream the AIDA histogram into the output stream as XML More...
 
GAUDI_API std::ostreamtoXml (const TH1F &histo, std::ostream &stream)
 stream the ROOT histogram into output stream as XML More...
 
GAUDI_API std::ostreamtoXml (const TH2F &histo, std::ostream &stream)
 stream the ROOT histogram into output stream as XML More...
 
GAUDI_API std::ostreamtoXml (const TH3F &histo, std::ostream &stream)
 stream the ROOT histogram into output stream as XML More...
 
GAUDI_API std::ostreamtoXml (const AIDA::IProfile2D &histo, std::ostream &stream)
 stream the AIDA histogram into the output stream as XML More...
 
GAUDI_API StatusCode fromXml (TH1D &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (TH2D &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (TH3D &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (TProfile &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (TProfile2D &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (TH1F &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (TH2F &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (TH3F &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (TH1D *&result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (TH2D *&result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (TH3D *&result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (TProfile *&result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (TProfile2D *&result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (AIDA::IHistogram1D &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (AIDA::IHistogram2D &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (AIDA::IHistogram3D &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (AIDA::IProfile1D &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 
GAUDI_API StatusCode fromXml (AIDA::IProfile2D &result, const std::string &input)
 parse the histogram from standard ROOT XML More...
 

Detailed Description

Collection of useful utilities for manipulations with AIDA hisgograms

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-08-08

Typedef Documentation

◆ BinLabel

Typedef for a bin number and its associated label.

Definition at line 35 of file HistoLabels.h.

◆ BinLabels

Typedef for a list of bin numbers and their associated label.

Definition at line 37 of file HistoLabels.h.

◆ Labels

Typedef for a list of labels.

Definition at line 33 of file HistoLabels.h.

Function Documentation

◆ fill() [1/5]

void Gaudi::Utils::Histos::fill ( AIDA::IHistogram1D *  histo,
const double  value,
const double  weight = 1.0 
)

simple function to fill AIDA::IHistogram1D objects

See also
AIDA::IHistogram1D
Parameters
histopointer to the histogram
valuevalue to be added to the histogram
weightthe "weight" assciated with this entry
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-10-02

Definition at line 45 of file Fill.cpp.

45  {
46  if ( histo ) { histo->fill( value, weight ); }
47 }

◆ fill() [2/5]

void Gaudi::Utils::Histos::fill ( AIDA::IHistogram2D *  histo,
const double  valueX,
const double  valueY,
const double  weight = 1.0 
)

simple function to fill AIDA::IHistogram2D objects

See also
AIDA::IHistogram2D
Parameters
histopointer to the histogram
valueXvalue to be added to the histogram
valueYvalue to be added to the histogram
weightthe "weight" assciated with this entry
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-10-02

Definition at line 59 of file Fill.cpp.

60  {
61  if ( histo ) { histo->fill( valueX, valueY, weight ); }
62 }

◆ fill() [3/5]

void Gaudi::Utils::Histos::fill ( AIDA::IHistogram3D *  histo,
const double  valueX,
const double  valueY,
const double  valueZ,
const double  weight = 1.0 
)

simple function to fill AIDA::IHistogram3D objects

See also
AIDA::IHistogram3D
Parameters
histopointer to the histogram
valueXvalue to be added to the histogram
valueYvalue to be added to the histogram
valueZvalue to be added to the histogram
weightthe "weight" assciated with this entry
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-10-02

Definition at line 75 of file Fill.cpp.

76  {
77  if ( histo ) { histo->fill( valueX, valueY, valueZ, weight ); }
78 }

◆ fill() [4/5]

void Gaudi::Utils::Histos::fill ( AIDA::IProfile1D *  histo,
const double  valueX,
const double  valueY,
const double  weight = 1.0 
)

simple function to fill AIDA::IProfile1D objects

See also
AIDA::IProfile1D
Parameters
histopointer to the histogram
valueXvalue to be added to the histogram
valueYvalue to be added to the histogram
weightthe "weight" assciated with this entry
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-10-02

Definition at line 90 of file Fill.cpp.

91  {
92  if ( histo ) { histo->fill( valueX, valueY, weight ); }
93 }

◆ fill() [5/5]

void Gaudi::Utils::Histos::fill ( AIDA::IProfile2D *  histo,
const double  valueX,
const double  valueY,
const double  valueZ,
const double  weight = 1.0 
)

simple function to fill AIDA::IProfile2D objects

See also
AIDA::IProfile2D
Parameters
histopointer to the histogram
valueXvalue to be added to the histogram
valueYvalue to be added to the histogram
valueZvalue to be added to the histogram
weightthe "weight" assciated with this entry
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-10-02

Definition at line 106 of file Fill.cpp.

107  {
108  if ( histo ) { histo->fill( valueX, valueY, valueZ, weight ); }
109 }

◆ format() [1/5]

std::string Gaudi::Utils::Histos::format ( const AIDA::IHistogram1D *  histo,
const std::string fmt 
)

Make the string representation of the histogram according to the specified format.

The method could be used to access/print various quantities

using namespace Gaudi::Utils::Histos ;
const AIDA::IHistogram1D* histo = ... ;
// print title in a free format:
std::cout << format ( histo , "%2%" ) << std::endl ;
// print the path in HTS in a free format:
std::cout << format ( histo , " path in HTS: %1% " ) << std::endl ;
// print the formatted nEntries/Overflow/Underflow:
format ( histo , " #nEntries/Overflow/Underflow=%3%/%4%/%5%" )
<< std::endl ;
// print the formatted Mean+-ErrorMean:
format ( histo , " Mean+-Error=(%8%+-%9%)" )
<< std::endl ;
// print the skewness and kurtosis:
format ( histo , " Skewness/Kurtosis=%12%/%14% " )
<< std::endl ;
Parameters
historeference to the histogram
fmtthe printout format
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-08-08

Definition at line 233 of file HistoTableFormat.cpp.

233  {
234  if ( !histo ) { return "<NULL>"; }
235  using namespace Gaudi::Utils;
236  using namespace boost::io;
237  boost::format _fmt( fmt );
238  // allow various number of arguments
239  _fmt.exceptions( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) );
240 
241  _fmt % ( "\"" + path( histo ) + "\"" ) // 1) histogram path
242  % ( "\"" + _title( histo ) + "\"" ) // 2) title
243  % histo->allEntries() // 3) # entries
244  % histo->binEntries( AIDA::IAxis::UNDERFLOW_BIN ) // 4) # underflow
245  % histo->binEntries( AIDA::IAxis::OVERFLOW_BIN ) // 5) # overflow
246  % HistoStats::nEff( histo ) // 6) equivalent entries
247  % histo->sumBinHeights() // 7) integral
248  % HistoStats::mean( histo ) // 8) mean value
249  % HistoStats::meanErr( histo ) // 9) error in mean
250  % HistoStats::rms( histo ) // 10) rms
251  % HistoStats::rmsErr( histo ) // 11) error in rms
252  % HistoStats::skewness( histo ) // 12) skewness
253  % HistoStats::skewnessErr( histo ) // 13) error in skewness
254  % HistoStats::kurtosis( histo ) // 14) kurtosis
255  % HistoStats::kurtosisErr( histo ) // 15) error in kurtosis
256  //
257  % histo->sumAllBinHeights() // 16) full integral (in and out range)
258  % HistoStats::sumAllBinHeightErr( histo ) // 17) error on 16
259  % HistoStats::sumBinHeightErr( histo ) // 18) error on 7
260  //
261  % ( 100 * HistoStats::underflowEntriesFrac( histo ) ) // 19) fraction of underflow entries
262  % ( 100 * HistoStats::underflowEntriesFracErr( histo ) ) // 20) error on 19
263  % ( 100 * HistoStats::overflowEntriesFrac( histo ) ) // 21) fraction of overflow entries
264  % ( 100 * HistoStats::overflowEntriesFracErr( histo ) ) // 22) error on 21
265  //
266  % HistoStats::underflowIntegralFrac( histo ) // 23) fraction of underflow integral
267  % HistoStats::underflowIntegralFracErr( histo ) // 24) error on 23
268  % HistoStats::overflowIntegralFrac( histo ) // 25) fraction of overflow intergal
269  % HistoStats::overflowIntegralFracErr( histo ) // 26) error on 25
270  ;
271 
272  return _fmt.str();
273 }

◆ format() [2/5]

std::string Gaudi::Utils::Histos::format ( const AIDA::IHistogram1D *  histo,
const std::string ID,
const std::string fmt1,
const std::string fmt2 
)

format a full row in table, including ID, label, path or any other "extra" identifier in string form

using namespace Gaudi::Utils::Histos
const AIDA::IHistogram1D* histo = ... ;
// define short format
const std::string fmt1 = " |%1$-30.30s %|33t| %2" ;
// define format for the histogram
const std::string fmt2 = ... ;
info () <<
format ( "My Histo" , histo , fmt1 , fmt2 )
<< endmsg ;
Parameters
histopointer to the histogram
IDhistorgam ID, title, label or other extra information
fmt1"short" format used for the table
fmt2format used for the histogram printout
Returns
formatted row
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-08-08

Definition at line 325 of file HistoTableFormat.cpp.

326  {
327  using namespace boost::io;
328  boost::format _fmt( fmt1 );
329  // allow various number of arguments
330  _fmt.exceptions( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) );
331  //
332  _fmt % ID // format ID
333  % format( histo, fmt2 ); // format the histogram
334  //
335  return _fmt.str();
336 }

◆ format() [3/5]

std::string Gaudi::Utils::Histos::format ( const AIDA::IProfile1D *  histo,
const std::string fmt 
)

Make the string representation of the profile histogram according to the specified format.

The method could be used to access/print various quantities

using namespace Gaudi::Utils::Histos ;
const AIDA::IProfile1D* histo = ... ;
// print title in a free format:
std::cout << format ( histo , "%2%" ) << std::endl ;
// print the path in HTS in a free format:
std::cout << format ( histo , " path in HTS: %1% " ) << std::endl ;
Parameters
historeference to the histogram
fmtthe printout format
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-08-08

Definition at line 279 of file HistoTableFormat.cpp.

279  {
280  if ( !histo ) { return "<NULL>"; }
281  using namespace Gaudi::Utils;
282  using namespace boost::io;
283  boost::format _fmt( fmt );
284  // allow various number of arguments
285  _fmt.exceptions( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) );
286 
287  _fmt % ( "\"" + path( histo ) + "\"" ) // 1) histogram path
288  % ( "\"" + _title( histo ) + "\"" ) // 2) title
289  % histo->allEntries() // 3) # entries
290  % histo->binEntries( AIDA::IAxis::UNDERFLOW_BIN ) // 4) # underflow
291  % histo->binEntries( AIDA::IAxis::OVERFLOW_BIN ) // 5) # overflow
292  % HistoStats::nEff( histo ) // 6) equivalent entries
293  % histo->sumBinHeights() // 7) integral
294  % HistoStats::mean( histo ) // 8) mean value
295  % HistoStats::meanErr( histo ) // 9) error in mean
296  % HistoStats::rms( histo ) // 10) rms
297  % HistoStats::rmsErr( histo ) // 11) error in rms
298  % HistoStats::skewness( histo ) // 12) skewness
299  % HistoStats::skewnessErr( histo ) // 13) error in skewness
300  % HistoStats::kurtosis( histo ) // 14) kurtosis
301  % HistoStats::kurtosisErr( histo ) // 15) error in kurtosis
302  //
303  % histo->sumAllBinHeights() // 16) full integral (in and out range)
304  % HistoStats::sumAllBinHeightErr( histo ) // 17) error on 16
305  % HistoStats::sumBinHeightErr( histo ) // 18) error on 7
306  //
307  % ( 100 * HistoStats::underflowEntriesFrac( histo ) ) // 19) fraction of underflow entries
308  % ( 100 * HistoStats::underflowEntriesFracErr( histo ) ) // 20) error on 19
309  % ( 100 * HistoStats::overflowEntriesFrac( histo ) ) // 21) fraction of overflow entries
310  % ( 100 * HistoStats::overflowEntriesFracErr( histo ) ) // 22) error on 21
311  //
312  % HistoStats::underflowIntegralFrac( histo ) // 23) fraction of underflow integral
313  % HistoStats::underflowIntegralFracErr( histo ) // 24) error on 23
314  % HistoStats::overflowIntegralFrac( histo ) // 25) fraction of overflow intergal
315  % HistoStats::overflowIntegralFracErr( histo ) // 26) error on 25
316  ;
317 
318  return _fmt.str();
319 }

◆ format() [4/5]

std::string Gaudi::Utils::Histos::format ( const AIDA::IProfile1D *  histo,
const std::string ID,
const std::string fmt1,
const std::string fmt2 
)

format a full row in table, including ID, label, path or any other "extra" identifier in string form

using namespace Gaudi::Utils::Histos
const AIDA::IProfile1D* histo = ... ;
// define short format
const std::string fmt1 = " |%1$-30.30s %|33t| %2" ;
// define format for the histogram
const std::string fmt2 = ... ;
info () <<
format ( "My Histo" , histo , fmt1 , fmt2 )
<< endmsg ;
Parameters
histopointer to the histogram
IDhistorgam ID, title, label or other extra information
fmt1"short" format used for the table
fmt2format used for the histogram printout
Returns
formatted row
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-08-08

Definition at line 342 of file HistoTableFormat.cpp.

343  {
344  using namespace boost::io;
345  boost::format _fmt( fmt1 );
346  // allow various number of arguments
347  _fmt.exceptions( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) );
348  //
349  _fmt % ID // format ID
350  % format( histo, fmt2 ); // format the histogram
351  //
352  return _fmt.str();
353 }

◆ format() [5/5]

std::string Gaudi::Utils::Histos::format ( const std::string val1,
const std::string val2,
const std::string fmt 
)

helper method to merge the headers for short format table

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-08-07

Definition at line 357 of file HistoTableFormat.cpp.

357  {
358  using namespace boost::io;
359  boost::format _fmt( fmt );
360  // allow various number of arguments
361  _fmt.exceptions( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) );
362  //
363  _fmt % val1 // format ID
364  % val2; // format the histogram
365  //
366  return _fmt.str();
367 }

◆ fromXml() [1/18]

StatusCode Gaudi::Utils::Histos::fromXml ( AIDA::IHistogram1D &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 429 of file HistoXML.cpp.

429  {
430  auto root = Gaudi::Utils::Aida2ROOT::aida2root( &result );
431  return root ? fromXml( *root, input ) : StatusCode::FAILURE; // RETURN
432 }

◆ fromXml() [2/18]

StatusCode Gaudi::Utils::Histos::fromXml ( AIDA::IHistogram2D &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 440 of file HistoXML.cpp.

440  {
441  auto root = Gaudi::Utils::Aida2ROOT::aida2root( &result );
442  return root ? fromXml( *root, input ) : StatusCode::FAILURE; // RETURN
443 }

◆ fromXml() [3/18]

StatusCode Gaudi::Utils::Histos::fromXml ( AIDA::IHistogram3D &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 451 of file HistoXML.cpp.

451  {
452  auto root = Gaudi::Utils::Aida2ROOT::aida2root( &result );
453  return root ? fromXml( *root, input ) : StatusCode::FAILURE; // RETURN
454 }

◆ fromXml() [4/18]

StatusCode Gaudi::Utils::Histos::fromXml ( AIDA::IProfile1D &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 462 of file HistoXML.cpp.

462  {
463  auto root = Gaudi::Utils::Aida2ROOT::aida2root( &result );
464  return root ? fromXml( *root, input ) : StatusCode::FAILURE; // RETURN
465 }

◆ fromXml() [5/18]

StatusCode Gaudi::Utils::Histos::fromXml ( AIDA::IProfile2D &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 473 of file HistoXML.cpp.

473  {
474  auto root = Gaudi::Utils::Aida2ROOT::aida2root( &result );
475  return root ? fromXml( *root, input ) : StatusCode::FAILURE; // RETURN
476 }

◆ fromXml() [6/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TH1D &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 197 of file HistoXML.cpp.

197  {
198  //
199  result.Reset(); // RESET old histogram
200  //
201 
202  auto histo = _Xml<TH1D>( input );
203  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
204  //
205  histo->Copy( result );
206  //
207  return StatusCode::SUCCESS;
208 }

◆ fromXml() [7/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TH1D *&  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 343 of file HistoXML.cpp.

343  {
344  if ( result ) { return fromXml( *result, input ); }
345  //
346  auto histo = _Xml<TH1D>( input );
347  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
348  //
349  result = histo.release(); // ASSIGN
350  //
351  return StatusCode::SUCCESS;
352 }

◆ fromXml() [8/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TH1F &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 252 of file HistoXML.cpp.

252  {
253  //
254  result.Reset(); // RESET old histogram
255  //
256  auto histo = _Xml<TH1F>( input );
257  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
258  //
259  histo->Copy( result );
260  //
261  return StatusCode::SUCCESS;
262 }

◆ fromXml() [9/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TH2D &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 216 of file HistoXML.cpp.

216  {
217  //
218  result.Reset(); // RESET old histogram
219  //
220  auto histo = _Xml<TH2D>( input );
221  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
222  //
223  histo->Copy( result );
224  //
225  return StatusCode::SUCCESS;
226 }

◆ fromXml() [10/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TH2D *&  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 360 of file HistoXML.cpp.

360  {
361  if ( result ) { return fromXml( *result, input ); }
362  //
363  auto histo = _Xml<TH2D>( input );
364  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
365  //
366  result = histo.release(); // ASSIGN
367  //
368  return StatusCode::SUCCESS;
369 }

◆ fromXml() [11/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TH2F &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 270 of file HistoXML.cpp.

270  {
271  //
272  result.Reset(); // RESET old histogram
273  //
274  auto histo = _Xml<TH2F>( input );
275  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
276  //
277  histo->Copy( result );
278  //
279  return StatusCode::SUCCESS;
280 }

◆ fromXml() [12/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TH3D &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 234 of file HistoXML.cpp.

234  {
235  //
236  result.Reset(); // RESET old histogram
237  //
238  auto histo = _Xml<TH3D>( input );
239  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
240  //
241  histo->Copy( result );
242  //
243  return StatusCode::SUCCESS;
244 }

◆ fromXml() [13/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TH3D *&  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 377 of file HistoXML.cpp.

377  {
378  if ( result ) { return fromXml( *result, input ); }
379  //
380  auto histo = _Xml<TH3D>( input );
381  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
382  //
383  result = histo.release(); // ASSIGN
384  //
385  return StatusCode::SUCCESS;
386 }

◆ fromXml() [14/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TH3F &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 288 of file HistoXML.cpp.

288  {
289  //
290  result.Reset(); // RESET old histogram
291  //
292  auto histo = _Xml<TH3F>( input );
293  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
294  //
295  histo->Copy( result );
296  //
297  return StatusCode::SUCCESS;
298 }

◆ fromXml() [15/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TProfile &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 306 of file HistoXML.cpp.

306  {
307  //
308  result.Reset(); // RESET old histogram
309  //
310  auto histo = _Xml<TProfile>( input );
311  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
312  //
313  histo->Copy( result );
314  //
315  return StatusCode::SUCCESS;
316 }

◆ fromXml() [16/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TProfile *&  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 395 of file HistoXML.cpp.

395  {
396  if ( result ) { return fromXml( *result, input ); }
397  //
398  auto histo = _Xml<TProfile>( input );
399  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
400  //
401  result = histo.release(); // ASSIGN
402  //
403  return StatusCode::SUCCESS;
404 }

◆ fromXml() [17/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TProfile2D &  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 324 of file HistoXML.cpp.

324  {
325  //
326  result.Reset(); // RESET old histogram
327  //
328  auto histo = _Xml<TProfile2D>( input );
329  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
330  //
331  histo->Copy( result );
332  //
333  return StatusCode::SUCCESS;
334 }

◆ fromXml() [18/18]

StatusCode Gaudi::Utils::Histos::fromXml ( TProfile2D *&  result,
const std::string input 
)

parse the histogram from standard ROOT XML

See also
TBufferXML
TBufferXML::ConvertFromXML
Parameters
result(OUTPUT) the parsed histogram
input(INPUT) the input XML string
Returns
status code

Definition at line 412 of file HistoXML.cpp.

412  {
413  if ( result ) { return fromXml( *result, input ); }
414  //
415  auto histo = _Xml<TProfile2D>( input );
416  if ( !histo ) { return StatusCode::FAILURE; } // RETURN
417  //
418  result = histo.release(); // ASSIGN
419  //
420  return StatusCode::SUCCESS;
421 }

◆ histoDump() [1/4]

std::string Gaudi::Utils::Histos::histoDump ( const AIDA::IHistogram1D *  histo,
const std::size_t  width = 80,
const std::size_t  height = 50,
const bool  errors = false 
)

dump the text representation of the histogram

Parameters
histo(INPUT) the histogram
width(INPUT) the maximal column width
height(INPUT) the proposed column height
erorrs(INPUT) print/plot errors
Returns
string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.BEly.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-19

Definition at line 624 of file HistoDump.cpp.

625  {
627  histoDump_( histo, stream, width, height, errors );
628  return stream.str();
629 }

◆ histoDump() [2/4]

std::string Gaudi::Utils::Histos::histoDump ( const AIDA::IProfile1D *  histo,
const std::size_t  width = 80,
const std::size_t  height = 50,
const bool  spread = true 
)

dump the text representation of the 1D-profile

Parameters
histo(INPUT) the histogram
width(INPUT) the maximal column width
height(INPUT) the proposed column height
spread(INPUT) print/plto spread vs rms
Returns
string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.BEly.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-19

Definition at line 688 of file HistoDump.cpp.

689  {
691  histoDump_( histo, stream, width, height, spread );
692  return stream.str();
693 }

◆ histoDump() [3/4]

std::string Gaudi::Utils::Histos::histoDump ( const TH1 *  histo,
const std::size_t  width = 80,
const std::size_t  height = 50,
const bool  errors = false 
)

dump the text representation of the histogram

Parameters
histo(INPUT) the histogram
width(INPUT) the maximal column width
height(INPUT) the propsoed coulmn height
erorrs(INPUT) print/plot errors
Returns
string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-19

Definition at line 784 of file HistoDump.cpp.

785  {
787  histoDump_( histo, stream, width, height, errors );
788  return stream.str();
789 }

◆ histoDump() [4/4]

std::string Gaudi::Utils::Histos::histoDump ( const TProfile *  histo,
const std::size_t  width = 80,
const std::size_t  height = 50 
)

dump the text representation of the histogram

Parameters
histo(INPUT) the histogram
width(INPUT) the maximal column width
height(INPUT) the propsoed coulmn height
erorrs(INPUT) print/plot errors
Returns
string representation of the histogram
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-19

Definition at line 800 of file HistoDump.cpp.

801  {
803  histoDump_( histo, stream, width, height );
804  return stream.str();
805 }

◆ histoDump_() [1/4]

std::ostream & Gaudi::Utils::Histos::histoDump_ ( const AIDA::IHistogram1D *  histo,
std::ostream stream,
const std::size_t  width = 80,
const std::size_t  height = 50,
const bool  errors = false 
)

dump the text representation of the histogram

Parameters
histo(INPUT) the histogram
stream(OUTUT) the stream
width(INPUT) the maximal column width
height(INPUT) the proposed column height
errors(INPUT) print/plot errors
Returns
the stream
Author
Vanya BELYAEV Ivan..nosp@m.BEly.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-19

Definition at line 571 of file HistoDump.cpp.

572  {
573  stream << std::endl;
574  if ( !histo ) { return stream; } // RETURN
575  Histo hist;
576  StatusCode sc = _getHisto( histo, hist );
577  if ( sc.isFailure() ) { return stream; } // RETURN
578 
579  stream << fmt::format( R"( Histo TES : "{}"
580  Histo Title : "{}"
581 
582  Mean : {:11.5g} +- {:<10.4g}
583  Rms : {:11.5g} +- {:<10.4g}
584  Skewness : {:11.5g} +- {:<10.4g}
585  Kurtosis : {:11.5g} +- {:<10.4g}
586 
587  Entries :
588  | All | In Range | Underflow | Overflow | #Equivalent | Integral | Total |
589  | {:^9} | {:^9} | {:^9} | {:^9} | {:^11.5g} | {:^11.5g} | {:^11.5g} |
590 
591 )",
592  path( histo ), histo->title(), //
597  histo->allEntries(), histo->entries(), histo->binEntries( AIDA::IAxis::UNDERFLOW_BIN ),
598  histo->binEntries( AIDA::IAxis::OVERFLOW_BIN ), histo->equivalentBinEntries(),
599  histo->sumBinHeights(), histo->sumAllBinHeights() );
600 
601  const AIDA::IAnnotation& a = histo->annotation();
602  if ( a.size() ) {
603  stream << " Annotation\n";
604  for ( int i = 0; i < a.size(); ++i ) {
605  stream << fmt::format( " | {:<25.25s} : {:<45.45s} |\n", a.key( i ), a.value( i ) );
606  }
607  stream << '\n';
608  }
609 
610  return dumpText( hist, width, height, errors, stream );
611 }

◆ histoDump_() [2/4]

std::ostream & Gaudi::Utils::Histos::histoDump_ ( const AIDA::IProfile1D *  histo,
std::ostream stream,
const std::size_t  width = 80,
const std::size_t  height = 50,
const bool  spread = true 
)

dump the text representation of 1D-profile

Parameters
histo(INPUT) the 1D-profile
stream(OUTUT) the stream
width(INPUT) the maximal column width
height(INPUT) the proposed column height
spread(INPUT) print/plot spread/rms ?
Returns
the stream
Author
Vanya BELYAEV Ivan..nosp@m.BEly.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-19

Definition at line 642 of file HistoDump.cpp.

643  {
644  stream << std::endl;
645  if ( !histo ) { return stream; } // RETURN
646  Histo hist;
647  StatusCode sc = _getHisto( histo, hist, spread );
648  if ( sc.isFailure() ) { return stream; } // RETURN
649 
650  stream << fmt::format( R"( Histo TES : "{}"
651  Histo Title : "{}"
652 
653  Mean : {:11.5g}
654  Rms : {:11.5g}
655 
656  Entries :
657  | All | In Range | Underflow | Overflow | Integral | Total |
658  | {:^9} | {:^9} | {:^9} | {:^9} | {:^11.5g} | {:^11.5g} |
659 
660 )",
661  path( histo ), histo->title(), //
662  histo->mean(), histo->rms(), histo->allEntries(), histo->entries(),
663  histo->binEntries( AIDA::IAxis::UNDERFLOW_BIN ),
664  histo->binEntries( AIDA::IAxis::OVERFLOW_BIN ), histo->sumBinHeights(),
665  histo->sumAllBinHeights() );
666 
667  const AIDA::IAnnotation& a = histo->annotation();
668  if ( a.size() ) {
669  stream << " Annotation\n";
670  for ( int i = 0; i < a.size(); ++i ) {
671  stream << fmt::format( " | {:<25.25s} : {:<45.45s} |\n", a.key( i ), a.value( i ) );
672  }
673  stream << std::endl;
674  }
675 
676  return dumpText( hist, width, height, true, stream );
677 }

◆ histoDump_() [3/4]

std::ostream & Gaudi::Utils::Histos::histoDump_ ( const TH1 *  histo,
std::ostream stream,
const std::size_t  width = 80,
const std::size_t  height = 50,
const bool  errors = false 
)

dump the text representation of the histogram

Parameters
histo(INPUT) the histogram
stream(OUTUT) the stream
width(INPUT) the maximal column width
height(INPUT) the proposed coulmn height
errors(INPUT) print/plot errors
Returns
the stream
Author
Vanya BELYAEV Ivan..nosp@m.BEly.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-19

Definition at line 705 of file HistoDump.cpp.

706  {
707  const TProfile* profile = dynamic_cast<const TProfile*>( histo );
708  if ( profile ) { return histoDump_( profile, stream, width, height ); }
709  //
710  stream << std::endl;
711  if ( !histo ) { return stream; } // RETURN
712  Histo hist;
713  StatusCode sc = _getHisto( histo, hist );
714  if ( sc.isFailure() ) { return stream; } // RETURN
715 
716  stream << fmt::format( R"( Histo Name : "{}"
717  Histo Title : "{}"
718 
719  Mean : {:11.5g} +- {:<10.4g}
720  Rms : {:11.5g} +- {:<10.4g}
721  Skewness : {:11.5g}
722  Kurtosis : {:11.5g}
723 
724  Entries :
725  | All | Underflow | Overflow | #Equivalent | Integral |
726  | {:^11.5g} | {:^11.5g} | {:^11.5g} | {:^11.5g} | {:^11.5g} |
727 
728 )",
729  histo->GetName(), histo->GetTitle(), //
730  histo->GetMean(), histo->GetMeanError(), histo->GetRMS(), histo->GetRMSError(),
731  histo->GetSkewness(), histo->GetKurtosis(), histo->GetEntries(), histo->GetBinContent( 0 ),
732  histo->GetBinContent( histo->GetNbinsX() + 1 ), histo->GetEffectiveEntries(),
733  histo->Integral() );
734 
735  return dumpText( hist, width, height, errors, stream );
736 }

◆ histoDump_() [4/4]

std::ostream & Gaudi::Utils::Histos::histoDump_ ( const TProfile *  histo,
std::ostream stream,
const std::size_t  width = 80,
const std::size_t  height = 50 
)

dump the text representation of the Profile

Parameters
histo(INPUT) the histogram
stream(OUTUT) the stream
width(INPUT) the maximal column width
height(INPUT) the proposed coulmn height
spread(INPUT) print/plot rms versus erorr
Returns
the stream
Author
Vanya BELYAEV Ivan..nosp@m.BEly.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-19

Definition at line 748 of file HistoDump.cpp.

749  {
750  stream << std::endl;
751  if ( !histo ) { return stream; } // RETURN
752  Histo hist;
753  StatusCode sc = _getHisto( histo, hist, true );
754  if ( sc.isFailure() ) { return stream; } // RETURN
755 
756  stream << fmt::format( R"( Profile Name : "{}"
757  Profile Title : "{}"
758 
759  Mean : {:11.5g}
760  Rms : {:11.5g}
761 
762  Entries :
763  | All | Underflow | Overflow | Integral |
764  | {:^11.5g} | {:^11.5g} | {:^11.5g} | {:^11.5g} |
765 
766 )",
767  histo->GetName(), histo->GetTitle(), //
768  histo->GetMean(), histo->GetRMS(), histo->GetSkewness(), histo->GetKurtosis(),
769  histo->GetEntries(), histo->GetBinContent( 0 ), histo->GetBinContent( histo->GetNbinsX() + 1 ),
770  histo->Integral() );
771 
772  return dumpText( hist, width, height, true, stream );
773 }

◆ htitle() [1/8]

std::string Gaudi::Utils::Histos::htitle ( const AIDA::IBaseHistogram *  histo,
const std::string title = "" 
)

get the title

Definition at line 119 of file Fill.cpp.

119  {
120  return htitle_( histo, title );
121 }

◆ htitle() [2/8]

std::string Gaudi::Utils::Histos::htitle ( const AIDA::IHistogram *  histo,
const std::string title = "" 
)

get the title

Definition at line 125 of file Fill.cpp.

125  {
126  return htitle_( histo, title );
127 }

◆ htitle() [3/8]

std::string Gaudi::Utils::Histos::htitle ( const AIDA::IHistogram1D *  histo,
const std::string title = "" 
)

get the title

Definition at line 131 of file Fill.cpp.

131  {
132  return htitle_( histo, title );
133 }

◆ htitle() [4/8]

std::string Gaudi::Utils::Histos::htitle ( const AIDA::IHistogram2D *  histo,
const std::string title = "" 
)

get the title

Definition at line 137 of file Fill.cpp.

137  {
138  return htitle_( histo, title );
139 }

◆ htitle() [5/8]

std::string Gaudi::Utils::Histos::htitle ( const AIDA::IHistogram3D *  histo,
const std::string title = "" 
)

get the title

Definition at line 143 of file Fill.cpp.

143  {
144  return htitle_( histo, title );
145 }

◆ htitle() [6/8]

std::string Gaudi::Utils::Histos::htitle ( const AIDA::IProfile *  histo,
const std::string title = "" 
)

get the title

Definition at line 149 of file Fill.cpp.

149  {
150  return htitle_( histo, title );
151 }

◆ htitle() [7/8]

std::string Gaudi::Utils::Histos::htitle ( const AIDA::IProfile1D *  histo,
const std::string title = "" 
)

get the title

Definition at line 155 of file Fill.cpp.

155  {
156  return htitle_( histo, title );
157 }

◆ htitle() [8/8]

std::string Gaudi::Utils::Histos::htitle ( const AIDA::IProfile2D *  histo,
const std::string title = "" 
)

get the title

Definition at line 161 of file Fill.cpp.

161  {
162  return htitle_( histo, title );
163 }

◆ path()

std::string Gaudi::Utils::Histos::path ( const AIDA::IBaseHistogram *  aida)

get the path in THS for AIDA histogram

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-08-08

Definition at line 218 of file HistoTableFormat.cpp.

218  {
219  if ( !aida ) { return ""; } // RETURN
220  const auto object = dynamic_cast<const DataObject*>( aida );
221  if ( !object ) { return ""; } // RETURN
222  const auto registry = object->registry();
223  if ( !registry ) { return ""; } // RETURN
224  const auto _path = registry->identifier();
225  const auto n = _path.find( "/stat/" );
226  return ( 0 == n ? std::string( _path, 6 ) : _path ); // RETURN
227 }

◆ printList() [1/2]

template<class LIST , class STREAM , class TERMINATOR >
STREAM& Gaudi::Utils::Histos::printList ( const LIST &  histos,
const std::string fmt,
STREAM &  stream,
TERMINATOR  term 
)
inline

print the simple container of histograms as table

using namespace Gaudi::Utils::Histos ;
SEQUENCE histos = ... ;
// print a table with three columns: path, title and #entries
( histos ,
" | %1$|-40.40s | %2$-30.30s | %3$=7d | " ,
'\n' ) ;
Parameters
histosthe sequence of histograms
streamthe stream to be used for printout
termthe terminmator for the stream
fmtthe format to be used

Definition at line 316 of file HistoTableFormat.h.

316  {
317  return printList( histos.begin(), histos.end(), fmt, stream, term );
318  }

◆ printList() [2/2]

template<class HISTO , class STREAM , class TERMINATOR >
STREAM& Gaudi::Utils::Histos::printList ( HISTO  first,
HISTO  last,
const std::string fmt,
STREAM &  stream,
TERMINATOR  term 
)
inline

print the simple sequence (list-like) of histograms as table

SEQUENCE histos = ... ;
// print a table with three colums path, title and #entries
( histos.begin () ,
histos.end () ,
" | %1$|-40.40s | %2$-30.30s | %3$=7d | " ,
'\n' ) ;
Parameters
firstbegin-iterator for the sequence
lastend-iterator for the sequence
streamthe stream to be used for printout
termthe terminmator for the stream
fmtthe format to be used

Definition at line 287 of file HistoTableFormat.h.

287  {
288  for ( ; first != last; ++first ) { stream << format( *first, fmt ) << term; } // print table rows
289  return stream; // RETURN
290  }

◆ printMap() [1/2]

template<class MAP , class STREAM , class TERMINATOR >
STREAM& Gaudi::Utils::Histos::printMap ( const MAP &  histos,
const std::string fmt1,
const std::string fmt2,
STREAM &  stream,
TERMINATOR  term 
)
inline

Print the "associative sequence" (e.g.

part of std:map) of histograms as table:

using namespace Gaudi::Utils::Histos ;
( m ,
"| %1$-10.10s | %2% " , // short format
Gaudi::Utils::Histos::Formats::histoFormatOnly ,
always() ,
endmsg ) ;

Print only mean and rms:

using namespace Gaudi::Utils::Histos ;
( m ,
"| %1$-10.10s | %2% " , // short format
" %8$10.5g+-%10$-10.5g|", // mean+-rms
always() ,
endmsg ) ;
Parameters
begin'begin'-iterator for the mapping sequence
end'end'-iterator for the mapping sequence
fmt1'short' format for the table printout
fmt3format for the printout of the histogram
streamthe stream for printout
termstream terminator

Definition at line 419 of file HistoTableFormat.h.

420  {
421  return printMap( histos.begin(), histos.end(), fmt1, fmt2, stream, term );
422  }

◆ printMap() [2/2]

template<class HISTO , class STREAM , class TERMINATOR >
STREAM& Gaudi::Utils::Histos::printMap ( HISTO  begin,
HISTO  end,
const std::string fmt1,
const std::string fmt2,
STREAM &  stream,
TERMINATOR  term 
)
inline

Print the "associative sequence" (e.g.

part of std:map) of histograms as table:

using namespace Gaudi::Utils::Histos ;
( m.begin () ,
m.end () ,
"| %1$-10.10s | %2% " , // short format
Gaudi::Utils::Histos::Formats::histoFormatOnly ,
always() ,
endmsg ) ;

Print only mean and rms:

using namespace Gaudi::Utils::Histos ;
( m.begin () ,
m.end () ,
"| %1$-10.10s | %2% " , // short format
" %8$10.5g+-%10$-10.5g|", // mean+-rms
always() ,
endmsg ) ;
Parameters
begin'begin'-iterator for the mapping sequence
end'end'-iterator for the mapping sequence
fmt1'short' format for the table printout
fmt3format for the printout of the histogram
streamthe stream for printout
termstream terminator

Definition at line 365 of file HistoTableFormat.h.

366  {
367  for ( ; begin != end; ++begin ) {
368  stream << format( begin->second, // the histogram
369  begin->first, // the key
370  fmt1, fmt2 )
371  << term;
372  }
373  return stream;
374  }

◆ setAxisLabels() [1/4]

bool Gaudi::Utils::Histos::setAxisLabels ( AIDA::IHistogram1D *  hist,
const std::string xAxis,
const std::string yAxis 
)

Set the axis labels for the given 1D histogram.

Parameters
histPointer to the histogram
xAxisLabel for the x axis
yAxisLabel for the y axis
Returns
Boolean indicating if the labels were successfully applied or not
Return values
TRUELabels were applied OK
FALSELabels were NOT applied

Definition at line 139 of file HistoLabels.cpp.

139  {
140  return setAxisLabels_<TH1D>( hist, xAxis, yAxis );
141  }

◆ setAxisLabels() [2/4]

bool Gaudi::Utils::Histos::setAxisLabels ( AIDA::IHistogram2D *  hist,
const std::string xAxis,
const std::string yAxis 
)

Set the axis labels for the given 2D histogram.

Parameters
histPointer to the histogram
xAxisLabel for the x axis
yAxisLabel for the y axis
Returns
Boolean indicating if the labels were successfully applied or not
Return values
TRUELabels were applied OK
FALSELabels were NOT applied

Definition at line 147 of file HistoLabels.cpp.

147  {
148  return setAxisLabels_<TH2D>( hist, xAxis, yAxis );
149  }

◆ setAxisLabels() [3/4]

bool Gaudi::Utils::Histos::setAxisLabels ( AIDA::IProfile1D *  hist,
const std::string xAxis,
const std::string yAxis 
)

Set the axis labels for the given 1D profile histogram.

Parameters
histPointer to the histogram
xAxisLabel for the x axis
yAxisLabel for the y axis
Returns
Boolean indicating if the labels were successfully applied or not
Return values
TRUELabels were applied OK
FALSELabels were NOT applied

Definition at line 143 of file HistoLabels.cpp.

143  {
144  return setAxisLabels_<TProfile>( hist, xAxis, yAxis );
145  }

◆ setAxisLabels() [4/4]

bool Gaudi::Utils::Histos::setAxisLabels ( AIDA::IProfile2D *  hist,
const std::string xAxis,
const std::string yAxis 
)

Set the axis labels for the given 2D profile histogram.

Parameters
histPointer to the histogram
xAxisLabel for the x axis
yAxisLabel for the y axis
Returns
Boolean indicating if the labels were successfully applied or not
Return values
TRUELabels were applied OK
FALSELabels were NOT applied

Definition at line 151 of file HistoLabels.cpp.

151  {
152  return setAxisLabels_<TProfile2D>( hist, xAxis, yAxis );
153  }

◆ setBinLabels() [1/8]

bool Gaudi::Utils::Histos::setBinLabels ( AIDA::IHistogram1D *  hist,
const BinLabels labels 
)

Set the Bin labels for a given 1D histogram.

Each entry in 'labels' gives the bin number and its associated label

Parameters
histPointer to the histogram
labelsThe list of labels
Returns
Boolean indicating if the labels were successfully applied or not
Return values
TRUELabels were applied OK
FALSELabels were NOT applied

Definition at line 89 of file HistoLabels.cpp.

89  {
90  return setBinLabels_<TH1D>( hist, labels );
91  }

◆ setBinLabels() [2/8]

bool Gaudi::Utils::Histos::setBinLabels ( AIDA::IHistogram1D *  hist,
const Labels labels 
)

Set the Bin labels for a given 1D histogram.

The labels will be applied in the order they appear in the list, starting at the first bin. If the list of labels is too short, the later bins will be missing a label. If the list is too long, only the first N will be used, where N is the number of bins in the histogram

Parameters
histPointer to the histogram
labelsThe list of labels
Returns
Boolean indicating if the labels were successfully applied or not
Return values
TRUELabels were applied OK
FALSELabels were NOT applied

Definition at line 97 of file HistoLabels.cpp.

97 { return setBinLabels_( hist, labels ); }

◆ setBinLabels() [3/8]

bool Gaudi::Utils::Histos::setBinLabels ( AIDA::IHistogram2D *  hist,
const BinLabels xlabels,
const BinLabels ylabels 
)

Set the Bin labels for a given 2D histogram.

Each entry in 'labels' lists gives the bin number and its associated label

Parameters
histPointer to the histogram
xlabelsThe list of x bin numbers and the associated label
ylabelsThe list of y bin numbers and the associated label
Returns
Boolean indicating if the labels were successfully applied or not
Return values
TRUELabels were applied OK
FALSELabels were NOT applied

Definition at line 114 of file HistoLabels.cpp.

114  {
115  TH2D* h2d = Gaudi::Utils::Aida2ROOT::aida2root( hist );
116  return ( h2d && setBinLabels_( h2d->GetXaxis(), xlabels ) && setBinLabels_( h2d->GetYaxis(), ylabels ) );
117  }

◆ setBinLabels() [4/8]

bool Gaudi::Utils::Histos::setBinLabels ( AIDA::IHistogram2D *  hist,
const Labels xlabels,
const Labels ylabels 
)

Set the Bin labels for a given 2D histogram.

The labels will be applied in the order they appear in the lists, starting at the first bin. If the list of labels is too short, the later bins will be missing a label. If the list is too long, only the first N will be used, where N is the number of bins in the histogram

Parameters
histPointer to the histogram
xlabelsThe list of x labels
ylabelsThe list of y labels
Returns
Boolean indicating if the labels were successfully applied or not
Return values
TRUELabels were applied OK
FALSELabels were NOT applied

Definition at line 101 of file HistoLabels.cpp.

101  {
102  if ( !hist ) return false;
103  TH2D* h2d = Gaudi::Utils::Aida2ROOT::aida2root( hist );
104  if ( !h2d ) return false;
105  BinLabels lx;
106  lx.reserve( xlabels.size() );
107  for ( unsigned int i = 0; i < xlabels.size(); ++i ) { lx.emplace_back( i, xlabels[i] ); }
108  BinLabels ly;
109  ly.reserve( ylabels.size() );
110  for ( unsigned int i = 0; i < ylabels.size(); ++i ) { ly.emplace_back( i, ylabels[i] ); }
111  return ( setBinLabels_( h2d->GetXaxis(), lx ) && setBinLabels_( h2d->GetYaxis(), ly ) );
112  }

◆ setBinLabels() [5/8]

bool Gaudi::Utils::Histos::setBinLabels ( AIDA::IProfile1D *  hist,
const BinLabels labels 
)

Set the Bin labels for a given 1D profile histogram.

Each entry in 'labels' gives the bin number and its associated label

Parameters
histPointer to the histogram
labelsThe list of bin numbers and the associated label
Returns
Boolean indicating if the labels were successfully applied or not
Return values
TRUELabels were applied OK
FALSELabels were NOT applied

Definition at line 93 of file HistoLabels.cpp.

93  {
94  return setBinLabels_<TProfile>( hist, labels );
95  }

◆ setBinLabels() [6/8]

bool Gaudi::Utils::Histos::setBinLabels ( AIDA::IProfile1D *  hist,
const Labels labels 
)

Set the Bin labels for a given 1D profile histogram.

The labels will be applied in the order they appear in the list, starting at the first bin. If the list of labels is too short, the later bins will be missing a label. If the list is too long, only the first N will be used, where N is the number of bins in the histogram

Parameters
histPointer to the histogram
labelsThe list of labels
Returns
Boolean indicating if the labels were successfully applied or not
Return values
TRUELabels were applied OK
FALSELabels were NOT applied

Definition at line 99 of file HistoLabels.cpp.

99 { return setBinLabels_( hist, labels ); }

◆ setBinLabels() [7/8]

bool Gaudi::Utils::Histos::setBinLabels ( AIDA::IProfile2D *  hist,
const BinLabels xlabels,
const BinLabels ylabels 
)

Set the Bin labels for a given 2D profile histogram.

Each entry in 'labels' lists gives the bin number and its associated label

Parameters
histPointer to the histogram
xlabelsThe list of x bin numbers and the associated label
ylabelsThe list of y bin numbers and the associated label
Returns
Boolean indicating if the labels were successfully applied or not
Return values
TRUELabels were applied OK
FALSELabels were NOT applied

Definition at line 132 of file HistoLabels.cpp.

132  {
133  TProfile2D* h2d = Gaudi::Utils::Aida2ROOT::aida2root( hist );
134  return ( h2d && setBinLabels_( h2d->GetXaxis(), xlabels ) && setBinLabels_( h2d->GetYaxis(), ylabels ) );
135  }

◆ setBinLabels() [8/8]

bool Gaudi::Utils::Histos::setBinLabels ( AIDA::IProfile2D *  hist,
const Labels xlabels,
const Labels ylabels 
)

Set the Bin labels for a given 2D profile histogram.

The labels will be applied in the order they appear in the lists, starting at the first bin. If the list of labels is too short, the later bins will be missing a label. If the list is too long, only the first N will be used, where N is the number of bins in the histogram

Parameters
histPointer to the histogram
xlabelsThe list of x labels
ylabelsThe list of y labels
Returns
Boolean indicating if the labels were successfully applied or not
Return values
TRUELabels were applied OK
FALSELabels were NOT applied

Definition at line 119 of file HistoLabels.cpp.

119  {
120  if ( !hist ) return false;
121  TProfile2D* h2d = Gaudi::Utils::Aida2ROOT::aida2root( hist );
122  if ( !h2d ) return false;
123  BinLabels lx;
124  lx.reserve( xlabels.size() );
125  for ( unsigned int i = 0; i < xlabels.size(); ++i ) { lx.emplace_back( i, xlabels[i] ); }
126  BinLabels ly;
127  ly.reserve( ylabels.size() );
128  for ( unsigned int i = 0; i < ylabels.size(); ++i ) { ly.emplace_back( i, ylabels[i] ); }
129  return ( setBinLabels_( h2d->GetXaxis(), lx ) && setBinLabels_( h2d->GetYaxis(), ly ) );
130  }

◆ toBase() [1/5]

AIDA::IBaseHistogram * Gaudi::Utils::Histos::toBase ( AIDA::IHistogram1D *  histo)

Definition at line 165 of file Fill.cpp.

165 { return histo; }

◆ toBase() [2/5]

AIDA::IBaseHistogram * Gaudi::Utils::Histos::toBase ( AIDA::IHistogram2D *  histo)

Definition at line 167 of file Fill.cpp.

167 { return histo; }

◆ toBase() [3/5]

AIDA::IBaseHistogram * Gaudi::Utils::Histos::toBase ( AIDA::IHistogram3D *  histo)

Definition at line 169 of file Fill.cpp.

169 { return histo; }

◆ toBase() [4/5]

AIDA::IBaseHistogram * Gaudi::Utils::Histos::toBase ( AIDA::IProfile1D *  histo)

Definition at line 171 of file Fill.cpp.

171 { return histo; }

◆ toBase() [5/5]

AIDA::IBaseHistogram * Gaudi::Utils::Histos::toBase ( AIDA::IProfile2D *  histo)

Definition at line 173 of file Fill.cpp.

173 { return histo; }

◆ toXml() [1/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const AIDA::IHistogram1D &  histo,
std::ostream stream 
)

stream the AIDA histogram into the output stream as XML

Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 146 of file HistoXML.cpp.

146  {
148  return root ? toXml( *root, stream ) : stream;
149 }

◆ toXml() [2/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const AIDA::IHistogram2D &  histo,
std::ostream stream 
)

stream the AIDA histogram into the output stream as XML

Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 156 of file HistoXML.cpp.

156  {
158  return root ? toXml( *root, stream ) : stream;
159 }

◆ toXml() [3/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const AIDA::IHistogram3D &  histo,
std::ostream stream 
)

stream the AIDA histogram into the output stream as XML

Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 166 of file HistoXML.cpp.

166  {
168  return root ? toXml( *root, stream ) : stream;
169 }

◆ toXml() [4/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const AIDA::IProfile1D &  histo,
std::ostream stream 
)

stream the AIDA histogram into the output stream as XML

Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 176 of file HistoXML.cpp.

176  {
178  return root ? toXml( *root, stream ) : stream;
179 }

◆ toXml() [5/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const AIDA::IProfile2D &  histo,
std::ostream stream 
)

stream the AIDA histogram into the output stream as XML

Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 186 of file HistoXML.cpp.

186  {
188  return root ? toXml( *root, stream ) : stream;
189 }

◆ toXml() [6/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const TH1D &  histo,
std::ostream stream 
)

stream the ROOT histogram into output stream as XML

See also
TBufferXML
TBufferXML::ConvertToXML
Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 74 of file HistoXML.cpp.

74  {
75  return stream << TBufferXML::ConvertToXML( &histo );
76 }

◆ toXml() [7/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const TH1F &  histo,
std::ostream stream 
)

stream the ROOT histogram into output stream as XML

See also
TBufferXML
TBufferXML::ConvertToXML
Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 101 of file HistoXML.cpp.

101  {
102  return stream << TBufferXML::ConvertToXML( &histo );
103 }

◆ toXml() [8/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const TH2D &  histo,
std::ostream stream 
)

stream the ROOT histogram into output stream as XML

See also
TBufferXML
TBufferXML::ConvertToXML
Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 83 of file HistoXML.cpp.

83  {
84  return stream << TBufferXML::ConvertToXML( &histo );
85 }

◆ toXml() [9/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const TH2F &  histo,
std::ostream stream 
)

stream the ROOT histogram into output stream as XML

See also
TBufferXML
TBufferXML::ConvertToXML
Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 110 of file HistoXML.cpp.

110  {
111  return stream << TBufferXML::ConvertToXML( &histo );
112 }

◆ toXml() [10/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const TH3D &  histo,
std::ostream stream 
)

stream the ROOT histogram into output stream as XML

See also
TBufferXML
TBufferXML::ConvertToXML
Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 92 of file HistoXML.cpp.

92  {
93  return stream << TBufferXML::ConvertToXML( &histo );
94 }

◆ toXml() [11/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const TH3F &  histo,
std::ostream stream 
)

stream the ROOT histogram into output stream as XML

See also
TBufferXML
TBufferXML::ConvertToXML
Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 119 of file HistoXML.cpp.

119  {
120  return stream << TBufferXML::ConvertToXML( &histo );
121 }

◆ toXml() [12/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const TProfile &  histo,
std::ostream stream 
)

stream the ROOT histogram into output stream as XML

See also
TBufferXML
TBufferXML::ConvertToXML
Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 128 of file HistoXML.cpp.

128  {
129  return stream << TBufferXML::ConvertToXML( &histo );
130 }

◆ toXml() [13/13]

std::ostream & Gaudi::Utils::Histos::toXml ( const TProfile2D &  histo,
std::ostream stream 
)

stream the ROOT histogram into output stream as XML

See also
TBufferXML
TBufferXML::ConvertToXML
Parameters
histo(INPUT) the histogram to be streamed
stream(OUTPUT) the stream

Definition at line 137 of file HistoXML.cpp.

137  {
138  return stream << TBufferXML::ConvertToXML( &histo );
139 }
GaudiPython.Bindings.FAILURE
FAILURE
Definition: Bindings.py:90
Gaudi::Utils::Histos::printList
STREAM & printList(const LIST &histos, const std::string &fmt, STREAM &stream, TERMINATOR term)
print the simple container of histograms as table
Definition: HistoTableFormat.h:316
Write.stream
stream
Definition: Write.py:32
std::string
STL class.
Gaudi::Utils::HistoStats::nEff
static double nEff(const AIDA::IHistogram1D *histo)
get the effective entries (just for completeness)
Definition: HistoStats.cpp:629
HistoEx.histo
histo
Definition: HistoEx.py:105
Gaudi::Utils::HistoStats::rmsErr
static double rmsErr(const AIDA::IHistogram1D *histo)
get an error in the rms value
Definition: HistoStats.cpp:661
gaudiComponentHelp.root
root
Definition: gaudiComponentHelp.py:43
Gaudi::Utils::Histos::printMap
STREAM & printMap(HISTO begin, HISTO end, const std::string &fmt1, const std::string &fmt2, STREAM &stream, TERMINATOR term)
Print the "associative sequence" (e.g.
Definition: HistoTableFormat.h:365
Gaudi::Utils
Definition: Fill.h:34
Gaudi::Utils::Aida2ROOT::aida2root
static TH1D * aida2root(AIDA::IHistogram1D *aida)
get the underlying pointer for 1D-histogram
Definition: Aida2ROOT.cpp:68
Gaudi::Utils::HistoStats::kurtosisErr
static double kurtosisErr(const AIDA::IHistogram1D *histo)
get the error in kurtosis for the histogram
Definition: HistoStats.cpp:621
Gaudi::Utils::HistoStats::underflowEntriesFracErr
static double underflowEntriesFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of underflow entries (useful for shape comparison)
Definition: HistoStats.cpp:751
Gaudi::Utils::Histos::histoDump_
GAUDI_API std::ostream & histoDump_(const AIDA::IHistogram1D *histo, std::ostream &stream, const std::size_t width=80, const std::size_t height=50, const bool errors=false)
dump the text representation of the histogram
Definition: HistoDump.cpp:571
GaudiPluginService.cpluginsvc.registry
def registry()
Definition: cpluginsvc.py:84
Gaudi::Utils::HistoStats::meanErr
static double meanErr(const AIDA::IHistogram1D *histo)
get an error in the mean value
Definition: HistoStats.cpp:645
StatusCode
Definition: StatusCode.h:65
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:108
std::cout
CLHEP::begin
double * begin(CLHEP::HepVector &v)
Definition: TupleAlg.cpp:45
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:961
Gaudi::Utils::Histos::BinLabels
std::vector< BinLabel > BinLabels
Typedef for a list of bin numbers and their associated label.
Definition: HistoLabels.h:37
Gaudi::Utils::Histos::format
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
Definition: HistoTableFormat.cpp:357
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
Gaudi::Utils::HistoStats::overflowEntriesFrac
static double overflowEntriesFrac(const AIDA::IHistogram1D *histo)
the fraction of overflow entries (useful for shape comparison)
Definition: HistoStats.cpp:691
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
std::map
STL class.
IOTest.end
def end
Definition: IOTest.py:128
GaudiPluginService.cpluginsvc.n
n
Definition: cpluginsvc.py:235
Gaudi::Utils::HistoStats::overflowIntegralFracErr
static double overflowIntegralFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of overflow intergal
Definition: HistoStats.cpp:763
Gaudi::Utils::HistoStats::underflowIntegralFrac
static double underflowIntegralFrac(const AIDA::IHistogram1D *histo)
the fraction of underflow integral (useful for shape comparison)
Definition: HistoStats.cpp:727
std::ostringstream
STL class.
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:129
Gaudi::Utils::HistoStats::overflowEntriesFracErr
static double overflowEntriesFracErr(const AIDA::IHistogram1D *histo)
error on fraction of overflow entries (useful for shape comparison)
Definition: HistoStats.cpp:739
Gaudi::Utils::Histos::printMap
STREAM & printMap(const MAP &histos, const std::string &fmt1, const std::string &fmt2, STREAM &stream, TERMINATOR term)
Print the "associative sequence" (e.g.
Definition: HistoTableFormat.h:419
Gaudi::Utils::Histos::printList
STREAM & printList(HISTO first, HISTO last, const std::string &fmt, STREAM &stream, TERMINATOR term)
print the simple sequence (list-like) of histograms as table
Definition: HistoTableFormat.h:287
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
std::endl
T endl(T... args)
HistoEx.histos
histos
Definition: HistoEx.py:103
Gaudi::Utils::HistoStats::mean
static double mean(const AIDA::IHistogram1D *histo)
get the mean value for the histogram (just for completeness)
Definition: HistoStats.cpp:637
fmt
DataObject
Definition: DataObject.h:40
Gaudi::Utils::HistoStats::rms
static double rms(const AIDA::IHistogram1D *histo)
get the rms value for the histogram (just for completeness)
Definition: HistoStats.cpp:653
Gaudi::Utils::HistoStats::kurtosis
static double kurtosis(const AIDA::IHistogram1D *histo)
get the kurtosis for the histogram
Definition: HistoStats.cpp:613
Gaudi::Utils::HistoStats::sumBinHeightErr
static double sumBinHeightErr(const AIDA::IHistogram1D *histo)
get an error in the sum bin height ("in-range integral")
Definition: HistoStats.cpp:669
Gaudi::Utils::HistoStats::sumAllBinHeightErr
static double sumAllBinHeightErr(const AIDA::IHistogram1D *histo)
get an error in the sum of all bin height ("integral")
Definition: HistoStats.cpp:679
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
Gaudi::Utils::HistoStats::skewnessErr
static double skewnessErr(const AIDA::IHistogram1D *histo)
get the error in skewness for the histogram
Definition: HistoStats.cpp:605
Gaudi::Utils::Histos
Definition: Fill.h:36
Gaudi::Utils::HistoStats::overflowIntegralFrac
static double overflowIntegralFrac(const AIDA::IHistogram1D *histo)
the fraction of overflow intergal (useful for shape comparison)
Definition: HistoStats.cpp:715
Gaudi::Utils::Histos::fromXml
GAUDI_API StatusCode fromXml(TH1D &result, const std::string &input)
parse the histogram from standard ROOT XML
Definition: HistoXML.cpp:197
Gaudi::Utils::HistoStats::skewness
static double skewness(const AIDA::IHistogram1D *histo)
get the skewness for the histogram
Definition: HistoStats.cpp:597
Gaudi::Utils::Histos::format
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.
Definition: HistoTableFormat.cpp:233
Gaudi::Utils::HistoStats::underflowIntegralFracErr
static double underflowIntegralFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of underflow integral
Definition: HistoStats.cpp:775
Gaudi::Utils::Histos::toXml
GAUDI_API std::ostream & toXml(const TH1D &histo, std::ostream &stream)
stream the ROOT histogram into output stream as XML
Definition: HistoXML.cpp:74
Gaudi::Utils::HistoStats::underflowEntriesFrac
static double underflowEntriesFrac(const AIDA::IHistogram1D *histo)
the fraction of underflow entries (useful for shape comparison)
Definition: HistoStats.cpp:703