casa
5.7.0-16
|
A general class to write MIME messages containing ALMA binary data. More...
#include <SDMDataObjectWriter.h>
Public Member Functions | |
SDMDataObjectWriter (const std::string &uid="uid://X0/X0/X0", const std::string &title="ALMA Binary Data") | |
A constructor to write on standard output. More... | |
SDMDataObjectWriter (std::ofstream *ofs, const std::string &uid="uid://X0/X0/X0", const std::string &title="ALMA Binary Data") | |
A constructor to write in a file. More... | |
SDMDataObjectWriter (std::ostringstream *oss, const std::string &uid="uid://X0/X0/X0", const std::string &title="ALMA Binary Data") | |
A constructor to write in memory. More... | |
virtual | ~SDMDataObjectWriter () |
The destructor. More... | |
void | done () |
This method must be called to conclude the activity of this SDMDataObjectWriter. More... | |
void | tpData (uint64_t startTime, const std::string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numOfIntegrations, uint32_t numAntenna, const std::vector< SDMDataObject::Baseband > &basebands, uint64_t time, uint64_t interval, const std::vector< AxisNameMod::AxisName > &flagsAxes, const std::vector< FLAGSTYPE > &flags, const std::vector< AxisNameMod::AxisName > &actualTimesAxes, const std::vector< ACTUALTIMESTYPE > &actualTimes, const std::vector< AxisNameMod::AxisName > &actualDurationsAxes, const std::vector< ACTUALDURATIONSTYPE > &actualDurations, const std::vector< AxisNameMod::AxisName > &autoDataAxes, const std::vector< AUTODATATYPE > &autoData) |
Writes the full content of Total Power data in their respective attachments (global XML header, local XML header and binary attachments) on the MIME message stream. More... | |
void | tpData (uint64_t startTime, const std::string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numOfIntegrations, uint32_t numAntenna, const std::vector< SDMDataObject::Baseband > &basebands, uint64_t time, uint64_t interval, const std::vector< AxisNameMod::AxisName > &autoDataAxes, const std::vector< AUTODATATYPE > &autoData) |
Writes the full content of Total Power data in their respective attachments (global XML header, local XML header and binary attachments) on the MIME message stream. More... | |
void | tpDataHeader (uint64_t startTime, const std::string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numAntenna, SDMDataObject::DataStruct &dataStruct) |
Writes the XML global header on the MIME message stream, when binary data are Total Power data and will be written in successive steps with calls to tpAddIntegration. More... | |
void | tpAddIntegration (uint32_t integrationNum, uint64_t time, uint64_t interval, const std::vector< FLAGSTYPE > &flags, const std::vector< ACTUALTIMESTYPE > &actualTimes, const std::vector< ACTUALDURATIONSTYPE > &actualDurations, const std::vector< AUTODATATYPE > &autoData) |
Writes one integration (local header + binary attachment) of total power data on the MIME message stream. More... | |
void | wvrData (const std::string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numTimes, uint32_t numAntennas, uint32_t numChannels, NetSidebandMod::NetSideband netSideband, uint64_t time, uint64_t interval, const std::vector< AUTODATATYPE > &wvrData, const std::vector< FLAGSTYPE > &flags) |
Writes water vapour radiometer (WVR) data in a MIME message conform with the BDF V2 format. More... | |
void | corrDataHeader (uint64_t startime, const std::string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numAntenna, CorrelationModeMod::CorrelationMode correlationMode, const OptionalSpectralResolutionType &spectralResolutionType, SDMDataObject::DataStruct &dataStruct) |
Writes the XML global header on the MIME message stream, when binary data are (sub)integrations produced by the correlator. More... | |
void | addIntegration (uint32_t integrationNum, uint64_t time, uint64_t interval, const std::vector< FLAGSTYPE > &flags, const std::vector< ACTUALTIMESTYPE > &actualTimes, const std::vector< ACTUALDURATIONSTYPE > &actualDurations, const std::vector< ZEROLAGSTYPE > &zeroLags, const std::vector< INTCROSSDATATYPE > &crossData, const std::vector< AUTODATATYPE > &autoData) |
Writes one integration (local header + binary attachment) of correlator data on the MIME message stream. More... | |
void | addIntegration (uint32_t integrationNum, uint64_t time, uint64_t interval, const std::vector< FLAGSTYPE > &flags, const std::vector< ACTUALTIMESTYPE > &actualTimes, const std::vector< ACTUALDURATIONSTYPE > &actualDurations, const std::vector< ZEROLAGSTYPE > &zeroLags, const std::vector< SHORTCROSSDATATYPE > &crossData, const std::vector< AUTODATATYPE > &autoData) |
Writes an integration (local header + binary attachment) on the MIME message stream. More... | |
void | addIntegration (uint32_t integrationNum, uint64_t time, uint64_t interval, const std::vector< FLAGSTYPE > &flags, const std::vector< ACTUALTIMESTYPE > &actualTimes, const std::vector< ACTUALDURATIONSTYPE > &actualDurations, const std::vector< ZEROLAGSTYPE > &zeroLags, const std::vector< FLOATCROSSDATATYPE > &crossData, const std::vector< AUTODATATYPE > &autoData) |
Writes an integration (local header + binary attachment) on the MIME message stream. More... | |
void | addSubintegration (uint32_t integrationNum, uint32_t subintegrationNum, uint64_t time, uint64_t interval, const std::vector< FLAGSTYPE > &flags, const std::vector< ACTUALTIMESTYPE > &actualTimes, const std::vector< ACTUALDURATIONSTYPE > &actualDurations, const std::vector< ZEROLAGSTYPE > &zeroLags, const std::vector< INTCROSSDATATYPE > &crossData, const std::vector< AUTODATATYPE > &autoData) |
Writes an subintegration (local header + binary attachment) on the MIME message stream. More... | |
void | addSubintegration (uint32_t integrationNum, uint32_t subintegrationNum, uint64_t time, uint64_t interval, const std::vector< FLAGSTYPE > &flags, const std::vector< ACTUALTIMESTYPE > &actualTimes, const std::vector< ACTUALDURATIONSTYPE > &actualDurations, const std::vector< ZEROLAGSTYPE > &zeroLags, const std::vector< SHORTCROSSDATATYPE > &crossData, const std::vector< AUTODATATYPE > &autoData) |
Writes an subintegration (local header + binary attachment) on the MIME message stream. More... | |
void | addSubintegration (uint32_t integrationNum, uint32_t subintegrationNum, uint64_t time, uint64_t interval, const std::vector< FLAGSTYPE > &flags, const std::vector< ACTUALTIMESTYPE > &actualTimes, const std::vector< ACTUALDURATIONSTYPE > &actualDurations, const std::vector< ZEROLAGSTYPE > &zeroLags, const std::vector< FLOATCROSSDATATYPE > &crossData, const std::vector< AUTODATATYPE > &autoData) |
Writes an subintegration (local header + binary attachment) on the MIME message stream. More... | |
uint64_t | numBytes () |
Returns the number of bytes written so far. More... | |
void | output (const std::string &s) |
void | outputln (const std::string &s) |
void | output (const float *data, uint32_t numData) |
void | outputln (const float *data, uint32_t numData) |
void | outputln (const long long *data, uint32_t numData) |
template<class T > | |
void | output (const std::vector< T > &data) |
template<class T > | |
void | outputln (const std::vector< T > &data) |
void | outputln () |
void | outputlnLocation (const std::string &name, const SDMDataSubset &sdmDataSubset) |
Private Types | |
enum | OUTDEST { STDOUT, MEMORY, FILE } |
enum | States { START, S_TPDATA, S_TPDATAHEADER, S_ADDTPSUBSCAN, S_ADDTPINTEGRATION, S_WVRDATA, S_CORRDATAHEADER, S_ADDINTEGRATION, S_ADDSUBINTEGRATION, END } |
A small finite state automaton to control the usage of SDMDataObjectWriter. More... | |
enum | Transitions { T_TPDATA, T_TPDATAHEADER, T_ADDTPSUBSCAN, T_ADDTPINTEGRATION, T_WVRDATA, T_CORRDATAHEADER, T_ADDINTEGRATION, T_ADDSUBINTEGRATION, T_DONE } |
Private Member Functions | |
void | preamble () |
Writes the very first part of the MIME message. More... | |
void | postamble () |
Write the very end of the MIME message. More... | |
void | addData (uint32_t integrationNum, uint32_t subintegrationNum, uint64_t time, uint64_t interval, const std::vector< FLAGSTYPE > &flags, const std::vector< ACTUALTIMESTYPE > &actualTimes, const std::vector< ACTUALDURATIONSTYPE > &actualDurations, const std::vector< ZEROLAGSTYPE > &zeroLags, const std::vector< INTCROSSDATATYPE > &intCrossData, const std::vector< SHORTCROSSDATATYPE > &shortCrossData, const std::vector< FLOATCROSSDATATYPE > &floatCrossData, const std::vector< AUTODATATYPE > &autoData) |
void | checkState (Transitions t, const std::string &methodName) |
Static Private Member Functions | |
static bool | initClass () |
template<class Enum , class EnumHelper > | |
static std::vector< Enum > | enumvec (const std::string &strliterals) |
A utility to fill a vector of <Enum> from a an array of c-strings. More... | |
Private Attributes | |
OUTDEST | otype_ |
std::ofstream * | ofs_ |
std::ostringstream * | oss_ |
std::string | uid_ |
The ALMA uid of the MIME message. More... | |
std::string | title_ |
The title of the binary data. More... | |
std::string | subscanPath_ |
The subscan path. More... | |
SDMDataObject | sdmDataObject_ |
An SDMDataObject. More... | |
uint32_t | sdmDataSubsetNum_ |
The number of the SDMDataSubset being written. More... | |
bool | done_ |
Are we done with this ? More... | |
uint64_t | numBytes_ |
The number of bytes written so far. More... | |
States | currentState_ |
Static Private Attributes | |
static const std::string | MIMEBOUNDARY_1 |
Two strings used as MIME boundaries. More... | |
static const std::string | MIMEBOUNDARY_2 |
static const bool | initClass_ |
Class initialization stuff. More... | |
static std::vector < AxisNameMod::AxisName > | WVRDATAAXES |
The axes names definitions for WVR data and their related flags. More... | |
static std::vector < AxisNameMod::AxisName > | WVRDATAFLAGSAXES |
A general class to write MIME messages containing ALMA binary data.
An instance of this class can be used to write :
The MIME message is written on standard output, a disk file or a char buffer depending on the constructor used to create an instance of SDMDataObjectWriter.
Whatever is the type of binary data (total power, WVR, integration, subintegration) to write, the following scheme must be respected when using an SDMDataObjectWriter.
Example:
Example of a MIME message output in an ostringstream :
We detail now the different valid sequences for writing binary data depending on their kind.
One may also consider to use in that order the methods tpDataHeader and addTPSubscan.
One single call to the wvrData() method.
One single call to corrDataHeader() followed by one or more calls to addIntegration().
One single call to corrDataHeader() followed by one or more calls to addSubintegration().
The table below summarizes the valid call sequences when using an SDMDataObjectWriter. Any deviation from these rules will result in an SDMDataObjectWriterException thrown.
Total Power data | WVR data | Integration | subIntegration |
---|---|---|---|
ctor, tpData, done | ctor, wvrData, done | ctor, corrDataHeader, addIntegration (one or more times), done | ctor, corrDataHeader, addSubintegration (one or more times), done |
ctor, tpDataHeader, addTPSubscan, done |
Definition at line 266 of file SDMDataObjectWriter.h.
|
private |
Enumerator | |
---|---|
STDOUT | |
MEMORY | |
FILE |
Definition at line 797 of file SDMDataObjectWriter.h.
|
private |
A small finite state automaton to control the usage of SDMDataObjectWriter.
Enumerator | |
---|---|
START | |
S_TPDATA | |
S_TPDATAHEADER | |
S_ADDTPSUBSCAN | |
S_ADDTPINTEGRATION | |
S_WVRDATA | |
S_CORRDATAHEADER | |
S_ADDINTEGRATION | |
S_ADDSUBINTEGRATION | |
END |
Definition at line 871 of file SDMDataObjectWriter.h.
|
private |
Enumerator | |
---|---|
T_TPDATA | |
T_TPDATAHEADER | |
T_ADDTPSUBSCAN | |
T_ADDTPINTEGRATION | |
T_WVRDATA | |
T_CORRDATAHEADER | |
T_ADDINTEGRATION | |
T_ADDSUBINTEGRATION | |
T_DONE |
Definition at line 872 of file SDMDataObjectWriter.h.
asdmbinaries::SDMDataObjectWriter::SDMDataObjectWriter | ( | const std::string & | uid = "uid://X0/X0/X0" , |
const std::string & | title = "ALMA Binary Data" |
||
) |
A constructor to write on standard output.
The MIME message will be written to the standard output.
uid | a string containing the ALMA uid of the MIME message. |
title | a string defining the title for the binary data to be written. |
asdmbinaries::SDMDataObjectWriter::SDMDataObjectWriter | ( | std::ofstream * | ofs, |
const std::string & | uid = "uid://X0/X0/X0" , |
||
const std::string & | title = "ALMA Binary Data" |
||
) |
A constructor to write in a file.
The MIME message will be written into the file attached to the ofstream argument.
ofs | an pointer to an ofstream object. |
uid | a string containing the ALMA uid of the MIME message. |
title | a string defining the title for the binary data to be written. |
asdmbinaries::SDMDataObjectWriter::SDMDataObjectWriter | ( | std::ostringstream * | oss, |
const std::string & | uid = "uid://X0/X0/X0" , |
||
const std::string & | title = "ALMA Binary Data" |
||
) |
A constructor to write in memory.
The MIME message will be written in an ostringstream.
oss | a pointer to an ostringstream. |
uid | a string containing the ALMA uid of the MIME message. |
title | a string defining the title for the binary data to be written. |
|
virtual |
The destructor.
|
private |
void asdmbinaries::SDMDataObjectWriter::addIntegration | ( | uint32_t | integrationNum, |
uint64_t | time, | ||
uint64_t | interval, | ||
const std::vector< FLAGSTYPE > & | flags, | ||
const std::vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const std::vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const std::vector< ZEROLAGSTYPE > & | zeroLags, | ||
const std::vector< INTCROSSDATATYPE > & | crossData, | ||
const std::vector< AUTODATATYPE > & | autoData | ||
) |
Writes one integration (local header + binary attachment) of correlator data on the MIME message stream.
integrationNum | the index (1 based) of the integration. |
time | time of the integration. |
interval | interval of the integration. |
flags | the values of flags. |
actualTimes | the values of actualTimes. |
actualDurations | the values of actualDurations. |
zeroLags | the values of zeroLags. |
crossData | the values of crossData (encoded in int). |
autoData | the values of autoData. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::addIntegration | ( | uint32_t | integrationNum, |
uint64_t | time, | ||
uint64_t | interval, | ||
const std::vector< FLAGSTYPE > & | flags, | ||
const std::vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const std::vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const std::vector< ZEROLAGSTYPE > & | zeroLags, | ||
const std::vector< SHORTCROSSDATATYPE > & | crossData, | ||
const std::vector< AUTODATATYPE > & | autoData | ||
) |
Writes an integration (local header + binary attachment) on the MIME message stream.
integrationNum | the index (1 based) of the integration. |
time | time of the integration. |
interval | interval of the integration. |
flags | the values of flags. |
actualTimes | the values of actualTimes. |
actualDurations | the values of actualDurations. |
zeroLags | the values of zeroLags. |
crossData | the values of crossData (encoded in short). |
autoData | the values of autoData. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::addIntegration | ( | uint32_t | integrationNum, |
uint64_t | time, | ||
uint64_t | interval, | ||
const std::vector< FLAGSTYPE > & | flags, | ||
const std::vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const std::vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const std::vector< ZEROLAGSTYPE > & | zeroLags, | ||
const std::vector< FLOATCROSSDATATYPE > & | crossData, | ||
const std::vector< AUTODATATYPE > & | autoData | ||
) |
Writes an integration (local header + binary attachment) on the MIME message stream.
integrationNum | the index (1 based) of the integration. |
time | time of the integration. |
interval | interval of the integration. |
flags | the values of flags. |
actualTimes | the values of actualTimes. |
actualDurations | the values of actualDurations. |
zeroLags | the values of zeroLags. |
crossData | the values of crossData (encoded in float). |
autoData | the values of autoData. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::addSubintegration | ( | uint32_t | integrationNum, |
uint32_t | subintegrationNum, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const std::vector< FLAGSTYPE > & | flags, | ||
const std::vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const std::vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const std::vector< ZEROLAGSTYPE > & | zeroLags, | ||
const std::vector< INTCROSSDATATYPE > & | crossData, | ||
const std::vector< AUTODATATYPE > & | autoData | ||
) |
Writes an subintegration (local header + binary attachment) on the MIME message stream.
integrationNum | the index (1 based) of the integration. |
subintegrationNum | the index(1 based) of the subintegration. |
time | time of the integration. |
interval | interval of the integration. |
flags | the values of flags. |
actualTimes | the values of actualTimes. |
actualDurations | the values of actualDurations. |
zeroLags | the values of zeroLags. |
crossData | the values of crossData (encoded in int). |
autoData | the values of autoData. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::addSubintegration | ( | uint32_t | integrationNum, |
uint32_t | subintegrationNum, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const std::vector< FLAGSTYPE > & | flags, | ||
const std::vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const std::vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const std::vector< ZEROLAGSTYPE > & | zeroLags, | ||
const std::vector< SHORTCROSSDATATYPE > & | crossData, | ||
const std::vector< AUTODATATYPE > & | autoData | ||
) |
Writes an subintegration (local header + binary attachment) on the MIME message stream.
integrationNum | the index (1 based) of the integration. |
subintegrationNum | the index(1 based) of the subintegration. |
time | time of the integration. |
interval | interval of the integration. |
flags | the values of flags. |
actualTimes | the values of actualTimes. |
actualDurations | the values of actualDurations. |
zeroLags | the values of zeroLags. |
crossData | the values of crossData (encoded in short). |
autoData | the values of autoData. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::addSubintegration | ( | uint32_t | integrationNum, |
uint32_t | subintegrationNum, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const std::vector< FLAGSTYPE > & | flags, | ||
const std::vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const std::vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const std::vector< ZEROLAGSTYPE > & | zeroLags, | ||
const std::vector< FLOATCROSSDATATYPE > & | crossData, | ||
const std::vector< AUTODATATYPE > & | autoData | ||
) |
Writes an subintegration (local header + binary attachment) on the MIME message stream.
integrationNum | the index (1 based) of the integration. |
subintegrationNum | the index(1 based) of the subintegration. |
time | time of the integration. |
interval | interval of the integration. |
flags | the values of flags. |
actualTimes | the values of actualTimes. |
actualDurations | the values of actualDurations. |
zeroLags | the values of zeroLags. |
crossData | the values of crossData (encoded in float). |
autoData | the values of autoData. |
SDMDataObjectWriterException |
|
private |
void asdmbinaries::SDMDataObjectWriter::corrDataHeader | ( | uint64_t | startime, |
const std::string & | execBlockUID, | ||
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numAntenna, | ||
CorrelationModeMod::CorrelationMode | correlationMode, | ||
const OptionalSpectralResolutionType & | spectralResolutionType, | ||
SDMDataObject::DataStruct & | dataStruct | ||
) |
Writes the XML global header on the MIME message stream, when binary data are (sub)integrations produced by the correlator.
startime | start time. |
execBlockUID | the UID of the exec block. |
execBlockNum | the index of the exec block. |
scanNum | the index of the scan. |
subscanNum | the index of the subscan. |
numAntenna | the number of antenna. |
correlationMode | the correlation mode code. |
spectralResolution | the spectral resolution code. |
dataStruct | the description of the binary data structure. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::done | ( | ) |
This method must be called to conclude the activity of this SDMDataObjectWriter.
It completes the MIME message.
|
inlinestaticprivate |
A utility to fill a vector of <Enum> from a an array of c-strings.
Definition at line 830 of file SDMDataObjectWriter.h.
|
staticprivate |
uint64_t asdmbinaries::SDMDataObjectWriter::numBytes | ( | ) |
Returns the number of bytes written so far.
This method can be used at any time during the life of an instance of SDMDataObjectWriter. It returns the number of bytes emitted on the output (memory, standard output, disk file...) as the methods of this class, except done, are called.
void asdmbinaries::SDMDataObjectWriter::output | ( | const std::string & | s | ) |
void asdmbinaries::SDMDataObjectWriter::output | ( | const float * | data, |
uint32_t | numData | ||
) |
|
inline |
void asdmbinaries::SDMDataObjectWriter::outputln | ( | const std::string & | s | ) |
void asdmbinaries::SDMDataObjectWriter::outputln | ( | const float * | data, |
uint32_t | numData | ||
) |
void asdmbinaries::SDMDataObjectWriter::outputln | ( | const long long * | data, |
uint32_t | numData | ||
) |
|
inline |
Definition at line 787 of file SDMDataObjectWriter.h.
References casa::data, and outputln().
void asdmbinaries::SDMDataObjectWriter::outputln | ( | ) |
Referenced by outputln().
void asdmbinaries::SDMDataObjectWriter::outputlnLocation | ( | const std::string & | name, |
const SDMDataSubset & | sdmDataSubset | ||
) |
|
private |
Write the very end of the MIME message.
|
private |
Writes the very first part of the MIME message.
void asdmbinaries::SDMDataObjectWriter::tpAddIntegration | ( | uint32_t | integrationNum, |
uint64_t | time, | ||
uint64_t | interval, | ||
const std::vector< FLAGSTYPE > & | flags, | ||
const std::vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const std::vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const std::vector< AUTODATATYPE > & | autoData | ||
) |
Writes one integration (local header + binary attachment) of total power data on the MIME message stream.
integrationNum | the index (1 based) of the integration. |
time | time of the integration. |
interval | interval of the integration. |
flags | the values of flags. |
actualTimes | the values of actualTimes. |
actualDurations | the values of actualDurations. |
autoData | the values of autoData. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::tpData | ( | uint64_t | startTime, |
const std::string & | execBlockUID, | ||
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numOfIntegrations, | ||
uint32_t | numAntenna, | ||
const std::vector< SDMDataObject::Baseband > & | basebands, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const std::vector< AxisNameMod::AxisName > & | flagsAxes, | ||
const std::vector< FLAGSTYPE > & | flags, | ||
const std::vector< AxisNameMod::AxisName > & | actualTimesAxes, | ||
const std::vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const std::vector< AxisNameMod::AxisName > & | actualDurationsAxes, | ||
const std::vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const std::vector< AxisNameMod::AxisName > & | autoDataAxes, | ||
const std::vector< AUTODATATYPE > & | autoData | ||
) |
Writes the full content of Total Power data in their respective attachments (global XML header, local XML header and binary attachments) on the MIME message stream.
startTime | start time. |
execBlockUID | the UID of the exec block. |
execBlockNum | the index of the exec block. |
scanNum | the index of the scan. |
subscanNum | the index of the subscan. |
numOfIntegrations | the number of integrations in that Subscan. |
numAntenna | the number of antenna. |
basebands | a vector of Baseband describing the structure of the binary data. |
time. | |
interval. | |
flags | the values of flags (see note). |
actualTimes | the values of actualTimes (see note). |
actualDurations | the values of actualDurations (see note). |
autoDataAxes | the ordered set of axes names for autoData. |
autoData | the values of autoData. |
autoDataNormalized |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::tpData | ( | uint64_t | startTime, |
const std::string & | execBlockUID, | ||
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numOfIntegrations, | ||
uint32_t | numAntenna, | ||
const std::vector< SDMDataObject::Baseband > & | basebands, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const std::vector< AxisNameMod::AxisName > & | autoDataAxes, | ||
const std::vector< AUTODATATYPE > & | autoData | ||
) |
Writes the full content of Total Power data in their respective attachments (global XML header, local XML header and binary attachments) on the MIME message stream.
startTime | start time. |
execBlockUID | the UID of the exec block. |
execBlockNum | the index of the exec block. |
scanNum | the index of the scan. |
subscanNum | the index of the subscan. |
numOfIntegrations | the number of integrations in that Subscan. |
numAntenna | the number of antenna. |
basebands | a vector of Baseband describing the structure of the binary data. |
time | |
interval | |
autoDataAxes | the ordered set of axes names for autoData. |
autoData | the values of autoData. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::tpDataHeader | ( | uint64_t | startTime, |
const std::string & | execBlockUID, | ||
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numAntenna, | ||
SDMDataObject::DataStruct & | dataStruct | ||
) |
Writes the XML global header on the MIME message stream, when binary data are Total Power data and will be written in successive steps with calls to tpAddIntegration.
startime | start time. |
execBlockUID | the UID of the exec block. |
execBlockNum | the index of the exec block. |
scanNum | the index of the scan. |
subscanNum | the index of the subscan. |
numAntenna | the number of antenna. |
dataStruct | the description of the binary data structure. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::wvrData | ( | const std::string & | execBlockUID, |
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numTimes, | ||
uint32_t | numAntennas, | ||
uint32_t | numChannels, | ||
NetSidebandMod::NetSideband | netSideband, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const std::vector< AUTODATATYPE > & | wvrData, | ||
const std::vector< FLAGSTYPE > & | flags | ||
) |
Writes water vapour radiometer (WVR) data in a MIME message conform with the BDF V2 format.
execBlockUID | the archive uid of the exec Block, |
execBlockNum | the index of the exec Block, |
scanNum | the number of the scan, |
subscanNum | the number of the subscan, |
numTimes | the number of time stamps (i.e. size along the TIM axis), |
numAntennas | the number of antennas producing WVR data, |
numChannels | the number of channels in WVR data, |
netSideband | the NetSideband characteristic attached to WVR data, |
time | the mid-point of the time range containing all the WVR data, |
interval | the duration of the time range containing all the WVR data, |
wvrData | the WVR data, |
flags | the flags associated to the WVR data. |
SDMDataObjectWriterException |
|
private |
Definition at line 873 of file SDMDataObjectWriter.h.
|
private |
Are we done with this ?
Definition at line 864 of file SDMDataObjectWriter.h.
|
staticprivate |
Class initialization stuff.
Definition at line 823 of file SDMDataObjectWriter.h.
|
staticprivate |
Two strings used as MIME boundaries.
Definition at line 818 of file SDMDataObjectWriter.h.
|
staticprivate |
Definition at line 819 of file SDMDataObjectWriter.h.
|
private |
The number of bytes written so far.
Definition at line 867 of file SDMDataObjectWriter.h.
Referenced by output().
|
private |
Definition at line 799 of file SDMDataObjectWriter.h.
Referenced by output().
|
private |
Definition at line 800 of file SDMDataObjectWriter.h.
Referenced by output().
|
private |
Definition at line 798 of file SDMDataObjectWriter.h.
Referenced by output().
|
private |
An SDMDataObject.
Definition at line 812 of file SDMDataObjectWriter.h.
|
private |
The number of the SDMDataSubset being written.
Definition at line 815 of file SDMDataObjectWriter.h.
|
private |
The subscan path.
Definition at line 809 of file SDMDataObjectWriter.h.
|
private |
The title of the binary data.
Definition at line 806 of file SDMDataObjectWriter.h.
|
private |
The ALMA uid of the MIME message.
Definition at line 803 of file SDMDataObjectWriter.h.
|
staticprivate |
The axes names definitions for WVR data and their related flags.
Definition at line 827 of file SDMDataObjectWriter.h.
|
staticprivate |
Definition at line 827 of file SDMDataObjectWriter.h.