Belle II Software development
|
This class represents a quantity which value can be set both permanently and temporarily. More...
#include <HistogramFactory.h>
Public Member Functions | |
Parameter (const AType &defaultValue) | |
Constructor. | |
void | Set (const AType &value) |
Permanently sets inner quantity to given value. | |
void | Set (const Parameter< AType > ¶meter) |
Copy permanent value from another parameter but only if its permanent value is set. | |
void | SetTemporarily (const AType &value) |
Temporarily sets inner quantity to given value. | |
void | SetTemporarily (const Parameter< AType > ¶meter) |
Copy temporary value from another parameter but only if its temporary value is set. | |
AType | Get () |
Returns value of the inner quantity. | |
Private Attributes | |
AType | m_value |
permanent value | |
AType | m_temporaryValue |
temporary value | |
bool | m_isSet |
determines if the permanent value is set | |
bool | m_isSetTemporarily |
determines if the temporary value is set | |
This class represents a quantity which value can be set both permanently and temporarily.
Temporary value has priority but is invalidated when is read for the first time. Quantity can be of any type. The class used in Factory to save some lines of code.
Definition at line 21 of file HistogramFactory.h.
|
inlineexplicit |
Constructor.
defaultValue | - a value which is returned when permanent nor temporary value is set. |
Definition at line 25 of file HistogramFactory.h.
AType Get |
Returns value of the inner quantity.
Get value and reset temporary setting.
Order is: temporary value (if is set), permanent value (if is set), default value. Temporary value is invalidated.
Definition at line 92 of file HistogramFactory.h.
void Set | ( | const AType & | value | ) |
Permanently sets inner quantity to given value.
Sets the permanent value.
value | - a value we want to set |
Definition at line 59 of file HistogramFactory.h.
void Set | ( | const Parameter< AType > & | parameter | ) |
Copy permanent value from another parameter but only if its permanent value is set.
Copy the permanent value setting.
parameter | - another parameter whose permanent value is copied |
Definition at line 67 of file HistogramFactory.h.
void SetTemporarily | ( | const AType & | value | ) |
Temporarily sets inner quantity to given value.
Sets the temporary value.
value | - a value we want to set |
Definition at line 75 of file HistogramFactory.h.
void SetTemporarily | ( | const Parameter< AType > & | parameter | ) |
Copy temporary value from another parameter but only if its temporary value is set.
Copy the temporary value setting.
parameter | - another parameter whose temporary value is copied |
Definition at line 83 of file HistogramFactory.h.
|
private |
determines if the permanent value is set
Definition at line 52 of file HistogramFactory.h.
|
private |
determines if the temporary value is set
Definition at line 54 of file HistogramFactory.h.
|
private |
temporary value
Definition at line 50 of file HistogramFactory.h.
|
private |
permanent value
Definition at line 48 of file HistogramFactory.h.