ndmspc  v1.2.0-0.1.rc3
Ndmspc::NParameters Class Reference

NParameters object. More...

#include <NParameters.h>

Inheritance diagram for Ndmspc::NParameters:

Public Member Functions

 NParameters ()
 
 NParameters (std::vector< std::string > paramNames, const char *name="parameters", const char *title="Parameters")
 
virtual ~NParameters ()
 
virtual void Print (Option_t *option="") const override
 Print the parameters. More...
 
bool SetParameter (int bin, Double_t value, Double_t error=0.)
 Set the value and error of a parameter by bin index. More...
 
bool SetParameter (const char *parName, Double_t value, Double_t error=0.)
 Set the value and error of a parameter by name. More...
 
Double_t GetParameter (int bin) const
 Get the value of a parameter by bin index. More...
 
Double_t GetParameter (const char *parName) const
 Get the value of a parameter by name. More...
 
Double_t GetParameterError (int bin) const
 Get the error of a parameter by bin index. More...
 
Double_t GetParameterError (const char *parName) const
 Get the error of a parameter by name. More...
 
TH1D * GetHisto () const
 Returns the associated histogram. More...
 
std::vector< std::string > GetNames () const
 

Private Attributes

TH1D * fHisto {nullptr}
 Histogram with parameters.
 
std::vector< std::string > fNames {}
 Names of parameters.
 

Detailed Description

NParameters object.

Author
Martin Vala mvala.nosp@m.@cer.nosp@m.n.ch

Definition at line 13 of file NParameters.h.

Constructor & Destructor Documentation

◆ NParameters() [1/2]

Ndmspc::NParameters::NParameters ( )

Default constructor

Definition at line 12 of file NParameters.cxx.

◆ NParameters() [2/2]

Ndmspc::NParameters::NParameters ( std::vector< std::string >  paramNames,
const char *  name = "parameters",
const char *  title = "Parameters" 
)

Constructor

Definition at line 20 of file NParameters.cxx.

References fHisto.

◆ ~NParameters()

Ndmspc::NParameters::~NParameters ( )
virtual

Destructor

Definition at line 39 of file NParameters.cxx.

References fHisto.

Member Function Documentation

◆ GetHisto()

TH1D* Ndmspc::NParameters::GetHisto ( ) const
inline

Returns the associated histogram.

Returns
Pointer to the TH1D histogram object.

Definition at line 84 of file NParameters.h.

References fHisto.

Referenced by Ndmspc::NBinningPoint::RecalculateStorageCoords(), and Ndmspc::NGnNavigator::Reshape().

◆ GetParameter() [1/2]

Double_t Ndmspc::NParameters::GetParameter ( const char *  parName) const

Get the value of a parameter by name.

Parameters
parNameName of the parameter.
Returns
Value of the parameter.

Get parameter by name

Definition at line 95 of file NParameters.cxx.

References fHisto.

◆ GetParameter() [2/2]

Double_t Ndmspc::NParameters::GetParameter ( int  bin) const

Get the value of a parameter by bin index.

Parameters
binIndex of the parameter/bin.
Returns
Value of the parameter.

Get parameter by index

Definition at line 83 of file NParameters.cxx.

References fHisto.

◆ GetParameterError() [1/2]

Double_t Ndmspc::NParameters::GetParameterError ( const char *  parName) const

Get the error of a parameter by name.

Parameters
parNameName of the parameter.
Returns
Error of the parameter.

Get parameter error by name

Definition at line 118 of file NParameters.cxx.

References fHisto.

◆ GetParameterError() [2/2]

Double_t Ndmspc::NParameters::GetParameterError ( int  bin) const

Get the error of a parameter by bin index.

Parameters
binIndex of the parameter/bin.
Returns
Error of the parameter.

Get parameter error by index

Definition at line 107 of file NParameters.cxx.

References fHisto.

◆ Print()

void Ndmspc::NParameters::Print ( Option_t *  option = "") const
overridevirtual

Print the parameters.

Parameters
optionOptional string to specify print options.

Print parameters

Definition at line 47 of file NParameters.cxx.

References fHisto.

◆ SetParameter() [1/2]

bool Ndmspc::NParameters::SetParameter ( const char *  parName,
Double_t  value,
Double_t  error = 0. 
)

Set the value and error of a parameter by name.

Parameters
parNameName of the parameter.
valueValue to set.
errorOptional error value (default is 0).
Returns
true if the parameter was set successfully, false otherwise.

Set parameter by name

Definition at line 68 of file NParameters.cxx.

References fHisto.

◆ SetParameter() [2/2]

bool Ndmspc::NParameters::SetParameter ( int  bin,
Double_t  value,
Double_t  error = 0. 
)

Set the value and error of a parameter by bin index.

Parameters
binIndex of the parameter/bin.
valueValue to set.
errorOptional error value (default is 0).
Returns
true if the parameter was set successfully, false otherwise.

Set parameter by index

Definition at line 55 of file NParameters.cxx.

References fHisto.

Referenced by Ndmspc::NGnTree::NGnTree().


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