--- PamCut/CollectionActions/Histo1DActions/Histo1DAction/Histo1DAction.h 2009/09/25 15:36:36 1.1 +++ PamCut/CollectionActions/Histo1DActions/Histo1DAction/Histo1DAction.h 2009/10/29 17:49:07 1.3 @@ -85,7 +85,7 @@ /*! @brief Sets up the histogram * - * This routine effectively prepares the histogram, after the desired parameters has been set by #SetXAxis() and #SetYAxis(). + * This routine effectively prepares the histogram, after the desired parameters has been set by #SetXAxis(). * * @param events Pointer to PamLevel2 events (unused). */ @@ -108,7 +108,11 @@ return _histo; } - /*! Fills the ROOT and the vector histogram. */ + /*! Fills the ROOT and the vector histogram. + * + * @param value The value of the X coordinate associated to the event. + * @param weight The weight which will be applied to the event. + */ void Fill(double value, double weight = 1.); /*! @brief The number of events which fell below the lower histogram limit. */ @@ -123,8 +127,11 @@ protected: + /*! @brief The vector containing the limits of the bins(from lower to higher). */ std::vector _bins; + /*! @brief A vector containing the value of the histogram for each bin. */ vector _histo; + /*! @brief The ROOT histogram. */ TH1 *_rootHisto; private: @@ -147,6 +154,15 @@ // No ROOT histogram for generic type; see template specializations in .cpp file. _rootHisto = NULL; } +// Specializations for _CreateHistos(). See Histo1DAction.cpp +template<> +void Histo1DAction::_CreateHisto(); + +template<> +void Histo1DAction::_CreateHisto(); + +template<> +void Histo1DAction::_CreateHisto(); template void Histo1DAction::_InitHistos() { @@ -176,6 +192,10 @@ template Histo1DAction::~Histo1DAction() { + + delete _rootHisto; + _rootHisto = NULL; + } template