musrfit  1.9.2
PFunctionHandler Class Reference

#include <PFunctionHandler.h>

Public Member Functions

 PFunctionHandler (PMsrLines lines)
 
virtual ~PFunctionHandler ()
 
virtual Bool_t IsValid ()
 
virtual Bool_t DoParse ()
 
virtual Bool_t CheckMapAndParamRange (UInt_t mapSize, UInt_t paramSize)
 
virtual double Eval (Int_t funNo, std::vector< Int_t > map, std::vector< double > param, PMetaData metaData)
 
virtual Int_t GetFuncNo (UInt_t idx)
 
virtual Int_t GetFuncIndex (Int_t funcNo)
 
virtual UInt_t GetNoOfFuncs ()
 
virtual TString GetFuncString (UInt_t idx)
 

Private Attributes

Bool_t fValid
 true = function handler has valid functions More...
 
PMsrLines fLines
 stores the msr-file FUNCTIONS block as clear text. More...
 
std::vector< PFunctionfFuncs
 vector of all evaluatable functions More...
 
std::vector< TString > fFuncComment
 vector of prepended function comments More...
 

Detailed Description

Handler of all functions in a msr-file FUNCTIONS block.

Definition at line 45 of file PFunctionHandler.h.

Constructor & Destructor Documentation

◆ PFunctionHandler()

PFunctionHandler::PFunctionHandler ( PMsrLines  lines)

Constructor

Parameters
linesmsr-file FUNCTIONS block in clear text.

Definition at line 43 of file PFunctionHandler.cpp.

References fValid.

◆ ~PFunctionHandler()

PFunctionHandler::~PFunctionHandler ( )
virtual

Destructor

Definition at line 54 of file PFunctionHandler.cpp.

References fFuncComment, fFuncs, and fLines.

Member Function Documentation

◆ CheckMapAndParamRange()

Bool_t PFunctionHandler::CheckMapAndParamRange ( UInt_t  mapSize,
UInt_t  paramSize 
)
virtual

Check all functions if the map and fit parameters are within valid ranges, i.e. map < mapSize, param < paramSize.

return: true if map and fit parameters are withing valid ranges, otherwise false.

Parameters
mapSizesize of the map vector
paramSizesize of the fit parameter vector

Definition at line 133 of file PFunctionHandler.cpp.

References fFuncs.

◆ DoParse()

Bool_t PFunctionHandler::DoParse ( )
virtual

Calls the function parser.

Definition at line 67 of file PFunctionHandler.cpp.

References fFuncComment, fFuncs, fLines, and GetFuncNo().

◆ Eval()

Double_t PFunctionHandler::Eval ( Int_t  funNo,
std::vector< Int_t >  map,
std::vector< double >  param,
PMetaData  metaData 
)
virtual

Evaluate function number funNo for given map and param.

return: value of the function for given map and param.

Parameters
funNofunction number
mapmap vector
paramfit parameter vector

Definition at line 158 of file PFunctionHandler.cpp.

References fFuncs, and GetFuncIndex().

◆ GetFuncIndex()

Int_t PFunctionHandler::GetFuncIndex ( Int_t  funcNo)
virtual

return function index for a given function number

Parameters
funcNofunction number

Definition at line 197 of file PFunctionHandler.cpp.

References fFuncs, and GetFuncNo().

Referenced by Eval().

◆ GetFuncNo()

Int_t PFunctionHandler::GetFuncNo ( UInt_t  idx)
virtual

returns the function number

Parameters
idxindex of the function

Definition at line 181 of file PFunctionHandler.cpp.

References fFuncs.

Referenced by DoParse(), and GetFuncIndex().

◆ GetFuncString()

TString PFunctionHandler::GetFuncString ( UInt_t  idx)
virtual

return the (clean and tidy) function string at index idx

Parameters
idxindex of the function

Definition at line 219 of file PFunctionHandler.cpp.

References fFuncComment, and fFuncs.

◆ GetNoOfFuncs()

virtual UInt_t PFunctionHandler::GetNoOfFuncs ( )
inlinevirtual

Definition at line 57 of file PFunctionHandler.h.

References fFuncs.

◆ IsValid()

virtual Bool_t PFunctionHandler::IsValid ( )
inlinevirtual

Definition at line 51 of file PFunctionHandler.h.

References fValid.

Member Data Documentation

◆ fFuncComment

std::vector<TString> PFunctionHandler::fFuncComment
private

vector of prepended function comments

Definition at line 65 of file PFunctionHandler.h.

Referenced by DoParse(), GetFuncString(), and ~PFunctionHandler().

◆ fFuncs

std::vector<PFunction> PFunctionHandler::fFuncs
private

vector of all evaluatable functions

Definition at line 64 of file PFunctionHandler.h.

Referenced by CheckMapAndParamRange(), DoParse(), Eval(), GetFuncIndex(), GetFuncNo(), GetFuncString(), GetNoOfFuncs(), and ~PFunctionHandler().

◆ fLines

PMsrLines PFunctionHandler::fLines
private

stores the msr-file FUNCTIONS block as clear text.

Definition at line 63 of file PFunctionHandler.h.

Referenced by DoParse(), and ~PFunctionHandler().

◆ fValid

Bool_t PFunctionHandler::fValid
private

true = function handler has valid functions

Definition at line 61 of file PFunctionHandler.h.

Referenced by IsValid(), and PFunctionHandler().


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