CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
src
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
6
namespace
Genfun {
7
PARAMETER_OBJECT_IMP
(ConstTimesParameter)
8
9
ConstTimesParameter
::
ConstTimesParameter
(
double
constant, const
AbsParameter
*parameter):
10
_constant(constant),
11
_parameter(parameter->clone())
12
{
13
if
(parameter->parameter() && _parameter->parameter()) _parameter->
parameter
()->
connectFrom
(parameter->parameter());
14
}
15
16
ConstTimesParameter::ConstTimesParameter
(
const
ConstTimesParameter
& right) :
17
_constant(right._constant),
18
_parameter(right._parameter->clone())
19
{}
20
21
22
ConstTimesParameter::~ConstTimesParameter
()
23
{
24
delete
_parameter;
25
}
26
27
28
double
ConstTimesParameter::getValue
()
const
{
29
return
_constant * _parameter->
getValue
();
30
}
31
32
33
}
// namespace Genfun
Generated on Sun Jun 17 2012 08:08:26 for CLHEP by
1.8.1.1