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