FRIBParallelanalysis  1.0
FrameworkforMPIParalleldataanalysisatFRIB
Public Member Functions | Protected Member Functions | List of all members
frib::analysis::CTreeParameterArray Class Reference

#include <TreeParameterArray.h>

Public Member Functions

 CTreeParameterArray ()
 
 CTreeParameterArray (std::string baseName, unsigned resolution, unsigned numElements, int baseIndex)
 
 CTreeParameterArray (std::string baseName, unsigned resolution, double lowLimit, double highOrWidth, std::string units, bool widthOrHighGiven, unsigned elements, int firstIndex=0)
 
 CTreeParameterArray (std::string baseName, unsigned elements, int baseIndex=0)
 
 CTreeParameterArray (std::string baseName, std::string units, unsigned elements, int firstIndex=0)
 
 CTreeParameterArray (std::string baseName, double low, double high, std::string units, unsigned elements, int firstIndex=0)
 
 CTreeParameterArray (std::string baseName, unsigned channels, double low, double high, std::string units, unsigned elements, int firstIndex=0)
 
 ~CTreeParameterArray ()
 
CTreeParameteroperator[] (int nIndex)
 
void Reset ()
 
void Initialize (std::string baseName, unsigned resolution, unsigned elements, int baseIndex=0)
 
void Initialize (std::string baseName, unsigned resolution, double lowLimit, double widthOrHeight, std::string units, bool widthOrHeightGiven, unsigned elements, int firstIndex=0)
 
void Initialize (std::string baseName, unsigned elements, int firstIndex=0)
 
void Initialize (std::string baseName, std::string units, unsigned elements, int firstIndex=0)
 
void Initialize (std::string baseName, double lowLimit, double highLimit, std::string units, unsigned elements, int firstIndex=0)
 
void Initialize (std::string baseName, unsigned channels, double lowLimit, double highLimit, std::string units, unsigned elements, int firstIndex=0)
 
std::vector< CTreeParameter * >::iterator begin ()
 
std::vector< CTreeParameter * >::iterator end ()
 
size_t size ()
 
int lowIndex ()
 
bool isBound () const
 
void Bind ()
 

Protected Member Functions

void CreateParameters (std::string baseName, unsigned size, CTreeParameter::SharedData &Template)
 
void DeleteParameters ()
 

Detailed Description

This class is a container for an array of Tree parameters. Given a base parameter name, it will create a set of parameters named basename.n where n is a number. The number will be left filled with zeroes to ensure that it sorts correctly. Eg.:

* basename.00
* basename.01
* ..
* basename.17
* 

for an 18 element array.

Author
Ron Fox
Version
1.0 30-Mar-2005 11:03:51 AM

Constructor & Destructor Documentation

◆ CTreeParameterArray()

frib::analysis::CTreeParameterArray::CTreeParameterArray ( )

Vector of parameter pointers.

Default constructor. Builds a tree parameter with no elements. m_nFirstIndex = 0.

◆ ~CTreeParameterArray()

frib::analysis::CTreeParameterArray::~CTreeParameterArray ( )

Destroys the array.. also destroys all the elements in the array.

Member Function Documentation

◆ begin()

vector< CTreeParameter * >::iterator frib::analysis::CTreeParameterArray::begin ( )

Returns begin iteration iterator.

◆ Bind()

void frib::analysis::CTreeParameterArray::Bind ( )

Bind Binds all of the parameters to their underlying raw parameters.

◆ CreateParameters()

void frib::analysis::CTreeParameterArray::CreateParameters ( std::string  baseName,
unsigned  size,
CTreeParameter::SharedData Template 
)
protected

Creates the parameters associated with this array, the name, units, low, high and channels are used to define the parameter.

Parameters
baseNameThe base name of the array. Parameters will be created with names of the form baseName.nnn where nnn has as many zero filled digits as required to be the largest index. Note that if the array includes negative indices these will look like: baseName.-005 for example... a perfectly legal parameter number and, given the english character set collating sequence will sort properly.
sizeNumber of array elements to create.
TemplateTree parameter that will be duplicated (except for the name obviously) to create the array.

◆ DeleteParameters()

void frib::analysis::CTreeParameterArray::DeleteParameters ( )
protected

Deletes all the parameters this vector holds.

◆ end()

vector< CTreeParameter * >::iterator frib::analysis::CTreeParameterArray::end ( )

Returns end of iteration iterator.

◆ isBound()

bool frib::analysis::CTreeParameterArray::isBound ( ) const

isBound

Returns
bool - true if all parameters in the array are bound.

◆ lowIndex()

int frib::analysis::CTreeParameterArray::lowIndex ( )

Returns the smalles accepted index in the array.

◆ operator[]()

CTreeParameter & frib::analysis::CTreeParameterArray::operator[] ( int  nIndex)

Indexes into the tree parameter. If the array index is out of bounds, throws an exception std::out_of_range

Parameters
nIndexIndex into the array. Note that the index is adjusted by subtracting m_nFirstIndex.

◆ Reset()

void frib::analysis::CTreeParameterArray::Reset ( )

Invalidates the values of all elements of the tree parameter array.

◆ size()

size_t frib::analysis::CTreeParameterArray::size ( )

Returns number of elements in the array.


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