CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
src
ParameterComposition.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id:
3
#include "
CLHEP/GenericFunctions/ParameterComposition.hh
"
4
#include "
CLHEP/GenericFunctions/Parameter.hh
"
5
#include "
CLHEP/GenericFunctions/AbsFunction.hh
"
6
7
namespace
Genfun {
8
PARAMETER_OBJECT_IMP
(ParameterComposition)
9
10
ParameterComposition
::
ParameterComposition
(const
AbsFunction
*arg1, const
AbsParameter
*arg2):
11
AbsParameter
(),
12
_arg1(arg1->clone()),
13
_arg2(arg2->clone())
14
{
15
if
(arg2->parameter() && _arg2->parameter()) _arg2->
parameter
()->
connectFrom
(arg2->parameter());
16
}
17
18
ParameterComposition::ParameterComposition
(
const
ParameterComposition
& right) :
19
AbsParameter
(),
20
_arg1(right._arg1->clone()),
21
_arg2(right._arg2->clone())
22
{}
23
24
25
ParameterComposition::~ParameterComposition
()
26
{
27
delete
_arg1;
28
delete
_arg2;
29
}
30
31
32
double
ParameterComposition::getValue
()
const
{
33
return
_arg1->operator() (_arg2->
getValue
());
34
}
35
36
}
// namespace Genfun
Generated on Sun Jun 17 2012 08:08:27 for CLHEP by
1.8.1.1