All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IFitVar.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 namespace osc
6 {
7  template<class T> class _IOscCalcAdjustable;
8  typedef _IOscCalcAdjustable<double> IOscCalcAdjustable;
9 }
10 
11 namespace ana
12 {
13  /// Interface definition for fittable variables
14  class IFitVar
15  {
16  public:
17  virtual double GetValue(const osc::IOscCalcAdjustable* osc) const = 0;
18  virtual void SetValue(osc::IOscCalcAdjustable* osc, double val) const = 0;
19  virtual std::string ShortName() const = 0;
20  virtual std::string LatexName() const = 0;
21  virtual double Penalty(double /*val*/,
22  osc::IOscCalcAdjustable*) const {return 0;}
23  };
24 
25  //----------------------------------------------------------------------
26 
27  /// Base class for variables with constraints. Apply penalty outside range
29  {
30  public:
31  virtual double Penalty(double val, osc::IOscCalcAdjustable*) const;
32  virtual double LowLimit() const = 0;
33  virtual double HighLimit() const = 0;
34  protected:
35  double Clamp(double val) const;
36  };
37 } // namespace
virtual double Penalty(double val, osc::IOscCalcAdjustable *) const
Definition: IFitVar.cxx:10
_IOscCalcAdjustable< double > IOscCalcAdjustable
Definition: Calcs.h:5
virtual std::string LatexName() const =0
virtual double LowLimit() const =0
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const =0
virtual std::string ShortName() const =0
process_name opflashCryoW ana
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const =0
Base class for variables with constraints. Apply penalty outside range.
Definition: IFitVar.h:28
virtual double Penalty(double, osc::IOscCalcAdjustable *) const
Definition: IFitVar.h:21
double Clamp(double val) const
Definition: IFitVar.cxx:31
Interface definition for fittable variables.
Definition: IFitVar.h:14
virtual double HighLimit() const =0