FRIBParallelanalysis
1.0
FrameworkforMPIParalleldataanalysisatFRIB
|
#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 () | |
CTreeParameter & | operator[] (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 () |
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.
frib::analysis::CTreeParameterArray::CTreeParameterArray | ( | ) |
Vector of parameter pointers.
Default constructor. Builds a tree parameter with no elements. m_nFirstIndex = 0.
frib::analysis::CTreeParameterArray::~CTreeParameterArray | ( | ) |
Destroys the array.. also destroys all the elements in the array.
vector< CTreeParameter * >::iterator frib::analysis::CTreeParameterArray::begin | ( | ) |
Returns begin iteration iterator.
void frib::analysis::CTreeParameterArray::Bind | ( | ) |
Bind Binds all of the parameters to their underlying raw parameters.
|
protected |
Creates the parameters associated with this array, the name, units, low, high and channels are used to define the parameter.
baseName | The 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. |
size | Number of array elements to create. |
Template | Tree parameter that will be duplicated (except for the name obviously) to create the array. |
|
protected |
Deletes all the parameters this vector holds.
vector< CTreeParameter * >::iterator frib::analysis::CTreeParameterArray::end | ( | ) |
Returns end of iteration iterator.
bool frib::analysis::CTreeParameterArray::isBound | ( | ) | const |
isBound
int frib::analysis::CTreeParameterArray::lowIndex | ( | ) |
Returns the smalles accepted index in the array.
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
nIndex | Index into the array. Note that the index is adjusted by subtracting m_nFirstIndex. |
void frib::analysis::CTreeParameterArray::Reset | ( | ) |
Invalidates the values of all elements of the tree parameter array.
size_t frib::analysis::CTreeParameterArray::size | ( | ) |
Returns number of elements in the array.