15 #define class class GAUDI_API
16 #include "AIDA/IHistogram1D.h"
17 #include "AIDA/IAxis.h"
32 #include "boost/format.hpp"
47 "| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |" ;
51 "| %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |" ;
55 "| %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|" ;
61 "|%8$11.5g |%10$11.5g |%12$11.5g |%14$11.5g |%19$11.5g/%21$-11.5g|" ;
68 "|%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|" ;
72 " %2$-45.45s mean/sigma/skew/kurtosis = %8$10.4g/%10$10.4g/%12$10.4g/%14$10.4g" ;
76 " mean/sigma/skew/kurtosis = %8$10.4g/%10$10.4g/%12$10.4g/%14$10.4g" ;
80 " %2$-45.45s Ents/All=%7$5s/%3$5s<X>/sX=%8$.5g/%10$-.5g" ;
83 const std::string s_histoFormatPathTitle =
"| %1$-45.45s | %2$-45.45s | " ;
87 "| %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|" ;
90 "| %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 "| Title | # | Mean | RMS | Skewness | Kurtosis |" ;
100 "| # | Mean | RMS | Skewness | Kurtosis |" ;
104 "| # | Mean+-Error | RMS+-Error | Skewness+-Error | Kurtosis+-Error |" ;
108 "| Mean | RMS | Skewness | Kurtosis | Underflow%/Overflow% |" ;
112 "| Mean | RMS | Skewness | Kurtosis | Underflow [%] | Overflow [%] |" ;
115 const std::string s_histoFormatLineTitleHeader =
" Title " ;
118 const std::string s_histoFormatLineOnlyHeader =
"" ;
125 "| Path in Histogram Data Store | Title | ";
129 "| Path in Histogram Data Store | Title | # |Udflw/Ovflw| nEff | Sum | Mean+-Error | RMS+-Error | Skewness+-Error | Kurtosis+-Error |" ;
133 "| # |Udflw/Ovflw| nEff | Sum | Mean+-Error | RMS+-Error | Skewness+-Error | Kurtosis+-Error |" ;
143 case Old :
return s_histoFormatOld ;
144 case Full :
return s_histoFormatFull ;
145 case FullStat :
return s_histoFormatFullStat ;
146 case Stat :
return s_histoFormatStat ;
147 case StatOnly :
return s_histoFormatStatOnly ;
148 case Stat1 :
return s_histoFormatStat1 ;
149 case ShapeOnly :
return s_histoFormatShapeOnly ;
150 case Shape :
return s_histoFormatShape ;
151 case LineTitle :
return s_histoFormatLineTitle ;
152 case LineOnly :
return s_histoFormatLineOnly ;
153 case PathTitle :
return s_histoFormatPathTitle ;
157 return s_histoFormatStat ;
166 case Old :
return s_histoFormatOldHeader ;
167 case Full :
return s_histoFormatFullHeader ;
168 case FullStat :
return s_histoFormatFullStatHeader ;
169 case Stat :
return s_histoFormatStatHeader ;
170 case Stat1 :
return s_histoFormatStat1Header ;
171 case StatOnly :
return s_histoFormatStatOnlyHeader ;
172 case ShapeOnly :
return s_histoFormatShapeOnlyHeader ;
173 case Shape :
return s_histoFormatShapeHeader ;
174 case LineTitle :
return s_histoFormatLineTitleHeader ;
175 case LineOnly :
return s_histoFormatLineOnlyHeader ;
176 case PathTitle :
return s_histoFormatPathTitleHeader ;
180 return s_histoFormatStatHeader ;
187 if ( 0 == aida ) {
return "" ; }
189 if ( 0 ==
object ) {
return "" ; }
190 IRegistry* registry =
object->registry() ;
191 if ( 0 == registry ) {
return "" ; }
203 (
const AIDA::IHistogram1D* histo ,
206 if ( 0 == histo ) {
return "<NULL>" ; }
207 using namespace Gaudi::Utils ;
208 using namespace boost::io ;
211 _fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
214 % (
"\"" +
path ( histo ) +
"\"" )
215 % (
"\"" + histo -> title () +
"\"" )
216 % histo -> allEntries ()
217 % histo -> binEntries ( AIDA::IAxis::UNDERFLOW_BIN )
218 % histo -> binEntries ( AIDA::IAxis::OVERFLOW_BIN )
219 % histo -> equivalentBinEntries ()
220 % histo -> sumBinHeights ()
222 % HistoStats:: meanErr ( histo )
224 % HistoStats::rmsErr ( histo )
225 % HistoStats::skewness ( histo )
226 % HistoStats::skewnessErr ( histo )
227 % HistoStats::kurtosis ( histo )
228 % HistoStats::kurtosisErr ( histo )
230 % histo -> sumAllBinHeights ()
231 % HistoStats::sumAllBinHeightErr ( histo )
232 % HistoStats::sumBinHeightErr ( histo )
234 % ( 100 * HistoStats::underflowEntriesFrac ( histo ) )
235 % ( 100 * HistoStats::underflowEntriesFracErr ( histo ) )
236 % ( 100 * HistoStats::overflowEntriesFrac ( histo ) )
237 % ( 100 * HistoStats::overflowEntriesFracErr ( histo ) )
239 % HistoStats::underflowIntegralFrac ( histo )
240 % HistoStats::underflowIntegralFracErr ( histo )
241 % HistoStats::overflowIntegralFrac ( histo )
242 % HistoStats::overflowIntegralFracErr ( histo ) ;
252 (
const AIDA::IHistogram1D* histo ,
257 using namespace boost::io ;
260 _fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
264 %
format ( histo , fmt2 ) ;
276 using namespace boost::io ;
279 _fmt.exceptions ( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) ) ;
291 : m_header (
Gaudi::Utils::Histos::Formats::
header ( ID ) )
293 , m_format (
Gaudi::Utils::Histos::Formats::
format ( ID ) )
296 Gaudi::Utils::Histos::Table::Table
300 : m_header ( header )
301 , m_footer ( footer )
302 , m_format ( format )
308 (
const AIDA::IHistogram1D* histo )
const
316 (
const AIDA::IHistogram1D* histo ,