1 #ifndef CondFormats_HcalObjects_PiecewiseScalingPolynomial_h_ 2 #define CondFormats_HcalObjects_PiecewiseScalingPolynomial_h_ 6 #include "boost/serialization/vector.hpp" 7 #include "boost/serialization/version.hpp" 15 const std::vector<std::vector<double> >& coeffs,
16 const std::vector<double>& limits);
23 const unsigned nLimits(
limits_.size());
26 const double* limits(&
limits_[0]);
28 for (; which<nLimits; ++
which)
29 if (x < limits[which])
31 const std::vector<double>&
c(
coeffs_[which]);
32 const double*
a = &c[0];
33 for (
int deg = c.size()-1; deg >= 0; --deg)
47 {
return !(*
this ==
r);}
52 std::vector<std::vector<double> >
coeffs_;
57 template<
class Archive>
58 inline void save(Archive & ar,
const unsigned )
const 61 "In PiecewiseScalingPolynomial::save: invalid data");
65 template<
class Archive>
66 inline void load(Archive & ar,
const unsigned )
70 "In PiecewiseScalingPolynomial::load: invalid data");
73 BOOST_SERIALIZATION_SPLIT_MEMBER()
78 #endif // CondFormats_HcalObjects_PiecewiseScalingPolynomial_h_ bool operator==(const PiecewiseScalingPolynomial &r) const
bool operator!=(const PiecewiseScalingPolynomial &r) const
void load(Archive &ar, const unsigned)
void save(Archive &ar, const unsigned) const
PiecewiseScalingPolynomial()
std::vector< std::vector< double > > coeffs_
double operator()(const double x) const
std::vector< double > limits_
friend class boost::serialization::access