/usr/include/CLHEP/GenericFunctions/Parameter.hh is in libclhep-dev 2.1.4.1-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | // -*- C++ -*-
// $Id: Parameter.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
//-----------------------Class Parameter------------------------------------//
// //
// Joe Boudreau //
// Petar Maksimovic //
// November 1999 //
// //
// This class is a simple low-level double precision number, together with //
// some limiting values. It is designed essentially as an ingredient for //
// building function objects. //
// //
// Parameters can be connnected to one another. If a parameter is //
// connected, it takes is value (and limits) from the parameter to which //
// it is connected. //
// When disconnected, it captures the values of the connected field before //
// dropping the connection. An attempt to alter the values of the field //
// while the Parameter is connected to another parameter will result in //
// an obnoxious warning mesage. //
// //
//--------------------------------------------------------------------------//
#ifndef Parameter_h
#define Parameter_h 1
#include <string>
#include <iostream>
#include "CLHEP/GenericFunctions/AbsParameter.hh"
namespace Genfun {
/**
* @author
* @ingroup genfun
*/
class Parameter:public AbsParameter {
PARAMETER_OBJECT_DEF(Parameter)
public:
// Constructor.
Parameter(std::string name,
double value,
double lowerLimit=-1e100,
double upperLimit= 1e100);
// Copy constructor
Parameter(const Parameter & right);
// Destructor
virtual ~Parameter();
// Assignment
const Parameter & operator=(const Parameter &right);
// Accessor for the Parameter name
const std::string & getName() const;
// Accessor for value
virtual double getValue() const;
// Accessor for Lower Limit
double getLowerLimit() const;
// Accessor for Upper Limit
double getUpperLimit() const;
// Set Value
void setValue(double value);
// Set Lower Limit
void setLowerLimit(double lowerLimit);
// Set Upper Limit
void setUpperLimit(double upperLimit);
// Take values + limits from some other parameter.
void connectFrom(const AbsParameter * source);
// Extra lingual type information:
virtual Parameter *parameter() {return this;}
virtual const Parameter *parameter() const {return this;}
private:
std::string _name ; // name
double _value; // value
double _lowerLimit; // lower limit
double _upperLimit; // upper limit
const AbsParameter *_sourceParameter; // connection
};
std::ostream & operator << ( std::ostream & o, const Parameter &p);
} // namespace Genfun
#endif
|