Main Page
Namespaces
Classes
Package Documentation
src
CondFormats
HcalObjects
interface
HcalConstFunctor.h
Go to the documentation of this file.
1
#ifndef CondFormats_HcalObjects_HcalConstFunctor_h
2
#define CondFormats_HcalObjects_HcalConstFunctor_h
3
4
#include "
CondFormats/HcalObjects/interface/AbsHcalFunctor.h
"
5
6
#include "boost/serialization/access.hpp"
7
#include "boost/serialization/version.hpp"
8
9
//
10
// A functor returning a constant value
11
//
12
class
HcalConstFunctor
:
public
AbsHcalFunctor
13
{
14
public
:
15
// Dummy constructor, to be used for deserialization only
16
HcalConstFunctor
();
17
18
// Normal constructor
19
explicit
HcalConstFunctor
(
const
double
value
);
20
21
inline
~HcalConstFunctor
()
override
{}
22
23
double
operator()
(
double
x
)
const override
;
24
25
protected
:
26
inline
bool
isEqual
(
const
AbsHcalFunctor
&
other
)
const override
27
{
28
const
HcalConstFunctor
&
r
=
static_cast<
const
HcalConstFunctor
&
>
(
other
);
29
return
value_
== r.
value_
;
30
}
31
32
private
:
33
double
value_
;
34
35
friend
class
boost::serialization::access
;
36
37
template
<
class
Archive>
38
inline
void
serialize
(Archive & ar,
unsigned
/* version */
)
39
{
40
boost::serialization::base_object<AbsHcalFunctor>(*this);
41
ar &
value_
;
42
}
43
};
44
45
BOOST_CLASS_VERSION(
HcalConstFunctor
, 1)
46
BOOST_CLASS_EXPORT_KEY(
HcalConstFunctor
)
47
48
#endif // CondFormats_HcalObjects_HcalConstFunctor_h
HcalConstFunctor::access
friend class boost::serialization::access
Definition:
HcalConstFunctor.h:35
HcalConstFunctor
Definition:
HcalConstFunctor.h:12
HcalConstFunctor::HcalConstFunctor
HcalConstFunctor()
Definition:
HcalConstFunctor.cc:3
trackingPlots.other
other
Definition:
trackingPlots.py:1453
HcalConstFunctor::operator()
double operator()(double x) const override
Definition:
HcalConstFunctor.cc:13
value
Definition:
value.py:1
HcalConstFunctor::value_
double value_
Definition:
HcalConstFunctor.h:33
AbsHcalFunctor.h
HcalConstFunctor::serialize
void serialize(Archive &ar, unsigned)
Definition:
HcalConstFunctor.h:38
AbsHcalFunctor
Definition:
AbsHcalFunctor.h:19
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
HcalConstFunctor::isEqual
bool isEqual(const AbsHcalFunctor &other) const override
Definition:
HcalConstFunctor.h:26
DDAxes::x
HcalConstFunctor::~HcalConstFunctor
~HcalConstFunctor() override
Definition:
HcalConstFunctor.h:21
Generated for CMSSW Reference Manual by
1.8.11