Array of DistFunc objects. More...
#include <DistFuncArray.h>
Public Member Functions | |
DistFuncArray (int dim, int cap=0) | |
Constructor, use dim nxyter::DistFunc objects with capacity cap. | |
virtual | ~DistFuncArray () |
void | setMaxEntries (int max) |
Set maximum number of entries accepted to max. | |
void | setCapacity (int cap) |
Reserve capacity to hold cap entries. | |
void | clear () |
Drop all entries. | |
void | addEntry (int ind, float val) |
Adds an entry with value val to distribution ind. | |
int | numEntries () |
Returns total number of entries in all distributions of array. | |
int | size () |
Returns array size (as defined at ctor time). | |
DistFunc & | operator[] (int ind) |
Access DistFunc object with index ind. | |
Protected Attributes | |
std::vector< DistFunc > | fDist |
array |
Array of DistFunc objects.
Definition at line 16 of file DistFuncArray.h.
nxyter::DistFuncArray::DistFuncArray | ( | int | dim, | |
int | cap = 0 | |||
) | [explicit] |
Constructor, use dim nxyter::DistFunc objects with capacity cap.
Definition at line 18 of file DistFuncArray.cxx.
References fDist, and setCapacity().
nxyter::DistFuncArray::~DistFuncArray | ( | ) | [virtual] |
Definition at line 26 of file DistFuncArray.cxx.
void nxyter::DistFuncArray::addEntry | ( | int | ind, | |
float | val | |||
) | [inline] |
Adds an entry with value val to distribution ind.
val | value to be added to the distribution | |
ind | distribution index in range 0 to size()-1 |
std::out_of_range | if ind out of range |
Definition at line 35 of file DistFuncArray.h.
References fDist.
Referenced by nxyter::FebUtil::acquireTestTriggerData().
void nxyter::DistFuncArray::clear | ( | ) |
Drop all entries.
Calls DistFunc::clear() for all array elements.
Definition at line 58 of file DistFuncArray.cxx.
References fDist.
Referenced by nxyter::FebUtil::acquireTestTriggerData().
int nxyter::DistFuncArray::numEntries | ( | ) |
Returns total number of entries in all distributions of array.
Definition at line 66 of file DistFuncArray.cxx.
References fDist.
Referenced by nxyter::NxDataSummary::analyse().
DistFunc& nxyter::DistFuncArray::operator[] | ( | int | ind | ) | [inline] |
Access DistFunc object with index ind.
ind | index, allowed range is 0 to size()-1 |
std::out_of_range | if ind out of range |
Definition at line 49 of file DistFuncArray.h.
References fDist.
void nxyter::DistFuncArray::setCapacity | ( | int | cap | ) |
Reserve capacity to hold cap entries.
Calls DistFunc::setCapacity() for all array elements.
Definition at line 47 of file DistFuncArray.cxx.
References fDist.
Referenced by DistFuncArray().
void nxyter::DistFuncArray::setMaxEntries | ( | int | max | ) |
Set maximum number of entries accepted to max.
Calls DistFunc::setMaxEntries() for all array elements.
Definition at line 36 of file DistFuncArray.cxx.
References fDist.
Referenced by nxyter::FebUtil::acquireTestPulserData(), nxyter::FebUtil::acquireTestTriggerData(), and cmd_idsigch().
int nxyter::DistFuncArray::size | ( | ) | [inline] |
Returns array size (as defined at ctor time).
Definition at line 41 of file DistFuncArray.h.
References fDist.
std::vector<DistFunc> nxyter::DistFuncArray::fDist [protected] |
array
Definition at line 18 of file DistFuncArray.h.
Referenced by addEntry(), clear(), DistFuncArray(), numEntries(), operator[](), setCapacity(), setMaxEntries(), and size().