#ifndef HEPTH1P_H #define HEPTH1P_H // ---------------------------------------------------------------------- // // HepTH1P.cc - definition of class HepTH1P // // Intended to gain access to the protected members of the Root TProfile class. // // This class is used to import an existing histogram object from possibly // some other manager and manufacture a temporary TProfile object with all the // same characteristics as the original. That way, we can use the existing // Root methods to implement the increment operators. // // Note that, as of the date of the initial definition, Root has no // implementation for TProfile::Multiply. A method exists but it simply // issues a warning message and returns. // // Because of the eccentricities of the various managers, we do NOT manage // to get some of the statistical sums quite right - in particular the // sum of the squared weights - so the overall statistics should not be taken // too seriously. // // 25-Feb-1999 J. Marraffino Initial definition // 21-Feb-2000 Walter Brown Improved C++ standard compliance // // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- #ifndef ZMENVIRONMENT_H #include "ZMutility/ZMenvironment.h" #endif #include #include #include "HepTuple/HepRootHistProf.h" ZM_BEGIN_NAMESPACE( zmht ) /* namespace zmht { */ class TH1; class TProfile; class HepRawHist; class HepTH1P : public TProfile { public: HepTH1P( const HepHistProf & p ); // constructor for an existing HepHistProf virtual ~HepTH1P(); // destructor void finishStatProf( HepRootHistProf * h ); #ifdef ROOT_2_24 // For backward compatibility ... to be removed when cdf move to v2.25 float fetchWeight( int numBin ); // get sum of weights for specified bin #else double fetchWeight( int numBin ); // get sum of weights for specified bin #endif void fetchSumW( float * values ); // get sum of weights for all bins void fetchSumWY( float * values ); // get sum of weighted Y for all bins void fetchSumWY2( float * values ); // get sum of weighted Y^2 for all bins #ifdef ROOT_2_24 // For backward compatibility ... to be removed when cdf move to v2.25 float GetYmin(); // get Y minimum float GetYmax(); // get Y maximum #else #ifdef NO_ROOT_CONST double GetYmin(); // get Y minimum double GetYmax(); // get Y maximum #else double GetYmin() const; // get Y minimum double GetYmax() const; // get Y maximum #endif #endif private: // forbidden operations, hence private HepTH1P( const HepTH1P & ); // copy constructor HepTH1P & operator=( const HepTH1P & ); // assignment }; // HepTH1P ZM_END_NAMESPACE( zmht ) /* } // namespace zmht */ #endif // HEPTH1P_H