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