namespace generator class DataSource

Data source base class.

Inheritance:


Public Classes

enum RepMode
Data event repetition mode
kContinuous
Continuous data source
kSingle
Generate a single event
kRate
Generate events with poisson statistics
kFixed
Generate events at fixed intervals
class SrcEvent
Data source event parameter storage class.
SrcEvent(void)
Default SrcEvent constructor
SrcEvent(const std::string& name, const std::string& comment, const Time& t0, Interval before, Interval after, const ParamMap& map)
SrcEvent data constructor
const char* getComment(void) const
Get the comment field
const char* getInputs(void) const
Get the input data
const char* getName(void) const
Get the data source name
const Time& getGPSMax(void) const
Get the GPS time of the maximum value
Interval getTimeBefore(void) const
Get the duration of the generated waveform before the maximum time
Interval getTimeAfter(void) const
Get the duration of the generated waveform after the maximum time
double getAmplitude(void) const
Get the waveform amplitude
const ParamList& getParamList(void) const
Get a list of the generated parameters

Public Methods

static DataSource* parse(const std::string& desc)
Data source factory method.
explicit DataSource(RepMode mode=kContinuous)
Default constructor
virtual ~DataSource(void)
Destroy and object
virtual DataSource* clone(void) const
Make an exact copy of a data source
virtual std::ostream& dump(std::ostream& out) const
Dump the data source status
bool isContinuous(void) const
Test if daa source is continuous
void generate(const Time& t0, Interval dt)
Generate events in a specified interval
virtual const char* getDataType(void) const
Get the data source type name
int getDebug(void) const
Get the debug level
virtual Interval getDuration(void) const
Get the length of an event
Time getLatest(void) const
Get the end of generated data.
const char* getName(void) const
Get the name of the data source
virtual double getNumeric(const std::string& name) const
Get a numeric value of the named parameter
virtual const char* getParameter(const std::string& name) const
Get a string vaue of the named parameter
double getRate(void) const
Get the average event rate
Interval getSample(void) const
Get the sample rate
virtual Interval getStartOffset(void) const
Get the offset from the generated event time to the start of the event waveform
Time getStartTime(void) const
Get the start of the already generated data
Time getTrigTime(void) const
Get the trigger time fr the current event
TSeries getTimeSeries(const Time& t0, Interval dT) const
Get the generated time series in the interval from t0 to t0+dT
const TSeries& getTimeSeries(void) const
Get the generated data time series
virtual std::string getSourceName(void) const
Get the data source name
virtual void randomize(void)
Chose the time and parameters for the next data segment
void release(const Time& t0)
Release generated data before the specified time
void setDebug(int lvl)
Set the debug level
void setName(const std::string& name)
Set the data source name
virtual void setParameter(const std::string& name, const std::string& val)
Set the specified parameter name to a string value
virtual void setParameter(const std::string& name, double value)
Set the specified parameter to a numeric value
void setSample(Interval dT)
Set the digitization sample rate
void setTriggerRate(double rate)
Set the average event rate
void setTriggerTime(const Time& t0)
Set the time for the next/only event
bool getWriteFlag(void) const
Get the write flag value
bool getSaveFlag(void) const
Get the save flag value
void setWriteFlag(bool yorn=true)
Set the write flags value
void setSaveFlag(bool yorn=true)
Set the save flag value
unsigned long getNEvent(void) const
Get the number of events stored for this input source
const SrcEvent& refEvent(void) const
Return a constant reference to the first event in the list of generated events
const SrcEvent& refEvent(unsigned long i) const
Return a constant reference to the specified (ith) event in the list of generated events
void eraseEvent(unsigned long N)
erase events

Documentation

DataSource is a base class for DMT generator package data sources. The datasource class includes an API for both continuous and discrete data sources. It also automatically records events for later inclusion in output data.
enum RepMode
Data event repetition mode

kContinuous
Continuous data source

kSingle
Generate a single event

kRate
Generate events with poisson statistics

kFixed
Generate events at fixed intervals

class SrcEvent
The SrcEvent class holds the generation parameters of each generated event. It is patterned after the FrSimEvent structure in the IGWD frame specification.

SrcEvent(void)
Default SrcEvent constructor

SrcEvent(const std::string& name, const std::string& comment, const Time& t0, Interval before, Interval after, const ParamMap& map)
SrcEvent data constructor

const char* getComment(void) const
Get the comment field

const char* getInputs(void) const
Get the input data

const char* getName(void) const
Get the data source name

const Time& getGPSMax(void) const
Get the GPS time of the maximum value

Interval getTimeBefore(void) const
Get the duration of the generated waveform before the maximum time

Interval getTimeAfter(void) const
Get the duration of the generated waveform after the maximum time

double getAmplitude(void) const
Get the waveform amplitude

const ParamList& getParamList(void) const
Get a list of the generated parameters

static DataSource* parse(const std::string& desc)
Static factory method produces data sources from a descriptor string of the form:
           <data-source>(<param-1>=<value-1>,...,<param-n>=<value-n>)
         
Returns:
Pointer to a new data source matching the description.
Parameters:
desc - Data source descriptor string.

explicit DataSource(RepMode mode=kContinuous)
Default constructor

virtual ~DataSource(void)
Destroy and object

virtual DataSource* clone(void) const
Make an exact copy of a data source

virtual std::ostream& dump(std::ostream& out) const
Dump the data source status

bool isContinuous(void) const
Test if daa source is continuous

void generate(const Time& t0, Interval dt)
Generate events in a specified interval

virtual const char* getDataType(void) const
Get the data source type name

int getDebug(void) const
Get the debug level

virtual Interval getDuration(void) const
Get the length of an event

Time getLatest(void) const
Get the earliest time not generated.

const char* getName(void) const
Get the name of the data source

virtual double getNumeric(const std::string& name) const
Get a numeric value of the named parameter

virtual const char* getParameter(const std::string& name) const
Get a string vaue of the named parameter

double getRate(void) const
Get the average event rate

Interval getSample(void) const
Get the sample rate

virtual Interval getStartOffset(void) const
Get the offset from the generated event time to the start of the event waveform. A positive offset corresponds to a signal that starts after the generated time.

Time getStartTime(void) const
Get the start of the already generated data

Time getTrigTime(void) const
Get the trigger time fr the current event

TSeries getTimeSeries(const Time& t0, Interval dT) const
Get the generated time series in the interval from t0 to t0+dT

const TSeries& getTimeSeries(void) const
Get the generated data time series

virtual std::string getSourceName(void) const
Get the data source name

virtual void randomize(void)
Chose the time and parameters for the next data segment

void release(const Time& t0)
Release generated data before the specified time
Parameters:
t0 - Time before which data will be released.

void setDebug(int lvl)
Set the debug level

void setName(const std::string& name)
Set the data source name

virtual void setParameter(const std::string& name, const std::string& val)
Set the specified parameter name to a string value

virtual void setParameter(const std::string& name, double value)
Set the specified parameter to a numeric value

void setSample(Interval dT)
Set the digitization sample rate

void setTriggerRate(double rate)
Set the average event rate

void setTriggerTime(const Time& t0)
Set the time for the next/only event

bool getWriteFlag(void) const
Get the write flag value. If true, the generate data are to be written to an output frame.

bool getSaveFlag(void) const
Get the save flag value. If true, the event parameters are to be saved for each event.

void setWriteFlag(bool yorn=true)
Set the write flags value

void setSaveFlag(bool yorn=true)
Set the save flag value

unsigned long getNEvent(void) const
Get the number of events stored for this input source. If the save flag is not set, this number will always be zero.

const SrcEvent& refEvent(void) const
Return a constant reference to the first event in the list of generated events

const SrcEvent& refEvent(unsigned long i) const
Return a constant reference to the specified (ith) event in the list of generated events

void eraseEvent(unsigned long N)
Erase the specified number of events from the vector.
Parameters:
N - Number of events to erase.


Direct child classes:
WhiteNoise
SineData
SinGauss
GaussBurst
FrameData
DampedSine
Author:
John Zweizig
Version:
1.1; last modified November 3, 2004

alphabetic index hierarchy of classes


generated by doc++