CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
ConstTimesParameter.cc
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: ConstTimesParameter.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $
3#include "CLHEP/GenericFunctions/ConstTimesParameter.hh"
4#include "CLHEP/GenericFunctions/Parameter.hh"
5
6namespace Genfun {
7PARAMETER_OBJECT_IMP(ConstTimesParameter)
8
9ConstTimesParameter::ConstTimesParameter(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
18_constant(right._constant),
19_parameter(right._parameter->clone())
20{}
21
22
24{
25 delete _parameter;
26}
27
28
30 return _constant * _parameter->getValue();
31}
32
33
34} // namespace Genfun
#define PARAMETER_OBJECT_IMP(classname)
Definition: AbsParameter.hh:86
virtual double getValue() const =0
virtual Parameter * parameter()
Definition: AbsParameter.hh:42
virtual double getValue() const
ConstTimesParameter(double, const AbsParameter *)
void connectFrom(const AbsParameter *source)
Definition: Parameter.cc:95
Definition: Abs.hh:14