class rtddChannel : public rtddCallback Class for channel input from the rtdd.
| | preprocessing Data preprocessing.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | partition Data partition.
|
| | partitionlist list of partitions |
| | preprocessinglist list of preprocessing objects |
| | rtddChannel (string Chnname, gdsStorage& dat, int dataRate, int dataType) Constructor. |
| | rtddChannel (const rtddChannel& chn) Copy constructor. |
| | ~rtddChannel () Destructor. |
| | operator= (const rtddChannel& chn) Copy operator. |
| | addPreprocessing (int Decimate1 = 1, int Decimate2 = 1, tainsec_t Zoomstart = 0, double Zoomfreq = 0, bool rmvDelay = true, bool useActiveTime = false, tainsec_t Start = -1, tainsec_t Stop = -1) Add preprocessing stage. |
| | addPartitions (const partitionlist& newPartitions, bool useActiveTime = false) Add partitions. |
| | reset () Reset function. |
| | skip (tainsec_t stop) Skip function. |
| | timeStamp () const Time stamp method. |
| | maxDelay () const Time delay method. |
| | callback (taisec_t time, int epoch, float data[], int ndata, int err) Callback method. |
| | updateStorage (bool async = false) Update storage object with finished partitions. |
| | datarate channel data rate |
| | datatype channel data type |
| | databps channel data type: bytes per sample |
| | storage pointer to storage object |
| | partitions list of partitions |
| | preprocessors list of preprocessing stages |
| | timestamp time stamp of most recent data |
| | inUse counts how many times channel is in use |
| | isTP true if channel is a test point |
Class for reading channel data from the real-time data distribution system. This class will receive data from the RTDD system through the callback mechanism. It implements the following prepropressing options: a first decimation stage, a down-conversion, a second decimation stage and automatic partition of data. Incoming data is buffered in a partition if of the right time frame. If a partition is complete it is automatically handed over to the diagnostics storage object. Partitions can have unique names, meaning a new data object is added for each partition, or they can have a name which was previously used, meaning the data is added to the data object of same name.
typedef std::vector <preprocessing> preprocessinglist
class preprocessing
explicit preprocessing(int dataRate, int Decimate1 = 1, int Decimate2 = 1, tainsec_t Zoomstart = 0, double Zoomfreq = 0, bool rmvDelay = true)
Decimate1 - first decimation rate (power of 2)
Decimate2 - second decimation rate (power of 2)
Zoomstart - time zero for down-conversion
Zoomfreq - down-conversion frequency
rmvDelay - remove decimation delay
preprocessing(const preprocessing& p)
preprocessing& operator= (const preprocessing& p)
~preprocessing()
bool operator== (const preprocessing& pre) const
void setActiveTime(tainsec_t Start, tainsec_t Stop, bool obey = false, bool newValues = false)
Stop - time when preprocessing can stop delivering data
obey - if true active time will actually be used
newValues - when false the min/max is calculated
bool operator) (taisec_t time, int epoch, float data[], int ndata, int err, partitionlist& partitions, mutex& mux, bool& update)
epoch - epoch of first data point
data - array of data points
ndata - number of data points
err - error code indicating invalid or missing data
partitions - list of partitions
mux - channel mutex
update - indicates if partition list needs to be updated
bool process(taisec_t time, int epoch, float data[], int ndata, int err, partitionlist& partitions, mutex& mux, bool& update)
epoch - epoch of first data point
data - array of data points
ndata - number of data points
err - error code indicating invalid or missing data
partitions - list of partitions
mux - channel mutex
update - indicates if partition list needs to be updated
int datarate
int decimate1
int decimate2
tainsec_t zoomstart
double zoomfreq
double dt[3]
bool removeDelay
double decdelay
int delaytaps
tainsec_t delayshift
tainsec_t delay1
bool useActiveTime
tainsec_t start
tainsec_t stop
class partition
partition(string Name, tainsec_t Start, tainsec_t Duration, double Dt = 1.0, tainsec_t tp = 0)
Start - beginning of partition (nsec)
Duration - length of partition (nsec)
Dt - spacing of data points
tp - precursor time
partition(const partition& p)
void setup(double Dt, int Decimate1 = 1, int Decimate2 = 1, tainsec_t Zoomstart = 0, double Zoomfreq = 0, bool rmvDelay = true)
Decimate1 - first decimation rate (power of 2)
Decimate2 - second decimation rate (power of 2)
Zoomstart - time zero for down-conversion
Zoomfreq - down-conversion frequency
rmvDelay - remove decimation filter delay
void fill(const float data[], int len, int bufnum = 0)
len - number of data points
bufnum - buffer ID (0 = in-phase; 1 = quad-phase)
void copy(float data[], int max, bool cmplx = false)
len - maximum number of data points
cmplx - true if down-converted time series
int index(tainsec_t Start, int Length) const
Length - number of data points in time series
int range(tainsec_t Start, int Length) const
Length - number of data points in time series
void nomore()
bool isFull() const
bool isDone() const
bool operator< (const partition& p) const
string name
tainsec_t start
tainsec_t duration
tainsec_t precursor
double dt
int length
std::vector <float> buf[2]
int decimate1
int decimate2
tainsec_t zoomstart
double zoomfreq
bool removeDelay
double decdelay
int delaytaps
rtddChannel(string Chnname, gdsStorage& dat, int dataRate, int dataType)
dat - storage object for storing partition data
dataRate - data rate in Hz
dataType - data type as defined by the nds
rtddChannel(const rtddChannel& chn)
virtual ~rtddChannel()
rtddChannel& operator= (const rtddChannel& chn)
bool addPreprocessing(int Decimate1 = 1, int Decimate2 = 1, tainsec_t Zoomstart = 0, double Zoomfreq = 0, bool rmvDelay = true, bool useActiveTime = false, tainsec_t Start = -1, tainsec_t Stop = -1)
Decimate2 - second decimation rate (power of 2)
Zoomstart - time zero for down-conversion
Zoomfreq - down-conversion frequency
rmvDelay - remove decimation filter delay
useActiveTime - if true active time will be used
Start - time when preprocessing must deliver first data
Stop - time when preprocessing can stop delivering data
bool addPartitions(const partitionlist& newPartitions, bool useActiveTime = false)
useActiveTime - if true active time will be used
void reset()
void skip(tainsec_t stop)
tainsec_t timeStamp() const
tainsec_t maxDelay() const
virtual int callback(taisec_t time, int epoch, float data[], int ndata, int err)
epoch - epoch of first data point
data - array of data points
ndata - number of data points
err - error code indicating invalid or missing data
virtual void updateStorage(bool async = false)
int datarate
int datatype
int databps
gdsStorage* storage
partitionlist partitions
preprocessinglist preprocessors
tainsec_t timestamp
alphabetic index hierarchy of classes
Please send questions and comments to sigg_d@ligo-wa.caltech.edu
generated by doc++