CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Genfun::ParameterSum Class Reference

#include <ParameterSum.hh>

+ Inheritance diagram for Genfun::ParameterSum:

Public Member Functions

 ParameterSum (const AbsParameter *arg1, const AbsParameter *arg2)
 
 ParameterSum (const ParameterSum &right)
 
virtual ~ParameterSum ()
 
virtual double getValue () const
 
- Public Member Functions inherited from Genfun::AbsParameter
 AbsParameter ()
 
 AbsParameter (const AbsParameter &)
 
virtual ~AbsParameter ()
 
virtual double getValue () const =0
 
AbsParameterclone () const
 
virtual Parameterparameter ()
 
virtual const Parameterparameter () const
 

Detailed Description

Author

Definition at line 20 of file ParameterSum.hh.

Constructor & Destructor Documentation

◆ ParameterSum() [1/2]

Genfun::ParameterSum::ParameterSum ( const AbsParameter arg1,
const AbsParameter arg2 
)

Definition at line 9 of file ParameterSum.cc.

9 :
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}
virtual Parameter * parameter()
Definition: AbsParameter.hh:42
void connectFrom(const AbsParameter *source)
Definition: Parameter.cc:95

◆ ParameterSum() [2/2]

Genfun::ParameterSum::ParameterSum ( const ParameterSum right)

Definition at line 17 of file ParameterSum.cc.

17 :
19_arg1(right._arg1->clone()),
20_arg2(right._arg2->clone())
21{}

◆ ~ParameterSum()

Genfun::ParameterSum::~ParameterSum ( )
virtual

Definition at line 24 of file ParameterSum.cc.

25{
26 delete _arg1;
27 delete _arg2;
28}

Member Function Documentation

◆ getValue()

double Genfun::ParameterSum::getValue ( ) const
virtual

Implements Genfun::AbsParameter.

Definition at line 31 of file ParameterSum.cc.

31 {
32 return _arg1->getValue()+_arg2->getValue();
33}
virtual double getValue() const =0

The documentation for this class was generated from the following files: