casa
$Rev:20696$
|
A general class to write MIME messages containing ALMA binary data. More...
#include <SDMDataObjectWriter.h>
Public Member Functions | |
SDMDataObjectWriter (const string &uid="uid://X0/X0/X0", const string &title="ALMA Binary Data") | |
A constructor to write on standard output. | |
SDMDataObjectWriter (ofstream *ofs, const string &uid="uid://X0/X0/X0", const string &title="ALMA Binary Data") | |
A constructor to write in a file. | |
SDMDataObjectWriter (ostringstream *oss, const string &uid="uid://X0/X0/X0", const string &title="ALMA Binary Data") | |
A constructor to write in memory. | |
virtual | ~SDMDataObjectWriter () |
The destructor. | |
void | done () |
This method must be called to conclude the activity of this SDMDataObjectWriter. | |
void | tpDataHeader (uint64_t startTime, const string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numOfIntegrations, uint32_t numAntenna, SDMDataObject::DataStruct &dataStruct) |
Writes the XML global header on the MIME message stream, when binary data are Total Power data. | |
void | addTPSubscan (uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< AUTODATATYPE > &autoData) |
Writes a data subset of Total Power binary data. | |
void | tpData (uint64_t startTime, const string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numOfIntegrations, uint32_t numAntenna, const vector< SDMDataObject::Baseband > &basebands, uint64_t time, uint64_t interval, const vector< AxisName > &flagsAxes, const vector< FLAGSTYPE > &flags, const vector< AxisName > &actualTimesAxes, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< AxisName > &actualDurationsAxes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< AxisName > &autoDataAxes, const 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. | |
void | tpData (uint64_t startTime, const string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numOfIntegrations, uint32_t numAntenna, const vector< SDMDataObject::Baseband > &basebands, uint64_t time, uint64_t interval, const vector< AxisName > &autoDataAxes, const 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. | |
void | wvrData (const string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numTimes, uint32_t numAntennas, uint32_t numChannels, NetSideband netSideband, uint64_t time, uint64_t interval, const vector< AUTODATATYPE > &wvrData, const vector< FLAGSTYPE > &flags) |
Writes water vapour radiometer (WVR) data in a MIME message conform with the BDF V2 format. | |
void | corrDataHeader (uint64_t startime, const string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numAntenna, 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. | |
void | addIntegration (uint32_t integrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< INTCROSSDATATYPE > &crossData, const vector< AUTODATATYPE > &autoData) |
Writes an integration (local header + binary attachment) on the MIME message stream. | |
void | addIntegration (uint32_t integrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< SHORTCROSSDATATYPE > &crossData, const vector< AUTODATATYPE > &autoData) |
Writes an integration (local header + binary attachment) on the MIME message stream. | |
void | addIntegration (uint32_t integrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< FLOATCROSSDATATYPE > &crossData, const vector< AUTODATATYPE > &autoData) |
Writes an integration (local header + binary attachment) on the MIME message stream. | |
void | addSubintegration (uint32_t integrationNum, uint32_t subintegrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< INTCROSSDATATYPE > &crossData, const vector< AUTODATATYPE > &autoData) |
Writes an subintegration (local header + binary attachment) on the MIME message stream. | |
void | addSubintegration (uint32_t integrationNum, uint32_t subintegrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< SHORTCROSSDATATYPE > &crossData, const vector< AUTODATATYPE > &autoData) |
Writes an subintegration (local header + binary attachment) on the MIME message stream. | |
void | addSubintegration (uint32_t integrationNum, uint32_t subintegrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< FLOATCROSSDATATYPE > &crossData, const vector< AUTODATATYPE > &autoData) |
Writes an subintegration (local header + binary attachment) on the MIME message stream. | |
uint64_t | numBytes () |
Returns the number of bytes written so far. | |
void | output (const string &s) |
void | outputln (const 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 vector< T > &data) |
template<class T > | |
void | outputln (const vector< T > &data) |
void | outputln () |
void | outputlnLocation (const string &name, const SDMDataSubset &sdmDataSubset) |
SDMDataObjectWriter (const string &uid="uid://X0/X0/X0", const string &title="ALMA Binary Data") | |
A constructor to write on standard output. | |
SDMDataObjectWriter (ofstream *ofs, const string &uid="uid://X0/X0/X0", const string &title="ALMA Binary Data") | |
A constructor to write in a file. | |
SDMDataObjectWriter (ostringstream *oss, const string &uid="uid://X0/X0/X0", const string &title="ALMA Binary Data") | |
A constructor to write in memory. | |
virtual | ~SDMDataObjectWriter () |
The destructor. | |
void | done () |
This method must be called to conclude the activity of this SDMDataObjectWriter. | |
void | tpDataHeader (uint64_t startTime, const string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numOfIntegrations, uint32_t numAntenna, SDMDataObject::DataStruct &dataStruct) |
Writes the XML global header on the MIME message stream, when binary data are Total Power data. | |
void | addTPSubscan (uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< AUTODATATYPE > &autoData) |
Writes a data subset of Total Power binary data. | |
void | tpData (uint64_t startTime, const string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numOfIntegrations, uint32_t numAntenna, const vector< SDMDataObject::Baseband > &basebands, uint64_t time, uint64_t interval, const vector< AxisName > &flagsAxes, const vector< FLAGSTYPE > &flags, const vector< AxisName > &actualTimesAxes, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< AxisName > &actualDurationsAxes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< AxisName > &autoDataAxes, const 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. | |
void | tpData (uint64_t startTime, const string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numOfIntegrations, uint32_t numAntenna, const vector< SDMDataObject::Baseband > &basebands, uint64_t time, uint64_t interval, const vector< AxisName > &autoDataAxes, const 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. | |
void | wvrData (const string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numTimes, uint32_t numAntennas, uint32_t numChannels, NetSideband netSideband, uint64_t time, uint64_t interval, const vector< AUTODATATYPE > &wvrData, const vector< FLAGSTYPE > &flags) |
Writes water vapour radiometer (WVR) data in a MIME message conform with the BDF V2 format. | |
void | corrDataHeader (uint64_t startime, const string &execBlockUID, uint32_t execBlockNum, uint32_t scanNum, uint32_t subscanNum, uint32_t numAntenna, 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. | |
void | addIntegration (uint32_t integrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< INTCROSSDATATYPE > &crossData, const vector< AUTODATATYPE > &autoData) |
Writes an integration (local header + binary attachment) on the MIME message stream. | |
void | addIntegration (uint32_t integrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< SHORTCROSSDATATYPE > &crossData, const vector< AUTODATATYPE > &autoData) |
Writes an integration (local header + binary attachment) on the MIME message stream. | |
void | addIntegration (uint32_t integrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< FLOATCROSSDATATYPE > &crossData, const vector< AUTODATATYPE > &autoData) |
Writes an integration (local header + binary attachment) on the MIME message stream. | |
void | addSubintegration (uint32_t integrationNum, uint32_t subintegrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< INTCROSSDATATYPE > &crossData, const vector< AUTODATATYPE > &autoData) |
Writes an subintegration (local header + binary attachment) on the MIME message stream. | |
void | addSubintegration (uint32_t integrationNum, uint32_t subintegrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< SHORTCROSSDATATYPE > &crossData, const vector< AUTODATATYPE > &autoData) |
Writes an subintegration (local header + binary attachment) on the MIME message stream. | |
void | addSubintegration (uint32_t integrationNum, uint32_t subintegrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< FLOATCROSSDATATYPE > &crossData, const vector< AUTODATATYPE > &autoData) |
Writes an subintegration (local header + binary attachment) on the MIME message stream. | |
uint64_t | numBytes () |
Returns the number of bytes written so far. | |
void | output (const string &s) |
void | outputln (const 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 vector< T > &data) |
template<class T > | |
void | outputln (const vector< T > &data) |
void | outputln () |
void | outputlnLocation (const string &name, const SDMDataSubset &sdmDataSubset) |
Private Types | |
enum | OUTDEST { STDOUT, MEMORY, FILE, STDOUT, MEMORY, FILE } |
enum | States { START, S_TPDATA, S_TPDATAHEADER, S_ADDTPSUBSCAN, S_WVRDATA, S_CORRDATAHEADER, S_ADDINTEGRATION, S_ADDSUBINTEGRATION, END, START, S_TPDATA, S_TPDATAHEADER, S_ADDTPSUBSCAN, 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_WVRDATA, T_CORRDATAHEADER, T_ADDINTEGRATION, T_ADDSUBINTEGRATION, T_DONE, T_TPDATA, T_TPDATAHEADER, T_ADDTPSUBSCAN, T_WVRDATA, T_CORRDATAHEADER, T_ADDINTEGRATION, T_ADDSUBINTEGRATION, T_DONE } |
enum | OUTDEST { STDOUT, MEMORY, FILE, STDOUT, MEMORY, FILE } |
enum | States { START, S_TPDATA, S_TPDATAHEADER, S_ADDTPSUBSCAN, S_WVRDATA, S_CORRDATAHEADER, S_ADDINTEGRATION, S_ADDSUBINTEGRATION, END, START, S_TPDATA, S_TPDATAHEADER, S_ADDTPSUBSCAN, 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_WVRDATA, T_CORRDATAHEADER, T_ADDINTEGRATION, T_ADDSUBINTEGRATION, T_DONE, T_TPDATA, T_TPDATAHEADER, T_ADDTPSUBSCAN, T_WVRDATA, T_CORRDATAHEADER, T_ADDINTEGRATION, T_ADDSUBINTEGRATION, T_DONE } |
Private Member Functions | |
void | preamble () |
Writes the very first part of the MIME message. | |
void | postamble () |
Write the very end of the MIME message. | |
void | addData (uint32_t integrationNum, uint32_t subintegrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< INTCROSSDATATYPE > &intCrossData, const vector< SHORTCROSSDATATYPE > &shortCrossData, const vector< FLOATCROSSDATATYPE > &floatCrossData, const vector< AUTODATATYPE > &autoData) |
void | checkState (Transitions t, const string &methodName) |
void | preamble () |
Writes the very first part of the MIME message. | |
void | postamble () |
Write the very end of the MIME message. | |
void | addData (uint32_t integrationNum, uint32_t subintegrationNum, uint64_t time, uint64_t interval, const vector< FLAGSTYPE > &flags, const vector< ACTUALTIMESTYPE > &actualTimes, const vector< ACTUALDURATIONSTYPE > &actualDurations, const vector< ZEROLAGSTYPE > &zeroLags, const vector< INTCROSSDATATYPE > &intCrossData, const vector< SHORTCROSSDATATYPE > &shortCrossData, const vector< FLOATCROSSDATATYPE > &floatCrossData, const vector< AUTODATATYPE > &autoData) |
void | checkState (Transitions t, const string &methodName) |
Static Private Member Functions | |
static bool | initClass () |
template<class Enum , class EnumHelper > | |
static vector< Enum > | enumvec (const string &strliterals) |
A utility to fill a vector of <Enum> from a an array of c-strings. | |
static bool | initClass () |
template<class Enum , class EnumHelper > | |
static vector< Enum > | enumvec (const string &strliterals) |
A utility to fill a vector of <Enum> from a an array of c-strings. | |
Private Attributes | |
OUTDEST | otype_ |
ofstream * | ofs_ |
ostringstream * | oss_ |
string | uid_ |
The ALMA uid of the MIME message. | |
string | title_ |
The title of the binary data. | |
string | subscanPath_ |
The subscan path. | |
SDMDataObject | sdmDataObject_ |
An SDMDataObject. | |
uint32_t | sdmDataSubsetNum_ |
The number of the SDMDataSubset being written. | |
bool | done_ |
Are we done with this ? | |
uint64_t | numBytes_ |
The number of bytes written so far. | |
States | currentState_ |
Static Private Attributes | |
static const string | MIMEBOUNDARY_1 |
Two strings used as MIME boundaries. | |
static const string | MIMEBOUNDARY_2 |
static const bool | initClass_ |
Class initialization stuff. | |
static vector< AxisName > | WVRDATAAXES |
The axes names definitions for WVR data and their related flags. | |
static vector< 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:
// open a disk file ofstream osf("myCorrData.dat"); // builds an SDMDataObjectWriter which will write the data in the file "myCorrData.dat". SDMDataObjectWriter sdmdow(&osf, "uid://X1/X2/X3", "ALMA Binary Data"); // Here produce the binary data by using one the sequences detailed below. . . // done with sdmdow. sdmdow.done(); // Do not forget to close the file !! osf.close() . .
Example of a MIME message output in an ostringstream :
// create an osstringstream ostringstream oss; // builds an SDMDataObjectWriter which will write the data in the string attached to oss. SDMDataObjectWriter sdmdow(&oss, "uid://X1/X2/X3", "ALMA Binary Data"); // Here produce the binary data by using one the sequences detailed below. . . // done with sdmdow. sdmdow.done(); // Do whatever you want with oss. . . // And perhaps a good thing to erase the content of oss. oss.str(""); . .
We detail now the different valid sequences for writing binary data depending on their kind.
One single call to the tpData() method.
sdmdow.tpData(123450000, // startTime "uid://X123/X4/X5", // execBlockUID 1, // execBlockNum 10, // scanNum 3, // subscanNum 100, // number of integrations 2, // number of antennas basebands, // vector of basebands. 171450000, // time 96000000, // interval axis, // names of axis autoData); // total power data values.
One may also consider to use in that order the methods tpDataHeader and addTPSubscan.
One single call to the wvrData() method.
sdmdow.wvrData("uid://X123/X4/X5", // execBlockUID, 1, // execBlockNum, 10, // scanNum, 3, // subscanNum, 100, // number of time stamps (i.e. size along the TIM axis), 8, // number of antennas, 4, // number of channels, DSB, // NetSideband characteristic, 171450000, // time, 96000000, // interval, wvrData, // the WVR data values, flags); // flags associated to the WVR data.
One single call to corrDataHeader() followed by one or more calls to addIntegration().
// Write the global header. sdmdow.corrDataHeader(123450000, // startTime "uid://X123/X4/X5", // execBlockUID 1, // execBlockNum 10, // scanNum 3, // subscanNum 2, // numAntenna correlationMode, // the correlation mode. spectralResolution, // the spectral resolution. correlatorType, // the processor (correlator) type. dataStruct); // the description of the structure of the binary data. // And write the integrations (3 in that example). for (uint32_t i = 0; i < 3; i++) { . . . sdmdow.addIntegration(i+1, // integration's index. time, // midpoint interval, // time interval flags, // flags binary data actualTimes, // actual times binary data actualDurations, // actual durations binary data zeroLags, // zero lags binary data shortCrossData, // cross data (can be short or int) autoData); // single dish data. . . . }
One single call to corrDataHeader() followed by one or more calls to addSubintegration().
// Write the global header. sdmdow.corrDataHeader(123450000, // startTime "uid://X123/X4/X5", // execBlockUID 1, // execBlockNum 10, // scanNum 3, // subscanNum 2, // numAntenna correlationMode, // the correlation mode. spectralResolution, // the spectral resolution. processorType, // the processor type. dataStruct); // the description of the structure of the binary data. // And write the subintegrations (6 in that example). for (uint32_t i = 0; i < 3; i++) { for (uint32_t j = 0; j < 2; j++) { . . . sdmdow.addSubintegration(i+1, // integration's index. j+1, // subintegration's index time, // midpoint interval, // time interval flags, // flags binary data actualTimes, // actual times binary data actualDurations,// actual durations binary data zeroLags, // zero lags binary data shortCrossData, // cross data (can be short or int) autoData); // single dish data. . . . } }
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 276 of file SDMDataObjectWriter.h.
enum asdmbinaries::SDMDataObjectWriter::OUTDEST [private] |
Definition at line 782 of file SDMDataObjectWriter.h.
enum asdmbinaries::SDMDataObjectWriter::OUTDEST [private] |
Definition at line 782 of file SDMDataObjectWriter.h.
enum asdmbinaries::SDMDataObjectWriter::States [private] |
A small finite state automaton to control the usage of SDMDataObjectWriter.
Definition at line 856 of file SDMDataObjectWriter.h.
enum asdmbinaries::SDMDataObjectWriter::States [private] |
A small finite state automaton to control the usage of SDMDataObjectWriter.
Definition at line 856 of file SDMDataObjectWriter.h.
enum asdmbinaries::SDMDataObjectWriter::Transitions [private] |
Definition at line 857 of file SDMDataObjectWriter.h.
enum asdmbinaries::SDMDataObjectWriter::Transitions [private] |
Definition at line 857 of file SDMDataObjectWriter.h.
asdmbinaries::SDMDataObjectWriter::SDMDataObjectWriter | ( | const string & | uid = "uid://X0/X0/X0" , |
const 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 | ( | ofstream * | ofs, |
const string & | uid = "uid://X0/X0/X0" , |
||
const 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 | ( | ostringstream * | oss, |
const string & | uid = "uid://X0/X0/X0" , |
||
const 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 asdmbinaries::SDMDataObjectWriter::~SDMDataObjectWriter | ( | ) | [virtual] |
The destructor.
asdmbinaries::SDMDataObjectWriter::SDMDataObjectWriter | ( | const string & | uid = "uid://X0/X0/X0" , |
const 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 | ( | ofstream * | ofs, |
const string & | uid = "uid://X0/X0/X0" , |
||
const 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 | ( | ostringstream * | oss, |
const string & | uid = "uid://X0/X0/X0" , |
||
const 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 asdmbinaries::SDMDataObjectWriter::~SDMDataObjectWriter | ( | ) | [virtual] |
The destructor.
void asdmbinaries::SDMDataObjectWriter::addData | ( | uint32_t | integrationNum, |
uint32_t | subintegrationNum, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< INTCROSSDATATYPE > & | intCrossData, | ||
const vector< SHORTCROSSDATATYPE > & | shortCrossData, | ||
const vector< FLOATCROSSDATATYPE > & | floatCrossData, | ||
const vector< AUTODATATYPE > & | autoData | ||
) | [private] |
void asdmbinaries::SDMDataObjectWriter::addData | ( | uint32_t | integrationNum, |
uint32_t | subintegrationNum, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< INTCROSSDATATYPE > & | intCrossData, | ||
const vector< SHORTCROSSDATATYPE > & | shortCrossData, | ||
const vector< FLOATCROSSDATATYPE > & | floatCrossData, | ||
const vector< AUTODATATYPE > & | autoData | ||
) | [private] |
void asdmbinaries::SDMDataObjectWriter::addIntegration | ( | uint32_t | integrationNum, |
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< INTCROSSDATATYPE > & | crossData, | ||
const 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 int). |
autoData | the values of autoData. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::addIntegration | ( | uint32_t | integrationNum, |
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< INTCROSSDATATYPE > & | crossData, | ||
const 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 int). |
autoData | the values of autoData. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::addIntegration | ( | uint32_t | integrationNum, |
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< SHORTCROSSDATATYPE > & | crossData, | ||
const 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 vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< SHORTCROSSDATATYPE > & | crossData, | ||
const 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 vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< FLOATCROSSDATATYPE > & | crossData, | ||
const 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::addIntegration | ( | uint32_t | integrationNum, |
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< FLOATCROSSDATATYPE > & | crossData, | ||
const 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 vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< INTCROSSDATATYPE > & | crossData, | ||
const 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 vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< INTCROSSDATATYPE > & | crossData, | ||
const 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 vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< SHORTCROSSDATATYPE > & | crossData, | ||
const 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 vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< SHORTCROSSDATATYPE > & | crossData, | ||
const 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 vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< FLOATCROSSDATATYPE > & | crossData, | ||
const 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 |
void asdmbinaries::SDMDataObjectWriter::addSubintegration | ( | uint32_t | integrationNum, |
uint32_t | subintegrationNum, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< ZEROLAGSTYPE > & | zeroLags, | ||
const vector< FLOATCROSSDATATYPE > & | crossData, | ||
const 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 |
void asdmbinaries::SDMDataObjectWriter::addTPSubscan | ( | uint64_t | time, |
uint64_t | interval, | ||
const vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< AUTODATATYPE > & | autoData | ||
) |
Writes a data subset of Total Power binary data.
time | time of the subscan. |
interval | duration of the subscan. |
flags | the values of flags (see note). |
actualTimes | the values of actualTimes (see note). |
actualDurations | the values of actualDurations (see note). |
autoData | the values of autoData. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::addTPSubscan | ( | uint64_t | time, |
uint64_t | interval, | ||
const vector< FLAGSTYPE > & | flags, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< AUTODATATYPE > & | autoData | ||
) |
Writes a data subset of Total Power binary data.
time | time of the subscan. |
interval | duration of the subscan. |
flags | the values of flags (see note). |
actualTimes | the values of actualTimes (see note). |
actualDurations | the values of actualDurations (see note). |
autoData | the values of autoData. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::checkState | ( | Transitions | t, |
const string & | methodName | ||
) | [private] |
void asdmbinaries::SDMDataObjectWriter::checkState | ( | Transitions | t, |
const string & | methodName | ||
) | [private] |
void asdmbinaries::SDMDataObjectWriter::corrDataHeader | ( | uint64_t | startime, |
const string & | execBlockUID, | ||
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numAntenna, | ||
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::corrDataHeader | ( | uint64_t | startime, |
const string & | execBlockUID, | ||
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numAntenna, | ||
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 |
This method must be called to conclude the activity of this SDMDataObjectWriter.
It completes the MIME message.
This method must be called to conclude the activity of this SDMDataObjectWriter.
It completes the MIME message.
static vector<Enum> asdmbinaries::SDMDataObjectWriter::enumvec | ( | const string & | strliterals | ) | [inline, static, private] |
A utility to fill a vector of <Enum> from a an array of c-strings.
Definition at line 815 of file SDMDataObjectWriter.h.
static vector<Enum> asdmbinaries::SDMDataObjectWriter::enumvec | ( | const string & | strliterals | ) | [inline, static, private] |
A utility to fill a vector of <Enum> from a an array of c-strings.
Definition at line 815 of file SDMDataObjectWriter.h.
static bool asdmbinaries::SDMDataObjectWriter::initClass | ( | ) | [static, private] |
static bool asdmbinaries::SDMDataObjectWriter::initClass | ( | ) | [static, private] |
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.
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 string & | s | ) |
void asdmbinaries::SDMDataObjectWriter::output | ( | const string & | s | ) |
void asdmbinaries::SDMDataObjectWriter::output | ( | const float * | data, |
uint32_t | numData | ||
) |
void asdmbinaries::SDMDataObjectWriter::output | ( | const float * | data, |
uint32_t | numData | ||
) |
void asdmbinaries::SDMDataObjectWriter::output | ( | const vector< T > & | data | ) | [inline] |
void asdmbinaries::SDMDataObjectWriter::output | ( | const vector< T > & | data | ) | [inline] |
void asdmbinaries::SDMDataObjectWriter::outputln | ( | const string & | s | ) |
void asdmbinaries::SDMDataObjectWriter::outputln | ( | const string & | s | ) |
void asdmbinaries::SDMDataObjectWriter::outputln | ( | const float * | data, |
uint32_t | numData | ||
) |
void asdmbinaries::SDMDataObjectWriter::outputln | ( | const float * | data, |
uint32_t | numData | ||
) |
void asdmbinaries::SDMDataObjectWriter::outputln | ( | const long long * | data, |
uint32_t | numData | ||
) |
void asdmbinaries::SDMDataObjectWriter::outputln | ( | const long long * | data, |
uint32_t | numData | ||
) |
void asdmbinaries::SDMDataObjectWriter::outputln | ( | const vector< T > & | data | ) | [inline] |
Definition at line 772 of file SDMDataObjectWriter.h.
References casa::data, and outputln().
void asdmbinaries::SDMDataObjectWriter::outputln | ( | const vector< T > & | data | ) | [inline] |
Definition at line 772 of file SDMDataObjectWriter.h.
References casa::data, and outputln().
Referenced by outputln().
void asdmbinaries::SDMDataObjectWriter::outputlnLocation | ( | const string & | name, |
const SDMDataSubset & | sdmDataSubset | ||
) |
void asdmbinaries::SDMDataObjectWriter::outputlnLocation | ( | const string & | name, |
const SDMDataSubset & | sdmDataSubset | ||
) |
void asdmbinaries::SDMDataObjectWriter::postamble | ( | ) | [private] |
Write the very end of the MIME message.
void asdmbinaries::SDMDataObjectWriter::postamble | ( | ) | [private] |
Write the very end of the MIME message.
void asdmbinaries::SDMDataObjectWriter::preamble | ( | ) | [private] |
Writes the very first part of the MIME message.
void asdmbinaries::SDMDataObjectWriter::preamble | ( | ) | [private] |
Writes the very first part of the MIME message.
void asdmbinaries::SDMDataObjectWriter::tpData | ( | uint64_t | startTime, |
const string & | execBlockUID, | ||
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numOfIntegrations, | ||
uint32_t | numAntenna, | ||
const vector< SDMDataObject::Baseband > & | basebands, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< AxisName > & | flagsAxes, | ||
const vector< FLAGSTYPE > & | flags, | ||
const vector< AxisName > & | actualTimesAxes, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< AxisName > & | actualDurationsAxes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< AxisName > & | autoDataAxes, | ||
const 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 string & | execBlockUID, | ||
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numOfIntegrations, | ||
uint32_t | numAntenna, | ||
const vector< SDMDataObject::Baseband > & | basebands, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< AxisName > & | flagsAxes, | ||
const vector< FLAGSTYPE > & | flags, | ||
const vector< AxisName > & | actualTimesAxes, | ||
const vector< ACTUALTIMESTYPE > & | actualTimes, | ||
const vector< AxisName > & | actualDurationsAxes, | ||
const vector< ACTUALDURATIONSTYPE > & | actualDurations, | ||
const vector< AxisName > & | autoDataAxes, | ||
const 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 string & | execBlockUID, | ||
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numOfIntegrations, | ||
uint32_t | numAntenna, | ||
const vector< SDMDataObject::Baseband > & | basebands, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< AxisName > & | autoDataAxes, | ||
const 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::tpData | ( | uint64_t | startTime, |
const string & | execBlockUID, | ||
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numOfIntegrations, | ||
uint32_t | numAntenna, | ||
const vector< SDMDataObject::Baseband > & | basebands, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< AxisName > & | autoDataAxes, | ||
const 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 string & | execBlockUID, | ||
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numOfIntegrations, | ||
uint32_t | numAntenna, | ||
SDMDataObject::DataStruct & | dataStruct | ||
) |
Writes the XML global header on the MIME message stream, when binary data are Total Power data.
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. |
numOfIntegrations | the number of integrations in that Subscan. |
numAntenna | the number of antenna. |
dataStruct | the description of the binary data structure. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::tpDataHeader | ( | uint64_t | startTime, |
const string & | execBlockUID, | ||
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numOfIntegrations, | ||
uint32_t | numAntenna, | ||
SDMDataObject::DataStruct & | dataStruct | ||
) |
Writes the XML global header on the MIME message stream, when binary data are Total Power data.
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. |
numOfIntegrations | the number of integrations in that Subscan. |
numAntenna | the number of antenna. |
dataStruct | the description of the binary data structure. |
SDMDataObjectWriterException |
void asdmbinaries::SDMDataObjectWriter::wvrData | ( | const string & | execBlockUID, |
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numTimes, | ||
uint32_t | numAntennas, | ||
uint32_t | numChannels, | ||
NetSideband | netSideband, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< AUTODATATYPE > & | wvrData, | ||
const 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 |
void asdmbinaries::SDMDataObjectWriter::wvrData | ( | const string & | execBlockUID, |
uint32_t | execBlockNum, | ||
uint32_t | scanNum, | ||
uint32_t | subscanNum, | ||
uint32_t | numTimes, | ||
uint32_t | numAntennas, | ||
uint32_t | numChannels, | ||
NetSideband | netSideband, | ||
uint64_t | time, | ||
uint64_t | interval, | ||
const vector< AUTODATATYPE > & | wvrData, | ||
const 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 |
Definition at line 858 of file SDMDataObjectWriter.h.
bool asdmbinaries::SDMDataObjectWriter::done_ [private] |
Are we done with this ?
Definition at line 849 of file SDMDataObjectWriter.h.
static const bool asdmbinaries::SDMDataObjectWriter::initClass_ [static, private] |
Class initialization stuff.
Definition at line 808 of file SDMDataObjectWriter.h.
static const string asdmbinaries::SDMDataObjectWriter::MIMEBOUNDARY_1 [static, private] |
Two strings used as MIME boundaries.
Definition at line 803 of file SDMDataObjectWriter.h.
static const string asdmbinaries::SDMDataObjectWriter::MIMEBOUNDARY_2 [static, private] |
Definition at line 804 of file SDMDataObjectWriter.h.
uint64_t asdmbinaries::SDMDataObjectWriter::numBytes_ [private] |
The number of bytes written so far.
Definition at line 852 of file SDMDataObjectWriter.h.
Referenced by output().
ofstream * asdmbinaries::SDMDataObjectWriter::ofs_ [private] |
Definition at line 784 of file SDMDataObjectWriter.h.
Referenced by output().
ostringstream * asdmbinaries::SDMDataObjectWriter::oss_ [private] |
Definition at line 785 of file SDMDataObjectWriter.h.
Referenced by output().
Definition at line 783 of file SDMDataObjectWriter.h.
Referenced by output().
An SDMDataObject.
Definition at line 797 of file SDMDataObjectWriter.h.
uint32_t asdmbinaries::SDMDataObjectWriter::sdmDataSubsetNum_ [private] |
The number of the SDMDataSubset being written.
Definition at line 800 of file SDMDataObjectWriter.h.
string asdmbinaries::SDMDataObjectWriter::subscanPath_ [private] |
The subscan path.
Definition at line 794 of file SDMDataObjectWriter.h.
string asdmbinaries::SDMDataObjectWriter::title_ [private] |
The title of the binary data.
Definition at line 791 of file SDMDataObjectWriter.h.
string asdmbinaries::SDMDataObjectWriter::uid_ [private] |
The ALMA uid of the MIME message.
Definition at line 788 of file SDMDataObjectWriter.h.
static vector< AxisName > asdmbinaries::SDMDataObjectWriter::WVRDATAAXES [static, private] |
The axes names definitions for WVR data and their related flags.
Definition at line 812 of file SDMDataObjectWriter.h.
static vector< AxisName > asdmbinaries::SDMDataObjectWriter::WVRDATAFLAGSAXES [static, private] |
Definition at line 812 of file SDMDataObjectWriter.h.