Class Index | Cross Index | Namespace Index |
Simulated data.
Contained in: FrameCPP::Version_3_4_5
Derived from:
FrameCPP::Version_3_4_5::Base
Derived by:
none
#include "../../../../../lib/framecpp/src/Version3_4_5/simdata.hh"
public function member index: |
|||
SimData | (); | Default Constructor. | |
SimData | (const SimData& simData); | Copy Constructor. | |
SimData | (const std::string& name, const std::string& comment, REAL_4 sampleRate, REAL_8 fshift, REAL_4 phase); | Constructor. | |
virtual INT_2U | getClassId | () const; | |
inline const std::string& | getComment | () const; | Comment |
inline REAL_8 | getFShift | () const; | Get the frequency shift if the signal has been heterodyned before the ADC. |
const std::string& | getName | () const; | |
inline REAL_4 | getPhase | () const; | Get phase of heterodyning signal at start of dataset. |
static SH | getSH | (); | Structure Header |
static SH | getSH3 | (); | Get frame data format version 3 Structure Header |
static SH | getSH4 | (); | Get frame data format version 4 Structure Header |
inline REAL_8 | getSampleRate | () const; | Sample Rate. |
inline bool | operator != | (const SimData& simData) const; | Not-equal comparison. |
const SimData& | operator += | (const SimData& simData); | += Operator. |
const SimData& | operator = | (const SimData& simData); | Assignment Operator. |
bool | operator == | (const SimData& simData) const; | Equal comparison. |
inline SimData::DataContainer& | refData | (); | Data Container. |
inline const SimData::DataContainer& | refData | () const; | const Data Container. |
inline SimData::InputContainer& | refInput | (); | Input Container. |
inline const SimData::InputContainer& | refInput | () const; | const Input Container. |
inline SimData::TableContainer& | refTable | (); | Table Container. |
inline const SimData::TableContainer& | refTable | () const; | const Table Container. |
private function member index: |
|||
static SimData* | read | (FrameReaderBase& in); | Reads a SimData object from an Input object. |
static SimData* | read3 | (FrameReaderBase& in); | Version 3 frame SumData read function. |
static SimData* | read4 | (FrameReaderBase& in); | Version 4 frame SumData read function. |
virtual void | write | (Output& out) const; | |
SimData possess the following attributes:
Attribute | Description |
name | Name of simulated data |
comment | Comment |
sampleRate | Data acquisistion rate, samples / sec |
fShift | Frequency shift if signal has been heterodyned before |
phase | Phase of heterodyning signal at start of data set
The SimData object is a container for two types of data:
Data | Description |
data | A container of Vect objects which contain the sampled data. |
input | A container of Vect objects holding seed MC input data for the simulation. |
table | A container of Table objects with user data. |
The data is available through the container objects inside SimData.
These are accessed via the refData
and refAux
methods.
This creates a SimData object with the following properties:
- name = "none"
- comment = ""
- sampleRate = 0.0
- fShift = 0.0
- phase = 0.0
- No other data.
Exceptions:
Exception | Description |
None. |
This performs a deep copy of all owned data.
Parameters:
Parameter | Description |
const SimData& simData | the object to copy from. |
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
Parameters:
Parameter | Description |
const std::string& name | The name for the simulated data. |
const std::string& comment | A comment. |
REAL_4 sampleRate | The sample rate (samples/sec). |
const REAL_8& fShift | Frequency shift. |
const REAL_4& phase | Phase. |
Exceptions:
Exception | Description |
None. |
Exceptions:
Exception | Description |
None. |
Get the comment.
Return value:
const std::string&- Comment.
Exceptions:
Exception | Description |
None. | |
None. |
fShift = (f_heterodyne - fNyquist@sampleRate).
Return value:
REAL_8- Frequency shift.
Exceptions:
Exception | Description |
None. | |
None. |
Return value:
REAL_4- phase.
Exceptions:
Exception | Description |
None. | |
None. |
Constructs the Structure Header for this class.
Return value:
SH- SimData structure header.
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
Get the simulated data sample rate. The rate is in samples / sec.
Return value:
REAL_8- Sample rate.
Exceptions:
Exception | Description |
None. | |
None. |
Parameters:
Parameter | Description |
const SimData& simData | The object to compare with. |
Return value:
bool- True if the objects are not equal.
Exceptions:
Exception | Description |
None. | |
None. |
Parameters:
Parameter | Description |
const SimData& simData | The object to be added. |
Return value:
const SimData&- This object.
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
This performs a deep copy of all owned data.
Parameters:
Parameter | Description |
const SimData& simData | The object to assign from. |
Return value:
const SimData&- This object.
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
Determines whether two SimData objects are equal. For this comparison, all of the data is compared.
Parameters:
Parameter | Description |
const SimData& simData | The object to compare with. |
Return value:
bool- true if the objects are equal.
Exceptions:
Exception | Description |
None. |
This method creates a dynamically allocated object.*NOTE* This method allocates memory and returns a pointer to it. The user is responsible for freeing this memory.
Parameters:
Parameter | Description |
FrameReaderBase& in | Input data stream object. |
Return value:
SimData*- Newly created SimData object.
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
read_failure | Read failure occured. |
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
read_failure | Read failure occured. |
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
read_failure | Read failure occured. |
Get the container which contains the data.
Return value:
SearchContainer< Vect, &Vect::getName >&- Data container.
Exceptions:
Exception | Description |
None. | |
None. |
Get the container which contains the data.
Return value:
const SearchContainer< Vect, &Vect::getName >&- Data container.
Exceptions:
Exception | Description |
None. | |
None. |
Get the container for seed MC input data for the simulation.
Return value:
Container< Vect >&- Data Container.
Exceptions:
Exception | Description |
None. | |
None. |
Get the container for seed MC input data for the simulation.
Return value:
const Container< Vect >&- Data container.
Exceptions:
Exception | Description |
None. | |
None. |
Get table container.
Return value:
Container< Table >&- Table container.
Exceptions:
Exception | Description |
None. | |
None. |
Get table container.
Return value:
const Container< Vect >&- Table container.
Exceptions:
Exception | Description |
None. | |
None. |
Writes a SimData object to an Output object.
Parameters:
Parameter | Description |
Output& out out | Output data stream object. |
Exceptions:
Exception | Description |
write_failure | Data write failed. |