Anaphe Home Page Reference Documentation

Main Page     Namespaces     Classes     Source Code    

IHistogram.h

Go to the documentation of this file.
00001 
00002 #ifndef INTERFACES_IHISTOGRAM_H
00003 #define INTERFACES_IHISTOGRAM_H 1
00004 
00005 
00006 // Include files
00007 #include <string>
00008 
00009 #ifndef ANAPHE_NO_NAMESPACE
00010 namespace Anaphe {
00011 #endif
00012 
00013   // Forward declarations
00014   class IAxis;
00015   class IAnnotation;
00016 
00017 
00018   //------------------------------------------------------------------------------
00019   //
00020   // ClassName:    IHistogram
00021   //  
00022   // Description:  Definition of the IHistogram interface class
00023   //
00024   //               IHistogram is a base class for all other histogram interfaces.
00025   //               It contains their common functionality.
00026   //
00027   //               IHistogram is not a complete histogram interface, it cannot
00028   //               be used as a standard histogram.  It is ment to be used e.g.
00029   //               for histogram managment (there, where the number of axes is
00030   //               not important).
00031   //
00032   // Design principles :
00033   //
00034   //  1) Only interfaces, basic types, and types from foundation libraries
00035   //     are allowed (STL is currently the only one foundation library)
00036   //     - Uses only int and double as basic types
00037   //     - Internals (classes, enums, or others) of concrete packages
00038   //       do not appear in the interface
00039   //  2) Accessors - XXX() (no getXXX() functions)
00040   //  3) In member function names
00041   //     - in-range bins are not specified explicitly (e.g. sumBinHeights())
00042   //     - ...All... mean all (in-range and extra) bins (e.g. sumAllBinHeights())
00043   //     - ...Extra... mean extra bins (e.g. sumExtraBinHeights())
00044   //
00045   //
00046   // Authors:      Pavel Binko, Dino Ferrero Merlino, Andreas Pfeiffer
00047   // Date:         22/03/2000
00048   //
00049   //------------------------------------------------------------------------------
00050 
00051 
00052   class IHistogram {
00053 
00054   public:
00055     virtual ~IHistogram() { /* nop */ }
00056 
00057   public:
00060     enum { UNDERFLOW_BIN = -2, OVERFLOW_BIN = -1 };
00062 #ifdef AIDA_DONT_USE_STD
00063     virtual      string title() const                                         = 0;
00064 #else
00065     virtual std::string title() const                                         = 0;
00066 #endif
00067 
00069     virtual IAnnotation* annotation()                                         = 0;
00071     virtual int dimensions() const                                            = 0;
00073     virtual void reset()                                                      = 0;
00075     virtual int entries() const                                               = 0;
00078     virtual int allEntries() const                                            = 0;
00080     virtual int extraEntries() const                                          = 0;
00082     virtual double equivalentBinEntries() const                               = 0;
00084     virtual double sumBinHeights() const                                      = 0;
00086     virtual double sumAllBinHeights() const                                   = 0;
00088     virtual double sumExtraBinHeights() const                                 = 0;
00089 
00090   };
00091 
00092 
00093 #ifndef ANAPHE_NO_NAMESPACE
00094 }; // end namespace Anaphe
00095 #endif
00096 
00097 
00098 #endif    // INTERFACES_IHISTOGRAM_H


Anaphe documentation generated by Doxygen (www.doxygen.org)