15 #pragma clang diagnostic push 16 #pragma clang diagnostic ignored "-Wkeyword-macro" 18 #define class class GAUDI_API 20 #pragma clang diagnostic pop 22 #include "AIDA/IHistogram1D.h" 23 #include "AIDA/IAxis.h" 38 #include "boost/format.hpp" 53 "| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |" ;
57 "| %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |" ;
61 "| %3$=7d |%8$9.3g+-%9$-9.3g|%10$9.3g+-%11$-9.3g|%12$9.3g+-%13$-9.3g|%14$9.3g+-%15$-9.3g|" ;
67 "|%8$11.5g |%10$11.5g |%12$11.5g |%14$11.5g |%19$11.5g/%21$-11.5g|" ;
74 "|%8$9.3g+-%9$-9.3g|%10$9.3g+-%11$-9.3g|%12$9.3g+-%13$-9.3g|%14$9.3g+-%15$-9.3g|%19$9.3g+-%20$-9.3g|%21$9.3g+-%22$-9.3g|" ;
78 " %2$-45.45s mean/sigma/skew/kurtosis = %8$10.4g/%10$10.4g/%12$10.4g/%14$10.4g" ;
82 " mean/sigma/skew/kurtosis = %8$10.4g/%10$10.4g/%12$10.4g/%14$10.4g" ;
86 " %2$-45.45s Ents/All=%7$5s/%3$5s<X>/sX=%8$.5g/%10$-.5g" ;
89 const std::string s_histoFormatPathTitle =
"| %1$-45.45s | %2$-45.45s | " ;
93 "| %1$-45.45s | %2$-45.45s | %3$=7d |%4$5d/%5$-5d|%6$9.3g | %7$-9.3g|%8$9.3g+-%9$-9.3g|%10$9.3g+-%11$-9.3g|%12$9.3g+-%13$-9.3g|%14$9.3g+-%15$-9.3g|" ;
96 "| %3$=7d |%4$5d/%5$-5d|%6$9.3g | %7$-9.3g|%8$9.3g+-%9$-9.3g|%10$9.3g+-%11$-9.3g|%12$9.3g+-%13$-9.3g|%14$9.3g+-%15$-9.3g|" ;
102 "| Title | # | Mean | RMS | Skewness | Kurtosis |" ;
106 "| # | Mean | RMS | Skewness | Kurtosis |" ;
110 "| # | Mean+-Error | RMS+-Error | Skewness+-Error | Kurtosis+-Error |" ;
114 "| Mean | RMS | Skewness | Kurtosis | Underflow%/Overflow% |" ;
118 "| Mean | RMS | Skewness | Kurtosis | Underflow [%] | Overflow [%] |" ;
121 const std::string s_histoFormatLineTitleHeader =
" Title " ;
124 const std::string s_histoFormatLineOnlyHeader =
"" ;
131 "| Path in Histogram Data Store | Title | ";
135 "| Path in Histogram Data Store | Title | # |Udflw/Ovflw| nEff | Sum | Mean+-Error | RMS+-Error | Skewness+-Error | Kurtosis+-Error |" ;
139 "| # |Udflw/Ovflw| nEff | Sum | Mean+-Error | RMS+-Error | Skewness+-Error | Kurtosis+-Error |" ;
149 case Old :
return s_histoFormatOld ;
150 case Full :
return s_histoFormatFull ;
151 case FullStat :
return s_histoFormatFullStat ;
152 case Stat :
return s_histoFormatStat ;
153 case StatOnly :
return s_histoFormatStatOnly ;
154 case Stat1 :
return s_histoFormatStat1 ;
155 case ShapeOnly :
return s_histoFormatShapeOnly ;
156 case Shape :
return s_histoFormatShape ;
157 case LineTitle :
return s_histoFormatLineTitle ;
158 case LineOnly :
return s_histoFormatLineOnly ;
159 case PathTitle :
return s_histoFormatPathTitle ;
163 return s_histoFormatStat ;
172 case Old :
return s_histoFormatOldHeader ;
173 case Full :
return s_histoFormatFullHeader ;
174 case FullStat :
return s_histoFormatFullStatHeader ;
175 case Stat :
return s_histoFormatStatHeader ;
176 case Stat1 :
return s_histoFormatStat1Header ;
177 case StatOnly :
return s_histoFormatStatOnlyHeader ;
178 case ShapeOnly :
return s_histoFormatShapeOnlyHeader ;
179 case Shape :
return s_histoFormatShapeHeader ;
180 case LineTitle :
return s_histoFormatLineTitleHeader ;
181 case LineOnly :
return s_histoFormatLineOnlyHeader ;
182 case PathTitle :
return s_histoFormatPathTitleHeader ;
186 return s_histoFormatStatHeader ;
193 if ( 0 == aida ) {
return "" ; }
195 if ( 0 ==
object ) {
return "" ; }
197 if ( 0 == registry ) {
return "" ; }
199 std::string::size_type
n = _path.
find(
"/stat/") ;
209 (
const AIDA::IHistogram1D* histo ,
212 if ( 0 == histo ) {
return "<NULL>" ; }
214 using namespace boost::io ;
217 _fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
220 % (
"\"" +
path ( histo ) +
"\"" )
221 % (
"\"" + histo -> title () +
"\"" )
222 % histo -> allEntries ()
223 % histo -> binEntries ( AIDA::IAxis::UNDERFLOW_BIN )
224 % histo -> binEntries ( AIDA::IAxis::OVERFLOW_BIN )
225 % histo -> equivalentBinEntries ()
226 % histo -> sumBinHeights ()
236 % histo -> sumAllBinHeights ()
258 (
const AIDA::IHistogram1D* histo ,
263 using namespace boost::io ;
266 _fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
270 %
format ( histo , fmt2 ) ;
282 using namespace boost::io ;
285 _fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
314 (
const AIDA::IHistogram1D* histo )
const 322 (
const AIDA::IHistogram1D* histo ,
helper namespace to collect useful definitions, types, constants and functions, related to manipulati...
static double underflowIntegralFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of underflow integral
static double overflowIntegralFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of overflow intergal
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
static double underflowEntriesFrac(const AIDA::IHistogram1D *histo)
the fraction of underflow entries (useful for shape comparison)
std::string m_header
the table header
static double rmsErr(const AIDA::IHistogram1D *histo)
get an error in the rms value
Table(const int ID=0)
constructor from enum
Small wrapper class for easy manipulation with generic counters and IStatSvc&ICounterSvc interface...
static double underflowIntegralFrac(const AIDA::IHistogram1D *histo)
the fraction of underflow integral (useful for shape comparison)
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.
static double meanErr(const AIDA::IHistogram1D *histo)
get an error in the mean value
static double overflowIntegralFrac(const AIDA::IHistogram1D *histo)
the fraction of overflow intergal (useful for shape comparison)
const std::string & header() const
the table header
virtual const id_type & identifier() const =0
Full identifier (or key)
const std::string & format() const
the format
static double overflowEntriesFrac(const AIDA::IHistogram1D *histo)
the fraction of overflow entries (useful for shape comparison)
The IRegistry represents the entry door to the environment any data object residing in a transient da...
std::string m_footer
the table footer
static double sumBinHeightErr(const AIDA::IHistogram1D *histo)
get an error in the sum bin height ("in-range integral")
static double overflowEntriesFracErr(const AIDA::IHistogram1D *histo)
error on fraction of overflow entries (useful for shape comparison)
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
static double sumAllBinHeightErr(const AIDA::IHistogram1D *histo)
get an error in the sum of all bin height ("integral")
static double kurtosisErr(const AIDA::IHistogram1D *histo)
get the error in kurtosis for the histogram
static double skewnessErr(const AIDA::IHistogram1D *histo)
get the error in skewness for the histogram
static double underflowEntriesFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of underflow entries (useful for shape comparison)
static double kurtosis(const AIDA::IHistogram1D *histo)
get the kurtosis for the histogram
A DataObject is the base class of any identifiable object on any data store.
Helper functions to set/get the application return code.
std::string m_format
the defautl format
static double skewness(const AIDA::IHistogram1D *histo)
get the skewness for the histogram
std::string toString(const AIDA::IHistogram1D *histo) const
make the string representation according to the default format
const std::string & footer() const
the table footer