CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

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 $
5
6namespace Genfun {
7PARAMETER_OBJECT_IMP(ConstMinusParameter)
8
9
10ConstMinusParameter::ConstMinusParameter(double xconstant, const AbsParameter *aparm):
11 _constant(xconstant),
12 _parameter(aparm->clone())
13{
14 if (aparm->parameter() && _parameter->parameter()) _parameter->parameter()->connectFrom(aparm->parameter());
15}
16
18AbsParameter(right),
19_constant(right._constant),
20_parameter(right._parameter->clone())
21{}
22
23
25{
26 delete _parameter;
27}
28
29
31 return _constant - _parameter->getValue();
32}
33
34
35
36} // namespace Genfun
#define PARAMETER_OBJECT_IMP(classname)
virtual double getValue() const =0
virtual double getValue() const
ConstMinusParameter(double, const AbsParameter *)
void connectFrom(const AbsParameter *source)
Definition: Parameter.cc:93