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 (std::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_
 
std::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() [1/2]

HcalLinearCompositionFunctor::HcalLinearCompositionFunctor ( )
inline

◆ HcalLinearCompositionFunctor() [2/2]

HcalLinearCompositionFunctor::HcalLinearCompositionFunctor ( std::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  if (!other_.get())
10  throw cms::Exception(
11  "In HcalLinearCompositionFunctor constructor: "
12  "can not use a null pointer to another functor");
13 }
std::shared_ptr< AbsHcalFunctor > other_
ib
Definition: cuy.py:661

◆ ~HcalLinearCompositionFunctor()

HcalLinearCompositionFunctor::~HcalLinearCompositionFunctor ( )
inlineoverride

Definition at line 25 of file HcalLinearCompositionFunctor.h.

25 {}

Member Function Documentation

◆ a()

double HcalLinearCompositionFunctor::a ( ) const
inline

Definition at line 32 of file HcalLinearCompositionFunctor.h.

References a_.

◆ b()

double HcalLinearCompositionFunctor::b ( ) const
inline

Definition at line 33 of file HcalLinearCompositionFunctor.h.

References b_.

◆ isEqual()

bool HcalLinearCompositionFunctor::isEqual ( const AbsHcalFunctor other) const
inlineoverrideprotectedvirtual

◆ operator()()

double HcalLinearCompositionFunctor::operator() ( double  x) const
overridevirtual

Implements AbsHcalFunctor.

Definition at line 15 of file HcalLinearCompositionFunctor.cc.

References a_, b_, and x.

◆ serialize()

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

Definition at line 49 of file HcalLinearCompositionFunctor.h.

References a_, b_, Exception, and other_.

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

◆ xmax()

double HcalLinearCompositionFunctor::xmax ( ) const
inlineoverridevirtual

Reimplemented from AbsHcalFunctor.

Definition at line 30 of file HcalLinearCompositionFunctor.h.

References other_.

Referenced by svgfig.XAxis::__repr__().

30 { return other_->xmax(); }
std::shared_ptr< AbsHcalFunctor > other_

◆ xmin()

double HcalLinearCompositionFunctor::xmin ( ) const
inlineoverridevirtual

Reimplemented from AbsHcalFunctor.

Definition at line 29 of file HcalLinearCompositionFunctor.h.

References other_.

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

29 { return other_->xmin(); }
std::shared_ptr< AbsHcalFunctor > other_

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 46 of file HcalLinearCompositionFunctor.h.

Member Data Documentation

◆ a_

double HcalLinearCompositionFunctor::a_
private

Definition at line 43 of file HcalLinearCompositionFunctor.h.

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

◆ b_

double HcalLinearCompositionFunctor::b_
private

Definition at line 44 of file HcalLinearCompositionFunctor.h.

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

◆ other_

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