CMS 3D CMS Logo

HcalLinearCompositionFunctor.cc
Go to the documentation of this file.
2 
4 
6  boost::shared_ptr<AbsHcalFunctor> p,
7  const double ia, const double ib)
8  : other_(p), a_(ia), b_(ib)
9 {
10  if (!other_.get()) throw cms::Exception(
11  "In HcalLinearCompositionFunctor constructor: "
12  "can not use a null pointer to another functor");
13 }
14 
15 double HcalLinearCompositionFunctor::operator()(const double x) const
16 {
17  return a_*(*other_)(x) + b_;
18 }
19 
20 BOOST_CLASS_EXPORT_IMPLEMENT(HcalLinearCompositionFunctor)
double operator()(double x) const override
boost::shared_ptr< AbsHcalFunctor > other_
ib
Definition: cuy.py:660