#ifndef HEPHIST_H #define HEPHIST_H // ---------------------------------------------------------------------- // // HepHist.h - class declaration for generic model for a histogram // // The HepHist model is of a histogram that stores individual // data items into a set of bins that have been previously defined. // Storage occurs at the time of the call. // // HepHist is the base class for creating specialized histograms (which // currently consist of HepHist1D, a one-dimensional histogram; // HepHist2D, a two-dimensional histogram; and HepHistProf, a profile // histogram. HepHist provides very basic methods for obtaining // information about a histogram. The classes derived from this one are // also abstract classes whose concrete implementation depends on a // manager class (a derivative of HepFileManager). // // HepHist objects will not be instantiated. // // See the class declaration for the subclasses of HepHist (HepHist1D, // HepHist2D, and HepHistProf) for their usage. // // // History: // ??-???-19?? Bob Jacobsen Initial draft, based on ideas in HepTuple // and the SLT histogram classes of Joe Boudreau // 05-May-1997 Walter Brown Initial design & draft of Hist class // 22-May-1997 Walter Brown Merged Hist into HepHist // 30-May-1997 Walter Brown Added cloning functions // 29-May-1997 Jason Luther Added comments // 04-Jun-1997 Jason Luther Reconciled comments to match design // 27-Jun-1997 Walter Brown Replaced HepString by standard string // 28-Jul-1997 Walter Brown Took advantage of new HepObj // // ---------------------------------------------------------------------- #ifndef ZMENVIRONMENT_H #include "ZMutility/ZMenvironment.h" #endif #include #ifndef HEPOBJ_H #include "HepTuple/HepObj.h" #endif ZM_BEGIN_NAMESPACE( zmht ) /* namespace zmht { */ class HepHist : public HepObj { friend class HepFileManager; protected: HepHist( // constructor HepFileManager * mgr , const std::string& title , const int id = 0 ); // Used for dummy construction ... // the object is then not valid ... HepHist( ); // default constructor public: virtual ~HepHist(); // destructor virtual ZM_COVARIANT_TYPE(HepObj,HepHist) & makeClone( const std::string& title, const int id = 0) const; virtual ZM_COVARIANT_TYPE(HepObj,HepHist) & makeEmpty( const std::string& title, const int id = 0) const; virtual ZM_COVARIANT_TYPE(HepObj,HepHist) & makeClone( HepFileManager *manager, const std::string& title , const int id = 0) const; virtual ZM_COVARIANT_TYPE(HepObj,HepHist) & makeEmpty( HepFileManager *manager, const std::string& title , const int id = 0) const; virtual void reset(); private: // forbidden operations, hence private HepHist( const HepHist & ); // copy constructor HepHist & operator=( const HepHist & ); // assignment }; // HepHist #ifdef HEP_SHORT_NAMES #ifndef Histogram // Don't redefine #define Histogram HepHist #endif // Histogram #endif // HEP_SHORT_NAMES ZM_END_NAMESPACE( zmht ) /* } // namespace zmht */ #endif // HEPHIST_H