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