NSCL DDAS  12.1-001
Support for XIA DDAS at FRIB
Public Member Functions | List of all members
CDataGenerator Class Reference

A class to generate test pulse, run, and baseline data for offline operation of QtScope. More...

#include <CDataGenerator.h>

Public Member Functions

 CDataGenerator ()
 Constructor. More...
 
int GetTraceData (unsigned short *data, int dataSize, double binWidth)
 Generate test trace data. More...
 
int GetHistogramData (unsigned int *data, int dataSize)
 Generate test Gaussian-distributed data. More...
 
int GetBaselineData (double *data, int dataSize)
 Generate randomly distributed test baseline data. More...
 

Detailed Description

A class to generate test pulse, run, and baseline data for offline operation of QtScope.

Constructor & Destructor Documentation

◆ CDataGenerator()

CDataGenerator::CDataGenerator ( )
inline

Constructor.

Member Function Documentation

◆ GetBaselineData()

int CDataGenerator::GetBaselineData ( double *  data,
int  dataSize 
)

Generate randomly distributed test baseline data.

Parameters
[in,out]dataPointer to the start of the baseline data storarge.
[in]dataSizeHow many data points to store.
Returns
int
Return values
0Success.

Params are a pointer to the start of the data storage and a size, as is done in the XIA API for easier integration/consistency.

◆ GetHistogramData()

int CDataGenerator::GetHistogramData ( unsigned int *  data,
int  dataSize 
)

Generate test Gaussian-distributed data.

Parameters
[in,out]dataPointer to the start of the baseline data storage.
[in]dataSizeHow many data points to store.
Returns
0 (always).

Params are a pointer to the start of the data storage and a size, as is done in the XIA API for easier integration/consistency. Data is stored as a histogram, default binning 1 ADC unit per bin.

◆ GetTraceData()

int CDataGenerator::GetTraceData ( unsigned short *  data,
int  dataSize,
double  binWidth 
)

Generate test trace data.

Parameters
[in,out]dataPointer to the start of the trace data storage.
[in]dataSizeHow many data points to store.
[in]binWidthHistogram bin width in microseconds.
Returns
int
Return values
0Success.

Params are a pointer to the start of the data storage and a size, as is done in the XIA API for easier integration/consistency.


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