musrWiz 0.1.0
Loading...
Searching...
No Matches
PMusrfitFunc.h
Go to the documentation of this file.
1/***************************************************************************
2
3 PMusrfitFunc.h
4
5 Author: Andreas Suter
6 e-mail: andreas.suter@psi.ch
7
8***************************************************************************/
9
10/***************************************************************************
11 * Copyright (C) 2007-2026 by Andreas Suter *
12 * andreas.suter@psi.ch *
13 * *
14 * This program is free software; you can redistribute it and/or modify *
15 * it under the terms of the GNU General Public License as published by *
16 * the Free Software Foundation; either version 2 of the License, or *
17 * (at your option) any later version. *
18 * *
19 * This program is distributed in the hope that it will be useful, *
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22 * GNU General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU General Public License *
25 * along with this program; if not, write to the *
26 * Free Software Foundation, Inc., *
27 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
28 ***************************************************************************/
29
30#ifndef _PMUSRFITFUNC_H_
31#define _PMUSRFITFUNC_H_
32
33#include <QString>
34#include <QVector>
35
44 public:
49
54
60 void initParam() { fName = "UnDef"; fValue = 0.0; fMap = false; }
61
66 void setParamName(QString name) { fName = name; }
67
72 void setParamValue(double dval) { fValue = dval; }
73
78 void setParamMap(bool isMap) { fMap = isMap; }
79
84 QString getParamName() { return fName; }
85
90 double getParamValue() { return fValue; }
91
96 bool isMap() { return fMap; }
97
98 private:
99 QString fName;
100 double fValue;
101 bool fMap;
102};
103
113 public:
118
123
127 void initFunc();
128
133 void setName(QString name) { fName = name; }
134
139 void setAbbrv(QString abbrv) { fAbbrv = abbrv; }
140
145 void setNoOfParam(int ival) { fNoOfParam = ival; }
146
151 void addFuncParam(PFuncParam param) { fParam.push_back(param); }
152
157 QString getName() { return fName; }
158
163 QString getAbbrv() { return fAbbrv; }
164
169 int getNoOfParam() { return fNoOfParam; }
170
176 PFuncParam getFuncParam(int idx);
177
182 QVector<PFuncParam> *getFuncParams() { return &fParam; }
183
184 private:
185 QString fName;
186 QString fAbbrv;
188 QVector<PFuncParam> fParam;
189};
190
191#endif // _PMUSRFITFUNC_H_
The PFuncParam class represents a parameter of a musrfit function.
Definition PMusrfitFunc.h:43
bool isMap()
Checks if this is a map parameter.
Definition PMusrfitFunc.h:96
void setParamValue(double dval)
Sets the default parameter value.
Definition PMusrfitFunc.h:72
void setParamMap(bool isMap)
Sets whether this parameter should be a map.
Definition PMusrfitFunc.h:78
double fValue
default parameter value
Definition PMusrfitFunc.h:100
QString fName
parameter name
Definition PMusrfitFunc.h:99
~PFuncParam()
Destructor.
Definition PMusrfitFunc.h:53
double getParamValue()
Returns the default parameter value.
Definition PMusrfitFunc.h:90
void initParam()
Initializes all member variables to default values.
Definition PMusrfitFunc.h:60
bool fMap
flag indicating if this is a map (run-specific) parameter
Definition PMusrfitFunc.h:101
void setParamName(QString name)
Sets the parameter name.
Definition PMusrfitFunc.h:66
PFuncParam()
Constructor. Initializes to default values.
Definition PMusrfitFunc.h:48
QString getParamName()
Returns the parameter name.
Definition PMusrfitFunc.h:84
QString fName
full function name
Definition PMusrfitFunc.h:185
QVector< PFuncParam > * getFuncParams()
Returns a pointer to the parameter vector.
Definition PMusrfitFunc.h:182
void setNoOfParam(int ival)
Sets the number of parameters this function takes.
Definition PMusrfitFunc.h:145
~PMusrfitFunc()
Destructor.
Definition PMusrfitFunc.h:122
QVector< PFuncParam > fParam
parameter definitions
Definition PMusrfitFunc.h:188
PFuncParam getFuncParam(int idx)
Returns a function parameter by index.
Definition PMusrfitFunc.cpp:54
void setAbbrv(QString abbrv)
Sets the function abbreviation.
Definition PMusrfitFunc.h:139
QString getName()
Returns the function name.
Definition PMusrfitFunc.h:157
void initFunc()
Initializes all member variables to default values.
Definition PMusrfitFunc.cpp:39
void setName(QString name)
Sets the function name.
Definition PMusrfitFunc.h:133
PMusrfitFunc()
Constructor. Initializes to default values.
Definition PMusrfitFunc.h:117
QString getAbbrv()
Returns the function abbreviation.
Definition PMusrfitFunc.h:163
void addFuncParam(PFuncParam param)
Adds a parameter definition to this function.
Definition PMusrfitFunc.h:151
int fNoOfParam
number of parameters
Definition PMusrfitFunc.h:187
int getNoOfParam()
Returns the number of parameters.
Definition PMusrfitFunc.h:169
QString fAbbrv
abbreviation for msr-files
Definition PMusrfitFunc.h:186