CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
src
ConstPlusParameter.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id: ConstPlusParameter.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $
3
#include "
CLHEP/GenericFunctions/ConstPlusParameter.hh
"
4
#include "
CLHEP/GenericFunctions/Parameter.hh
"
5
6
namespace
Genfun {
7
PARAMETER_OBJECT_IMP
(ConstPlusParameter)
8
9
ConstPlusParameter
::
ConstPlusParameter
(
double
xconstant, const
AbsParameter
*aparm):
10
_constant(xconstant),
11
_parameter(aparm->clone())
12
{
13
if
(aparm->parameter() && _parameter->parameter()) _parameter->
parameter
()->
connectFrom
(aparm->parameter());
14
}
15
16
ConstPlusParameter::ConstPlusParameter
(
const
ConstPlusParameter
& right) :
17
AbsParameter
(),
18
_constant(right._constant),
19
_parameter(right._parameter->clone())
20
{}
21
22
23
ConstPlusParameter::~ConstPlusParameter
()
24
{
25
delete
_parameter;
26
}
27
28
29
double
ConstPlusParameter::getValue
()
const
{
30
return
_constant + _parameter->
getValue
();
31
}
32
33
}
// namespace Genfun
Generated on Mon May 6 2013 04:04:10 for CLHEP by
1.8.1.2