Public Member Functions | Protected Attributes

nxyter::DistFuncArray Class Reference

Array of DistFunc objects. More...

#include <DistFuncArray.h>

Collaboration diagram for nxyter::DistFuncArray:
Collaboration graph
[legend]

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).
DistFuncoperator[] (int ind)
 Access DistFunc object with index ind.

Protected Attributes

std::vector< DistFuncfDist
 array

Detailed Description

Array of DistFunc objects.

Definition at line 16 of file DistFuncArray.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

void nxyter::DistFuncArray::addEntry ( int  ind,
float  val 
) [inline]

Adds an entry with value val to distribution ind.

Parameters:
val value to be added to the distribution
ind distribution index in range 0 to size()-1
Exceptions:
std::out_of_range if ind out of range
See also:
DistFunc::addEntry()

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.

Parameters:
ind index, allowed range is 0 to size()-1
Exceptions:
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.


Field Documentation

std::vector<DistFunc> nxyter::DistFuncArray::fDist [protected]

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