IMP.bff
|
A decorator that modifies a DecayCurve within a specified range. More...
#include <DecayModifier.h>
Public Member Functions | |
virtual void | set_data (DecayCurve *v) |
virtual DecayCurve * | get_data () |
bool | is_active () const |
void | set_active (bool v) |
void | set (DecayCurve *data, int start=0, int stop=-1, bool active=true) |
void | resize (size_t n, double v=0.0) |
virtual void | add (DecayCurve *out)=0 |
DecayModifier (DecayCurve *data=nullptr, int start=0, int stop=-1, bool active=true) | |
~DecayModifier () | |
![]() | |
void | set_start (int v) |
Set the start index of the decay range. | |
size_t | get_start (DecayCurve *d=nullptr) const |
Get the start index of the decay range. | |
void | set_stop (int v) |
Set the stop index of the decay range. | |
size_t | get_stop (DecayCurve *d=nullptr) const |
Get the stop index of the decay range. | |
void | set_range (std::vector< int > v) |
Set the range using a vector of indices. | |
std::vector< int > | get_range (DecayCurve *d=nullptr) |
Get the range as a vector of indices. | |
void | set (int start=0, int stop=-1) |
Set the start and stop indices of the decay range. | |
DecayRange (int start, int stop) | |
Constructor. | |
virtual | ~DecayRange ()=default |
Destructor. | |
Protected Attributes | |
DecayCurve * | data = nullptr |
DecayCurve * | default_data = nullptr |
A decorator that modifies a DecayCurve within a specified range.
The DecayModifier class is a decorator that modifies a DecayCurve object within a specified range. It is used to apply modifications to the decay behavior of a DecayCurve. The modifications are applied by the add
method, which modifies the input DecayCurve object.
DecayModifier::DecayModifier | ( | DecayCurve * | data = nullptr , |
int | start = 0 , |
||
int | stop = -1 , |
||
bool | active = true |
||
) |
Construct a DecayModifier object.
data | The DecayCurve object to be modified. |
start | The start of the DecayModifier. |
stop | The stop of the DecayModifier. |
active | If true, the DecayModifier is active. |
|
inline |
Destructor.
|
pure virtual |
Modify the DecayCurve object.
out | The DecayCurve object to be modified. |
Implemented in DecayScale, DecayConvolution, DecayLinearization, DecayPattern, and DecayPileup.
|
virtual |
Get the DecayCurve object being modified.
bool DecayModifier::is_active | ( | ) | const |
Check if the DecayModifier is active.
void DecayModifier::resize | ( | size_t | n, |
double | v = 0.0 |
||
) |
Resize the data of the DecayModifier.
n | The new size of the data. |
v | The value of the data (if larger than the original size). |
void DecayModifier::set | ( | DecayCurve * | data, |
int | start = 0 , |
||
int | stop = -1 , |
||
bool | active = true |
||
) |
Set the values of the DecayModifier.
data | The DecayModifier data. |
start | The start of the DecayModifier. |
stop | The stop of the DecayModifier. |
active | If true, the DecayModifier modifies the input decay. |
void DecayModifier::set_active | ( | bool | v | ) |
Set the activity status of the DecayModifier.
v | The activity status of the DecayModifier. |
|
virtual |
Set the DecayCurve object to be modified.
v | The DecayCurve object to be modified. |
|
protected |
|
protected |