CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
HcalLinearCompositionFunctor Class Reference

#include <HcalLinearCompositionFunctor.h>

Inheritance diagram for HcalLinearCompositionFunctor:
AbsHcalFunctor

Public Member Functions

double a () const
 
double b () const
 
 HcalLinearCompositionFunctor ()
 
 HcalLinearCompositionFunctor (boost::shared_ptr< AbsHcalFunctor > p, double a, double b)
 
double operator() (double x) const override
 
double xmax () const override
 
double xmin () const override
 
 ~HcalLinearCompositionFunctor () override
 
- Public Member Functions inherited from AbsHcalFunctor
bool operator!= (const AbsHcalFunctor &r) const
 
bool operator== (const AbsHcalFunctor &r) const
 
virtual ~AbsHcalFunctor ()
 

Protected Member Functions

bool isEqual (const AbsHcalFunctor &other) const override
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, unsigned)
 

Private Attributes

double a_
 
double b_
 
boost::shared_ptr< AbsHcalFunctorother_
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Static Protected Member Functions inherited from AbsHcalFunctor
template<class Iter >
static bool isStrictlyDecreasing (Iter begin, Iter const end)
 
template<class Iter >
static bool isStrictlyIncreasing (Iter begin, Iter const end)
 

Detailed Description

Definition at line 17 of file HcalLinearCompositionFunctor.h.

Constructor & Destructor Documentation

HcalLinearCompositionFunctor::HcalLinearCompositionFunctor ( )
inline
HcalLinearCompositionFunctor::HcalLinearCompositionFunctor ( boost::shared_ptr< AbsHcalFunctor p,
double  a,
double  b 
)

Definition at line 5 of file HcalLinearCompositionFunctor.cc.

References other_.

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 }
boost::shared_ptr< AbsHcalFunctor > other_
ib
Definition: cuy.py:661
HcalLinearCompositionFunctor::~HcalLinearCompositionFunctor ( )
inlineoverride

Definition at line 27 of file HcalLinearCompositionFunctor.h.

References operator()(), and x.

27 {}

Member Function Documentation

double HcalLinearCompositionFunctor::a ( ) const
inline

Definition at line 34 of file HcalLinearCompositionFunctor.h.

References a_.

Referenced by HcalLinearCompositionFunctor().

double HcalLinearCompositionFunctor::b ( ) const
inline

Definition at line 35 of file HcalLinearCompositionFunctor.h.

References b_.

Referenced by HcalLinearCompositionFunctor().

bool HcalLinearCompositionFunctor::isEqual ( const AbsHcalFunctor other) const
inlineoverrideprotectedvirtual
double HcalLinearCompositionFunctor::operator() ( double  x) const
overridevirtual

Implements AbsHcalFunctor.

Definition at line 15 of file HcalLinearCompositionFunctor.cc.

References a_, b_, and x.

Referenced by ~HcalLinearCompositionFunctor().

template<class Archive >
void HcalLinearCompositionFunctor::serialize ( Archive &  ar,
unsigned   
)
inlineprivate

Definition at line 53 of file HcalLinearCompositionFunctor.h.

References b_, and Exception.

54  {
55  boost::serialization::base_object<AbsHcalFunctor>(*this);
56  // Direct polymorphic serialization of shared_ptr is broken
57  // in boost for versions 1.56, 1.57, 1.58. For detail, see
58  // https://svn.boost.org/trac/boost/ticket/10727
59 #if BOOST_VERSION < 105600 || BOOST_VERSION > 105800
60  ar & other_ & a_ & b_;
61 #else
62  throw cms::Exception("HcalLinearCompositionFunctor can not be"
63  " serialized with this version of boost");
64 #endif
65  }
boost::shared_ptr< AbsHcalFunctor > other_
double HcalLinearCompositionFunctor::xmax ( ) const
inlineoverridevirtual

Reimplemented from AbsHcalFunctor.

Definition at line 32 of file HcalLinearCompositionFunctor.h.

References other_.

Referenced by svgfig.XAxis::__repr__().

32 {return other_->xmax();}
boost::shared_ptr< AbsHcalFunctor > other_
double HcalLinearCompositionFunctor::xmin ( ) const
inlineoverridevirtual

Reimplemented from AbsHcalFunctor.

Definition at line 31 of file HcalLinearCompositionFunctor.h.

References other_.

Referenced by svgfig.XAxis::__repr__(), svgfig.Axes::__repr__(), svgfig.HGrid::__repr__(), svgfig.Grid::__repr__(), and svgfig.Axes::SVG().

31 {return other_->xmin();}
boost::shared_ptr< AbsHcalFunctor > other_

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 50 of file HcalLinearCompositionFunctor.h.

Member Data Documentation

double HcalLinearCompositionFunctor::a_
private

Definition at line 47 of file HcalLinearCompositionFunctor.h.

Referenced by a(), isEqual(), and operator()().

double HcalLinearCompositionFunctor::b_
private

Definition at line 48 of file HcalLinearCompositionFunctor.h.

Referenced by b(), isEqual(), operator()(), and serialize().

boost::shared_ptr<AbsHcalFunctor> HcalLinearCompositionFunctor::other_
private

Definition at line 46 of file HcalLinearCompositionFunctor.h.

Referenced by HcalLinearCompositionFunctor(), isEqual(), xmax(), and xmin().