| 85 |
|
|
| 86 |
/*! @brief Sets up the histogram |
/*! @brief Sets up the histogram |
| 87 |
* |
* |
| 88 |
* 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(). |
| 89 |
* |
* |
| 90 |
* @param events Pointer to PamLevel2 events (unused). |
* @param events Pointer to PamLevel2 events (unused). |
| 91 |
*/ |
*/ |
| 108 |
return _histo; |
return _histo; |
| 109 |
} |
} |
| 110 |
|
|
| 111 |
/*! Fills the ROOT and the vector histogram. */ |
/*! Fills the ROOT and the vector histogram. |
| 112 |
|
* |
| 113 |
|
* @param value The value of the X coordinate associated to the event. |
| 114 |
|
* @param weight The weight which will be applied to the event. |
| 115 |
|
*/ |
| 116 |
void Fill(double value, double weight = 1.); |
void Fill(double value, double weight = 1.); |
| 117 |
|
|
| 118 |
/*! @brief The number of events which fell below the lower histogram limit. */ |
/*! @brief The number of events which fell below the lower histogram limit. */ |
| 127 |
|
|
| 128 |
protected: |
protected: |
| 129 |
|
|
| 130 |
|
/*! @brief The vector containing the limits of the bins(from lower to higher). */ |
| 131 |
std::vector<float> _bins; |
std::vector<float> _bins; |
| 132 |
|
/*! @brief A vector containing the value of the histogram for each bin. */ |
| 133 |
vector<HistoType> _histo; |
vector<HistoType> _histo; |
| 134 |
|
/*! @brief The ROOT histogram. */ |
| 135 |
TH1 *_rootHisto; |
TH1 *_rootHisto; |
| 136 |
|
|
| 137 |
private: |
private: |
| 154 |
// No ROOT histogram for generic type; see template specializations in .cpp file. |
// No ROOT histogram for generic type; see template specializations in .cpp file. |
| 155 |
_rootHisto = NULL; |
_rootHisto = NULL; |
| 156 |
} |
} |
| 157 |
|
// Specializations for _CreateHistos(). See Histo1DAction.cpp |
| 158 |
|
template<> |
| 159 |
|
void Histo1DAction<Int_t>::_CreateHisto(); |
| 160 |
|
|
| 161 |
|
template<> |
| 162 |
|
void Histo1DAction<Float_t>::_CreateHisto(); |
| 163 |
|
|
| 164 |
|
template<> |
| 165 |
|
void Histo1DAction<Double_t>::_CreateHisto(); |
| 166 |
|
|
| 167 |
template<class HistoType> |
template<class HistoType> |
| 168 |
void Histo1DAction<HistoType>::_InitHistos() { |
void Histo1DAction<HistoType>::_InitHistos() { |
| 192 |
|
|
| 193 |
template<class HistoType> |
template<class HistoType> |
| 194 |
Histo1DAction<HistoType>::~Histo1DAction() { |
Histo1DAction<HistoType>::~Histo1DAction() { |
| 195 |
|
|
| 196 |
|
delete _rootHisto; |
| 197 |
|
_rootHisto = NULL; |
| 198 |
|
|
| 199 |
} |
} |
| 200 |
|
|
| 201 |
template<class HistoType> |
template<class HistoType> |