00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef Parameter_h
00023 #define Parameter_h 1
00024
00025 #include "CLHEP/config/CLHEP.h"
00026 #include "CLHEP/config/iostream.h"
00027 #include <string>
00028 #include "CLHEP/GenericFunctions/AbsParameter.hh"
00029
00030 namespace Genfun {
00031
00036 class Parameter:public AbsParameter {
00037
00038 PARAMETER_OBJECT_DEF(Parameter)
00039
00040 public:
00041
00042
00043 Parameter(HepSTL::string name,
00044 double value,
00045 double lowerLimit=-1e100,
00046 double upperLimit= 1e100);
00047
00048
00049 Parameter(const Parameter & right);
00050
00051
00052 virtual ~Parameter();
00053
00054
00055 const Parameter & operator=(const Parameter &right);
00056
00057
00058 const HepSTL::string & getName() const;
00059
00060
00061 virtual double getValue() const;
00062
00063
00064 double getLowerLimit() const;
00065
00066
00067 double getUpperLimit() const;
00068
00069
00070 void setValue(double value);
00071
00072
00073 void setLowerLimit(double lowerLimit);
00074
00075
00076 void setUpperLimit(double upperLimit);
00077
00078
00079 void connectFrom(const AbsParameter * source);
00080
00081
00082 virtual Parameter *parameter() {return this;}
00083 virtual const Parameter *parameter() const {return this;}
00084
00085 private:
00086
00087 HepSTL::string _name ;
00088 double _value;
00089 double _lowerLimit;
00090 double _upperLimit;
00091 const AbsParameter *_sourceParameter;
00092
00093 };
00094 HepStd::ostream & operator << ( HepStd::ostream & o, const Parameter &p);
00095 }
00096
00097 #endif