Go to the documentation of this file.
18 template <
class TC,
class TO,
class TN,
class TW,
class TH>
19 class h1 :
public b1<TC,TO,TN,TW,TH> {
48 bool fill(TC aX,TW aWeight = 1) {
52 if(!
parent::m_axes[0].coord_to_absolute_index(aX,ibin))
return false;
66 if(ibin==0) inRange =
false;
67 else if(ibin==(
parent::m_axes[0].m_number_of_bins+1)) inRange =
false;
88 if(a_ibin==0) inRange =
false;
89 else if(a_ibin==(
parent::m_axes[0].m_number_of_bins+1)) inRange =
false;
124 a_entries = 0;a_Sw = 0;a_Sw2 = 0;a_Sxw = 0;a_Sx2w = 0;
128 a_entries = 0;a_Sw = 0;a_Sw2 = 0;a_Sxw = 0;a_Sx2w = 0;
162 if(!a_factor)
return false;
171 bn_t new_n = n/a_factor;
172 if(a_factor*new_n!=n)
return false;
178 const std::vector<TC>& _edges = _axis.
edges();
179 std::vector<TC> new_edges(new_n+1);
180 for(
bn_t ibin=0;ibin<new_n;ibin++) {
181 new_edges[ibin] = _edges[ibin*a_factor];
183 new_edges[new_n] = _edges[n];
186 if(!new_h)
return false;
188 TO offset,new_offset,offac;
189 for(
bn_t ibin=0;ibin<new_n;ibin++) {
191 offset = a_factor*ibin+1;
192 for(
unsigned int ifac=0;ifac<a_factor;ifac++) {
212 new_offset = new_n+1;
224 bool equals_TH(
const h1& a_from,
const TW& a_prec,TW(*a_fabs)(TW))
const {
232 bool Fill(TC aX,TW aWeight = 1) {
return fill(aX,aWeight);}
235 h1(
const std::string& a_title,
bn_t aXnumber,TC aXmin,TC aXmax)
236 :
parent(a_title,aXnumber,aXmin,aXmax){}
238 h1(
const std::string& a_title,
const std::vector<TC>& a_edges)
239 :
parent(a_title,a_edges){}
245 if(&a_from==
this)
return *
this;