Gaudi Framework, version v23r5

Home   Generated: Wed Nov 28 2012
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HistoDef.h
Go to the documentation of this file.
1 // $Id: HistoDef.h,v 1.1 2007/09/26 16:13:41 marcocle Exp $
2 // ============================================================================
3 #ifndef GAUDIKERNEL_HISTODEF_H
4 #define GAUDIKERNEL_HISTODEF_H 1
5 // ============================================================================
6 // Include files
7 // ============================================================================
8 // STD & STL
9 // ============================================================================
10 #include <iosfwd>
11 #include <string>
12 // ============================================================================
13 // Gaudi
14 // ============================================================================
15 #include "GaudiKernel/Kernel.h"
16 // ============================================================================
17 // Forward decalrations
18 // ============================================================================
19 class IHistogramSvc ;
20 namespace AIDA { class IHistogram1D ; }
21 // ============================================================================
22 namespace Gaudi
23 {
24  // ==========================================================================
33  {
34  public:
35  // ========================================================================
43  ( const double low ,
44  const double high ,
45  const int bins = 100 ,
46  const std::string& title = "" );
47  // ========================================================================
55  ( const std::string& title = "" ,
56  const double low = 0.0 ,
57  const double high = 1.0 ,
58  const int bins = 100 ) ;
59  // ========================================================================
61  virtual ~Histo1DDef( );
62  // ========================================================================
63  public:
64  // ========================================================================
66  double lowEdge () const { return m_low ; }
68  double highEdge () const { return m_high ; }
70  int bins () const { return m_bins ; }
72  const std::string& title () const { return m_title ; }
73  // ========================================================================
74  public:
75  // ========================================================================
77  void setLowEdge ( const double value ) { m_low = value ; }
79  void setHighEdge ( const double value ) { m_high = value ; }
81  void setBins ( const int value ) { m_bins = value ; }
83  void setTitle ( const std::string& value ) { m_title = value ; }
84  // ========================================================================
85  public:
86  // ========================================================================
88  std::ostream& fillStream ( std::ostream& o ) const ;
89  // ========================================================================
90  public:
91  // ========================================================================
93  bool operator< ( const Histo1DDef& right ) const ;
95  bool operator==( const Histo1DDef& right ) const ;
97  bool operator!=( const Histo1DDef& right ) const ;
98  // ========================================================================
99  public:
100  // ========================================================================
102  bool ok () const { return 0 < bins() && lowEdge() < highEdge() ; }
103  // ========================================================================
104  private:
105  // ========================================================================
106  // Histogram title
108  // Low Edge
109  double m_low ;
110  // High Edge
111  double m_high ;
112  // Number of bins
113  int m_bins ;
114  // ========================================================================
115  };
116  // ==========================================================================
119  operator<<( std::ostream& o , const Gaudi::Histo1DDef& histo ) ;
120  // ==========================================================================
126  namespace Histos
127  {
128  // ========================================================================
134  GAUDI_API AIDA::IHistogram1D* book
135  ( IHistogramSvc* svc ,
136  const std::string& path ,
137  const Gaudi::Histo1DDef& hist ) ;
138  // ========================================================================
145  GAUDI_API AIDA::IHistogram1D* book
146  ( IHistogramSvc* svc ,
147  const std::string& dir ,
148  const std::string& id ,
149  const Gaudi::Histo1DDef& hist ) ;
150  // ========================================================================
157  GAUDI_API AIDA::IHistogram1D* book
158  ( IHistogramSvc* svc ,
159  const std::string& dir ,
160  const int id ,
161  const Gaudi::Histo1DDef& hist ) ;
162  // ========================================================================
163  } // end of namespace Gaudi::Histos
164  // ==========================================================================
165 } // end of namespace Gaudi
166 // ============================================================================
167 // The END
168 // ============================================================================
169 #endif // GAUDIKERNEL_HISTODEF_H
170 // ============================================================================

Generated at Wed Nov 28 2012 12:17:13 for Gaudi Framework, version v23r5 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004