next up previous contents
Next: Record and Files Up: GenericNamed, and Specific Previous: Modifiers

User Data Accessors

The appropriate means to access user data in a bank is through a bank class. Specific bank classes inherit a number of utilities to access and modify user data according to the user data type by TRY_Generic_Bank in order to aid the implementation of intuitively-named accessor and modifier methods.

byte   get_BY_element(const int4 offset, const int4 index) ;
uint2  get_I2_element(const int4 offset, const int4 index) ;
int4   get_I4_element(const int4 offset, const int4 index) ;
float4 get_R4_element(const int4 offset, const int4 index) ;
float8 get_R8_element(const int4 offset, const int4 index) ;
string get_AS_string( const int4 offset, const int4 field_words) ;

bool set_BY_element(const int4 offset, const int4 index, const byte   value) ;
bool set_I2_element(const int4 offset, const int4 index, const uint2  value) ;
bool set_I4_element(const int4 offset, const int4 index, const int4   value) ;
bool set_R4_element(const int4 offset, const int4 index, const float4 value) ;
bool set_R8_element(const int4 offset, const int4 index, const float8 value) ;
bool set_AS_string( const int4 offset, const int4 field_words, const string& value) ;

These are explained in greater detail later.

In an emergency, one can access data without a specific bank class. In this case, one can use the methods n_raw_data_words() and raw_data_word() to perform ``raw'' data access. Note that if a datum is floating point, the integer would have to be carefully interpreted to get the correct floating point value. No raw user data modifers are provided. In general, these raw accessors are only intended as short-term aids for those developing new banks or new DAQ readout systems.



Robert Kennedy
Mon Jul 28 13:23:28 CDT 1997