3 #ifndef GAUDIUTILS_HISTOTABLEFORMAT_H
4 #define GAUDIUTILS_HISTOTABLEFORMAT_H 1
15 class IBaseHistogram ;
130 GAUDI_API std::string
path (
const AIDA::IBaseHistogram* aida ) ;
171 (
const AIDA::IHistogram1D* histo ,
172 const std::string& fmt ) ;
203 (
const AIDA::IHistogram1D* histo ,
204 const std::string& ID ,
205 const std::string& fmt1 ,
206 const std::string& fmt2 ) ;
231 template <
class HISTO,
class STREAM,
class TERMINATOR>
235 const std::string& fmt ,
239 for ( ; first != last ; ++first )
240 { stream <<
format ( *first , fmt ) << term ; }
267 template <
class LIST,
class STREAM,
class TERMINATOR>
270 const std::string& fmt ,
275 ( histos.begin () , histos.end () , fmt , stream , term ) ;
322 template <
class HISTO,
class STREAM,
class TERMINATOR>
326 const std::string& fmt1 ,
327 const std::string& fmt2 ,
331 for ( ; begin !=
end ; ++begin )
336 fmt1 , fmt2 ) << term ;
383 template <
class MAP,
class STREAM,
class TERMINATOR>
385 (
const MAP& histos ,
386 const std::string& fmt1 ,
387 const std::string& fmt2 ,
392 ( histos.begin () , histos.end() , fmt1 , fmt2 , stream , term ) ;
400 (
const std::string& val1 ,
401 const std::string& val2 ,
402 const std::string& fmt ) ;
415 Table (
const int ID = 0 ) ;
418 (
const std::string&
format ,
419 const std::string&
header =
"" ,
420 const std::string& footer =
"" ) ;
429 template <
class HISTO,
class STREAM,
class TERMINATOR>
434 TERMINATOR term )
const
438 if ( !footer().
empty() ) { stream << footer () << term ; }
455 template <
class HISTO,
class STREAM,
class TERMINATOR>
459 const std::string& fmt ,
460 const std::string& hval ,
462 TERMINATOR term )
const
464 if ( !hval.empty() || !
header().empty() )
467 ( first , last , fmt ,
format() , stream , term ) ;
473 const std::string&
header ()
const {
return m_header ; }
476 const std::string&
footer ()
const {
return m_footer ; }
479 const std::string&
format ()
const {
return m_format ; }
484 void setHeader (
const std::string& v ) { m_header = v ; }
487 void setFooter (
const std::string& v ) { m_footer = v ; }
490 void setFormat (
const std::string& v ) { m_format = v ; }
495 std::string
toString (
const AIDA::IHistogram1D* histo )
const ;
523 (
const AIDA::IHistogram1D* histo ,
524 const std::string& ID ,
525 const std::string& fmt )
const ;
542 #endif // GAUDIUTILS_HISTOTABLEFORMAT_H