IMP.bff
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
DecayModifier Class Referenceabstract

A decorator that modifies a DecayCurve within a specified range. More...

#include <DecayModifier.h>

Inheritance diagram for DecayModifier:
Inheritance graph
Collaboration diagram for DecayModifier:
Collaboration graph

Public Member Functions

virtual void set_data (DecayCurve *v)
 
virtual DecayCurveget_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 ()
 
- Public Member Functions inherited from DecayRange
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

DecayCurvedata = nullptr
 
DecayCurvedefault_data = nullptr
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DecayModifier()

DecayModifier::DecayModifier ( DecayCurve data = nullptr,
int  start = 0,
int  stop = -1,
bool  active = true 
)

Construct a DecayModifier object.

Parameters
dataThe DecayCurve object to be modified.
startThe start of the DecayModifier.
stopThe stop of the DecayModifier.
activeIf true, the DecayModifier is active.

◆ ~DecayModifier()

DecayModifier::~DecayModifier ( )
inline

Destructor.

Member Function Documentation

◆ add()

virtual void DecayModifier::add ( DecayCurve out)
pure virtual

Modify the DecayCurve object.

Parameters
outThe DecayCurve object to be modified.

Implemented in DecayScale, DecayConvolution, DecayLinearization, DecayPattern, and DecayPileup.

◆ get_data()

virtual DecayCurve * DecayModifier::get_data ( )
virtual

Get the DecayCurve object being modified.

Returns
The DecayCurve object being modified.

◆ is_active()

bool DecayModifier::is_active ( ) const

Check if the DecayModifier is active.

Returns
True if the DecayModifier is active, false otherwise.

◆ resize()

void DecayModifier::resize ( size_t  n,
double  v = 0.0 
)

Resize the data of the DecayModifier.

Parameters
nThe new size of the data.
vThe value of the data (if larger than the original size).

◆ set()

void DecayModifier::set ( DecayCurve data,
int  start = 0,
int  stop = -1,
bool  active = true 
)

Set the values of the DecayModifier.

Parameters
dataThe DecayModifier data.
startThe start of the DecayModifier.
stopThe stop of the DecayModifier.
activeIf true, the DecayModifier modifies the input decay.

◆ set_active()

void DecayModifier::set_active ( bool  v)

Set the activity status of the DecayModifier.

Parameters
vThe activity status of the DecayModifier.

◆ set_data()

virtual void DecayModifier::set_data ( DecayCurve v)
virtual

Set the DecayCurve object to be modified.

Parameters
vThe DecayCurve object to be modified.

Member Data Documentation

◆ data

DecayCurve* DecayModifier::data = nullptr
protected

◆ default_data

DecayCurve* DecayModifier::default_data = nullptr
protected

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