1 #ifndef GAUDIUTILS_H1_H 2 #define GAUDIUTILS_H1_H 1 21 void setHighEdge(
double value ) { high = value; }
22 void setLowEdge(
double value ) { low = value; }
23 void setNBins(
unsigned int value ) { nbins = value; }
26 Edges& operator-=(
double value )
31 Edges& operator+=(
double value )
41 Edges& operator/=(
unsigned int value )
47 bool ok()
const {
return edges.empty() ? low < high && 0 < nbins : 2 < edges.size(); }
48 unsigned int nBins()
const {
return edges.empty() ? nbins : edges.size() - 1; }
66 void setEdges( Edges value ) { m_edges =
std::move( value ); }
67 void setHighEdge(
const double value ) { m_edges.setHighEdge( value ); }
68 void setLowEdge(
const double value ) { m_edges.setLowEdge( value ); }
69 void setNBins(
const unsigned int value ) { m_edges.setNBins( value ); }
71 void setBins( Bins value ) { m_bins =
std::move( value ); }
83 H1& operator^=(
const double value )
88 H1& operator-=(
const double value )
104 H1& operator+=( Bins value )
112 if ( m_bins.empty() ) {
115 if ( !m_edges.ok() ) {
118 if ( m_bins.size() != m_edges.nBins() + 2 ) {
139 void setXEdges( Edges value ) { m_xedges =
std::move( value ); }
140 void setYEdges( Edges value ) { m_yedges =
std::move( value ); }
141 void setBins( Bins value ) { m_bins =
std::move( value ); }
163 H2& operator+=( Bins value )
171 if ( m_bins.empty() ) {
174 if ( !m_xedges.ok() ) {
177 if ( !m_yedges.ok() ) {
180 if ( m_bins.size() != ( m_xedges.nBins() + 2 ) * ( m_yedges.nBins() + 2 ) ) {
198 #endif // GAUDIUTILS_H1_H
bool & operator|=(bool &lhs, const StatusCode &sc)
Boolean OR assignment operator.
bool & operator&=(bool &lhs, const StatusCode &sc)
Boolean AND assignment operator.