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
public
:
14
// Dummy constructor, to be used for deserialization only
15
HcalConstFunctor
();
16
17
// Normal constructor
18
explicit
HcalConstFunctor
(
const
double
value
);
19
20
inline
~HcalConstFunctor
()
override
{}
21
22
double
operator()
(
double
x
)
const override
;
23
24
protected
:
25
inline
bool
isEqual
(
const
AbsHcalFunctor
&
other
)
const override
{
26
const
HcalConstFunctor
&
r
= static_cast<const HcalConstFunctor&>(
other
);
27
return
value_
==
r
.value_;
28
}
29
30
private
:
31
double
value_
;
32
33
friend
class
boost::serialization::access
;
34
35
template
<
class
Archive>
36
inline
void
serialize
(Archive& ar,
unsigned
/* version */
) {
37
boost::serialization::base_object<AbsHcalFunctor>(*
this
);
38
ar&
value_
;
39
}
40
};
41
42
BOOST_CLASS_VERSION(
HcalConstFunctor
, 1)
43
BOOST_CLASS_EXPORT_KEY(
HcalConstFunctor
)
44
45
#endif // CondFormats_HcalObjects_HcalConstFunctor_h
AbsHcalFunctor
Definition:
AbsHcalFunctor.h:19
HcalConstFunctor::HcalConstFunctor
HcalConstFunctor()
Definition:
HcalConstFunctor.cc:3
HcalConstFunctor::isEqual
bool isEqual(const AbsHcalFunctor &other) const override
Definition:
HcalConstFunctor.h:25
HcalConstFunctor::serialize
void serialize(Archive &ar, unsigned)
Definition:
HcalConstFunctor.h:36
DDAxes::x
HcalConstFunctor::~HcalConstFunctor
~HcalConstFunctor() override
Definition:
HcalConstFunctor.h:20
trackingPlots.other
other
Definition:
trackingPlots.py:1465
HcalConstFunctor::access
friend class boost::serialization::access
Definition:
HcalConstFunctor.h:33
AbsHcalFunctor.h
value
Definition:
value.py:1
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
HcalConstFunctor::operator()
double operator()(double x) const override
Definition:
HcalConstFunctor.cc:7
HcalConstFunctor
Definition:
HcalConstFunctor.h:12
HcalConstFunctor::value_
double value_
Definition:
HcalConstFunctor.h:31
Generated for CMSSW Reference Manual by
1.8.16