In file diagdatum.h:

class diagObject : public diagObjectName

Manager class for data objects in the diagnostics storage.

Inheritance:


Public Classes

class diagParam : public diagObjectName
Manager class for parameter objects in the diagnostcs storage.
friend class diagObject
Data storage object is a friend.
diagParam (const string& Name, int MaxIndex1, int MaxIndex2, gdsDataType Datatype, const void* DefValue, int MaxDim = 1, const string& Unit = "", bool write = true)
Constructor.
virtual gdsParameter* newParam (const void* value, int dim = 1, int index1 = -1, int index2 = -1) const
New parameter method.
virtual gdsParameter* newParam (const gdsDatum& value, int index1 = -1, int index2 = -1) const
New parameter method.

Public Fields

typedef gdsDataObject::objflag objflag
Type describing the flags of the data object

Public Methods

diagObject (objflag Flag, const string& Type, const string& Name, int MaxIndex1, int MaxIndex2, gdsDataType Datatype, const void* DefValue, int MaxDim1 = 1, int MaxDim2 = 0)
Constructor.
virtual bool isValid (const string& Name, bool write = true, string* normName = 0) const
Validates names.
virtual gdsDataObject* newObject (void* value, int dim1 = 0, int dim2 = 0, int index1 = -1, int index2 = -1, gdsDataType Datatype = gds_void) const
New data object.
virtual bool clone (gdsDataObject& obj, const gdsDataObject* templ, bool copydata = true) const
Clone data object.
virtual bool setParamHook (gdsDataObject& obj, const string& pName, const gdsDatum& value) const
Set parameter hook.
virtual bool getParamHook (gdsDataObject& obj, const string& pName, gdsDatum& value) const
Set parameter hook.
virtual bool setParam (gdsDataObject& obj, const string& pName, const gdsDatum& value) const
Set parameter in data object.
virtual bool setParam (gdsDataObject& obj, const string& pName, const string& value) const
Set parameter in data object.
virtual bool setParam (gdsDataObject& obj, const string& pName, char value) const
Set parameter in data object.
virtual bool setParam (gdsDataObject& obj, const string& pName, short value) const
Set parameter in data object.
virtual bool setParam (gdsDataObject& obj, const string& pName, int value) const
Set parameter in data object.
virtual bool setParam (gdsDataObject& obj, const string& pName, long long value) const
Set parameter in data object.
virtual bool setParam (gdsDataObject& obj, const string& pName, float value) const
Set parameter in data object.
virtual bool setParam (gdsDataObject& obj, const string& pName, double value) const
Set parameter in data object.
virtual bool setParam (gdsDataObject& obj, const string& pName, std::complex<float> value) const
Set parameter in data object.
virtual bool setParam (gdsDataObject& obj, const string& pName, std::complex<double> value) const
Set parameter in data object.
virtual bool setParam (gdsDataObject& obj, const string& pName, bool value) const
Set parameter in data object.
virtual bool getParam (gdsDataObject& obj, const string& pName, gdsDatum& value) const
Get parameter value from data object.
virtual bool getParam (gdsDataObject& obj, const string& pName, string& value) const
Get string parameter from data object.
virtual bool getParam (gdsDataObject& obj, const string& pName, char& value) const
Get char parameter from data object.
virtual bool getParam (gdsDataObject& obj, const string& pName, short& value) const
Get short parameter from data object.
virtual bool getParam (gdsDataObject& obj, const string& pName, int& value, int max = 1) const
Get int parameter from data object.
virtual bool getParam (gdsDataObject& obj, const string& pName, long long& value) const
Get long long parameter from data object.
virtual bool getParam (gdsDataObject& obj, const string& pName, float& value) const
Get float parameter from data object.
virtual bool getParam (gdsDataObject& obj, const string& pName, double& value, int max = 1) const
Get double parameter from data object.
virtual bool getParam (gdsDataObject& obj, const string& pName, std::complex<float>& value) const
Get complex<float> parameter from data object.
virtual bool getParam (gdsDataObject& obj, const string& pName, std::complex<double>& value) const
Get complex<double> parameter from data object.
virtual bool getParam (gdsDataObject& obj, const string& pName, bool& value) const
Get bool parameter from data object.
virtual bool setData (gdsDataObject& obj, const void* value, int dim1 = 0, int dim2 = 0, gdsDataType Datatype = gds_void) const
Set value(s) in data object.
string getType () const
Get type.
objflag getFlag () const
Get flag.

Protected Fields

typedef std::vector <diagParam> diagParamList
type for list of parameter manager classes
diagParamList dParams
list of parameter manager classes
objflag flag
object flag
string type
object type

Inherited from diagObjectName:

Public Methods

static string makeName(const string& Name, int index1 = -1, int index2 = -1)

Protected Fields

string name
int maxIndex1
int maxIndex2
gdsDataType datatype
int maxDim1
int maxDim2
const void* defValue
string unit
bool writeaccess

Documentation

This class is a manager object for accessing diagnostics data objects within a diagnostics storage object.

typedef gdsDataObject::objflag objflag
Type describing the flags of the data object

class diagParam: public diagObjectName
This class is a manager object for accessing diagnostics parameters within a diagnostics storage object.
Author:
DS, February 99
See Also:
Diagnostics storage API

diagParam(const string& Name, int MaxIndex1, int MaxIndex2, gdsDataType Datatype, const void* DefValue, int MaxDim = 1, const string& Unit = "", bool write = true)
Constructs a parameter access object. For an explanation of the parameters see the parent object constructor.

Returns:
void
Parameters:
Name - name of the data object/parameter
MaxIndex1 - maximum value for first index
MaxIndex2 - maximum value for second index
Datatype - data type of object
DefValue - default value of data object/parameter
MaxDim1 - maximum value of first dimension
write - if false, data object/parameter is read-only

virtual gdsParameter* newParam(const void* value, int dim = 1, int index1 = -1, int index2 = -1) const
Returns a new parameter storage object.

Returns:
new parameter object
Parameters:
value - parameter value(s)
dim - dimension of parameter
index1 - first index of parameter object name
index2 - second index of parameter object name

virtual gdsParameter* newParam(const gdsDatum& value, int index1 = -1, int index2 = -1) const
Returns a new parameter storage object.

Returns:
new parameter object
Parameters:
value - parameter value
dim - dimension of parameter
index1 - first index of parameter object name
index2 - second index of parameter object name

diagObject(objflag Flag, const string& Type, const string& Name, int MaxIndex1, int MaxIndex2, gdsDataType Datatype, const void* DefValue, int MaxDim1 = 1, int MaxDim2 = 0)
Constructs a data object access object. For an explanation of the parameters see the parent object constructor.

Returns:
void
Parameters:
Objtype - type of data object
Name - name of the data object/parameter
MaxIndex1 - maximum value for first index
MaxIndex2 - maximum value for second index
Datatype - data type of object
DefValue - default value of data object/parameter
MaxDim1 - maximum value of first dimension
MaxDim2 - maximum value of second dimension

virtual bool isValid(const string& Name, bool write = true, string* normName = 0) const
This function returns true if the specified name is valid. It checks name, indices and write access. It can also return a normalized name (correct capitalization no spaces). If the name is contains a '.' charachter the first string is interpreted as the data object name, whereas the second string is interpreted as the parameter name. In this case both names a checked.

Returns:
true if valid name, false otherwise
Parameters:
Name - name of data object or dataobject.parameter
write - if false only read access is requested
normName - normalized name (return)

virtual gdsDataObject* newObject(void* value, int dim1 = 0, int dim2 = 0, int index1 = -1, int index2 = -1, gdsDataType Datatype = gds_void) const
Returns a new data storage object including its parameters which have a default value.

Returns:
new data object
Parameters:
value - data value(s)
dim1 - first dimension of parameter
dim2 - second dimension of parameter
index1 - first index of data object name
index2 - second index of data object name

virtual bool clone(gdsDataObject& obj, const gdsDataObject* templ, bool copydata = true) const
Clones a data storage object. Copies all valid parameters from the template data object to the cloned data object. Uses default values for parameters which are not in the template.

Returns:
true if successful
Parameters:
obj - clone data object
templ - template data object
if - true copies the data values as well

virtual bool setParamHook(gdsDataObject& obj, const string& pName, const gdsDatum& value) const
Hook for setting a parameter. This function is called prior of setting a parameter to a new value. If it returns true no further action is taken, otherwise the normal set function is executed.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool getParamHook(gdsDataObject& obj, const string& pName, gdsDatum& value) const
Hook for gettting a parameter. This function is called prior of getting a parameter value. If it returns true no further action is taken, otherwise the normal get function is executed.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool setParam(gdsDataObject& obj, const string& pName, const gdsDatum& value) const
Sets a parameter in the supplied data objects. Makes sure the parameter is valid.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool setParam(gdsDataObject& obj, const string& pName, const string& value) const
Sets a parameter in the supplied data objects. Makes sure the parameter is valid.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value (string encoded)

virtual bool setParam(gdsDataObject& obj, const string& pName, char value) const
Sets a parameter in the supplied data objects. Makes sure the parameter is a valid integer type.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool setParam(gdsDataObject& obj, const string& pName, short value) const
Sets a parameter in the supplied data objects. Makes sure the parameter is a valid integer type.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool setParam(gdsDataObject& obj, const string& pName, int value) const
Sets a parameter in the supplied data objects. Makes sure the parameter is a valid integer type.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool setParam(gdsDataObject& obj, const string& pName, long long value) const
Sets a parameter in the supplied data objects. Makes sure the parameter is a valid integer type.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool setParam(gdsDataObject& obj, const string& pName, float value) const
Sets a parameter in the supplied data objects. Makes sure the parameter is a valid floating point number.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool setParam(gdsDataObject& obj, const string& pName, double value) const
Sets a parameter in the supplied data objects. Makes sure the parameter is a valid floating point number.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool setParam(gdsDataObject& obj, const string& pName, std::complex<float> value) const
Sets a parameter in the supplied data objects. Makes sure the parameter is a valid complex number.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool setParam(gdsDataObject& obj, const string& pName, std::complex<double> value) const
Sets a parameter in the supplied data objects. Makes sure the parameter is a valid complex number.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool setParam(gdsDataObject& obj, const string& pName, bool value) const
Sets a parameter in the supplied data objects. Makes sure the parameter is a valid boolean.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool getParam(gdsDataObject& obj, const string& pName, gdsDatum& value) const
Gets a parameter from the supplied data objects. Makes sure the parameter is valid and returns false if the parameter doesn't exist.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool getParam(gdsDataObject& obj, const string& pName, string& value) const
Gets a parameter from the supplied data objects. Makes sure the parameter is valid and returns false if the parameter doesn't exist, or isn't a channel name or a string.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool getParam(gdsDataObject& obj, const string& pName, char& value) const
Gets a parameter from the supplied data objects. Makes sure the parameter is valid and returns false if the parameter doesn't exist, or isn't a character.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool getParam(gdsDataObject& obj, const string& pName, short& value) const
Gets a parameter from the supplied data objects. Makes sure the parameter is valid and returns false if the parameter doesn't exist, or isn't a short or a character.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool getParam(gdsDataObject& obj, const string& pName, int& value, int max = 1) const
Gets a parameter from the supplied data objects. Makes sure the parameter is valid and returns false if the parameter doesn't exist, or isn't an int, short or a character.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value
max - maximum number of parameters

virtual bool getParam(gdsDataObject& obj, const string& pName, long long& value) const
Gets a parameter from the supplied data objects. Makes sure the parameter is valid and returns false if the parameter doesn't exist, or isn't an long long, int, short or a character.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool getParam(gdsDataObject& obj, const string& pName, float& value) const
Gets a parameter from the supplied data objects. Makes sure the parameter is valid and returns false if the parameter doesn't exist, or isn't a float.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool getParam(gdsDataObject& obj, const string& pName, double& value, int max = 1) const
Gets a parameter from the supplied data objects. Makes sure the parameter is valid and returns false if the parameter doesn't exist, or isn't a float or a double.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value
max - maximum number of parameters

virtual bool getParam(gdsDataObject& obj, const string& pName, std::complex<float>& value) const
Gets a parameter from the supplied data objects. Makes sure the parameter is valid and returns false if the parameter doesn't exist, or isn't a complex float, float or a double.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool getParam(gdsDataObject& obj, const string& pName, std::complex<double>& value) const
Gets a parameter from the supplied data objects. Makes sure the parameter is valid and returns false if the parameter doesn't exist, or isn't a complex float, complex double, float or a double.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool getParam(gdsDataObject& obj, const string& pName, bool& value) const
Gets a parameter from the supplied data objects. Makes sure the parameter is valid and returns false if the parameter doesn't exist, or isn't a bool.

Returns:
true if successful
Parameters:
obj - data object
pName - name of parameter
value - parameter value

virtual bool setData(gdsDataObject& obj, const void* value, int dim1 = 0, int dim2 = 0, gdsDataType Datatype = gds_void) const
Sets the value(s) of a data object. Makes sure the data is of the correct format and with the correct dimensions.

Returns:
true if successful
Parameters:
obj - data object
value - parameter value (string encoded)
dim1 - first dimension of parameter
dim2 - second dimension of parameter
Datatype - data type (void for default)

string getType() const
Gets the object type.
Returns:
object type

objflag getFlag() const
Gets the object flag.
Returns:
object flag

typedef std::vector <diagParam> diagParamList
type for list of parameter manager classes

diagParamList dParams
list of parameter manager classes

objflag flag
object flag

string type
object type


Direct child classes:
diagSync
diagScan
diagPlot
diagMultiObject
diagIndex
diagGlobal
diagFind
diagEnv
diagDef
diagCalibration
Author:
DS, February 99
See Also:
Diagnostics storage API

alphabetic index hierarchy of classes


Please send questions and comments to sigg_d@ligo-wa.caltech.edu


generated by doc++