casa
5.7.0-16
|
SDMDataObject:: declarations. More...
#include <SDMDataObject.h>
Classes | |
class | AutoDataBinaryPart |
A subclass of binaryPart to describe the autodata. More... | |
class | Baseband |
SDMDataObject::Baseband:: declarations. More... | |
class | BinaryPart |
SDMDataObject::BinaryPart:: declarations. More... | |
class | DataStruct |
SDMDataObject::DataStruct:: declarations. More... | |
class | SpectralWindow |
SDMDataObject::SpectralWindow:: declarations. More... | |
class | ZeroLagsBinaryPart |
A subclass of binaryPart to describe the zeroLags. More... | |
Public Member Functions | |
SDMDataObject () | |
SDMDataObject (unsigned long long startTime, const std::string &dataOID, unsigned int dimensionality, const std::string &execBlockUID, unsigned int execBlockNum, unsigned int scanNum, unsigned int subscanNum, unsigned int numAntenna, CorrelationModeMod::CorrelationMode correlatorMode, const SDMDataObject::DataStruct &dataStruct) | |
SDMDataObject (unsigned long long startTime, const std::string &dataOID, unsigned int dimensionality, unsigned int numTime, const std::string &execBlockUID, unsigned int execBlockNum, unsigned int scanNum, unsigned int subscanNum, unsigned int numAntenna, const SDMDataObject::DataStruct &dataStruct) | |
std::string | title () const |
Returns the title of the SDMDataObject. More... | |
void | title (const std::string &value) |
const ByteOrder * | byteOrder () const |
Returns the byte order of the binary parts. More... | |
unsigned long long | startTime () const |
Returns the start time. More... | |
void | startTime (unsigned long long value) |
unsigned int | numTime () const |
Returns the number of (sub) integrations. More... | |
void | numTime (unsigned int value) |
std::string | dataOID () const |
Returns the dataOID. More... | |
void | dataOID (const std::string &value) |
std::string | execBlockUID () const |
Returns the UID of the ExecBlock. More... | |
void | execBlockUID (const std::string &value) |
unsigned int | execBlockNum () const |
Returns the number of the ExecBlock. More... | |
void | execBlockNum (unsigned int value) |
unsigned int | scanNum () const |
Returns the number of the scan. More... | |
void | scanNum (unsigned int value) |
unsigned int | subscanNum () const |
Returns the number of the subscan. More... | |
void | subscanNum (int value) |
std::string | projectPath () const |
Returns the project path. More... | |
std::vector< std::string > | projectPaths () const |
Returns the projects paths of all the data subsets present in this SDMDataObject. More... | |
unsigned int | numAntenna () const |
Returns the number of antenna. More... | |
void | numAntenna (unsigned int value) |
CorrelationModeMod::CorrelationMode | correlationMode () const |
Returns the correlation mode. More... | |
OptionalSpectralResolutionType | spectralResolutionType () const |
Returns the spectral resolution. More... | |
ProcessorTypeMod::ProcessorType | processorType () const |
Returns the processor type. More... | |
CorrelatorTypeMod::CorrelatorType | correlatorType () const |
Returns the correlator type. More... | |
bool | isTP () const |
Returns true if the data are total power data and false otherwise. More... | |
bool | isWVR () const |
Returns true if the data are wvr data and false otherwise. More... | |
bool | isCorrelation () const |
Returns true if the data are correlator data and false otherwise. More... | |
bool | hasPackedData () const |
hasPackedData returns true if all the integrations are grouped in one subset for all the timestamps and conversely false if there is one subset per integration (i.e. More... | |
const DataStruct & | dataStruct () const |
Returns the structure of the data. More... | |
void | dataStruct (const DataStruct &dataStruct) |
const std::vector < SDMDataSubset > & | sdmDataSubsets () const |
Return all the SDMDataSubsets contained in this. More... | |
const std::vector < SDMDataSubset > & | corrDataSubsets () const |
Returns the binary data as a sequence of integrations. More... | |
void | corrDataSubsets (const std::vector< SDMDataSubset > &value) |
const SDMDataSubset & | sdmDataSubset (const std::string &projectPath) const |
Returns a reference to a SDMDataSubset given its projectPath. More... | |
bool | aborted () const |
Returns true if the observation has been aborted. More... | |
unsigned long long | abortTime () const |
Returns the time, as an unsigned long long, at which the observation has been aborted. More... | |
std::string | abortReason () const |
Returns the reason, as a string, why the observation has been aborted. More... | |
const SDMDataSubset & | tpDataSubset () const |
Returns the binary data for a subscan. More... | |
void | tpDataSubset (const SDMDataSubset &value) |
std::string | toString () const |
Returns a string representation of the global header of this SDMDataObject. More... | |
void | done () |
Makes this SDMDataObject unusable. More... | |
unsigned int | dimensionality () const |
Dimensionality of the binary content. More... | |
Private Member Functions | |
void | append (const SDMDataSubset &value) |
void | dimensionality (unsigned int value) |
Returns the "dimensionality" of this SDMDataObject. More... | |
bool | inTitle (const std::string &what) const |
Returns true is the string passed as an argument is found in the title of this. More... | |
void | owns () |
Declares itself as the owner of all its parts. More... | |
std::string | toXML () |
Returns an XML representation of the global header of this SDMDataObject. More... | |
void | toXML (const BinaryPart &binaryPart, const std::string &elementName, std::ostringstream &oss) const |
void | toXML (const AutoDataBinaryPart &autoDataBinaryPart, const std::string &elementName, std::ostringstream &oss) const |
void | toXML (const ZeroLagsBinaryPart &zeroLagsBinaryPart, const std::string &elementName, std::ostringstream &oss) const |
void | spectralWindowsToXML (const std::vector< Baseband > &basebands, unsigned int ibb, std::ostringstream &oss) const |
void | basebandsToXML (std::ostringstream &oss) const |
void | dataStructToXML (std::ostringstream &oss) |
void | updateIdImageSPW () |
Static Private Member Functions | |
static bool | init () |
Private Attributes | |
bool | valid_ |
Is the SDMDataObject actually properly filled with valid data. More... | |
std::string | title_ |
Global header variables. More... | |
const ByteOrder * | byteOrder_ |
int | schemaVersion_ |
long long | startTime_ |
std::string | dataOID_ |
unsigned int | dimensionality_ |
unsigned int | numTime_ |
std::string | execBlockUID_ |
unsigned int | execBlockNum_ |
unsigned int | scanNum_ |
unsigned int | subscanNum_ |
unsigned int | numAntenna_ |
CorrelationModeMod::CorrelationMode | correlationMode_ |
OptionalSpectralResolutionType | spectralResolutionType_ |
ProcessorTypeMod::ProcessorType | processorType_ |
DataStruct | dataStruct_ |
std::map< std::string, unsigned int > | str2index_ |
std::vector< SDMDataSubset > | dataSubsets_ |
bool | aborted_ |
unsigned long long int | abortTime_ |
std::string | abortReason_ |
Static Private Attributes | |
static std::vector< std::string > | correlationModeRefs |
static std::vector< std::string > | axes |
static std::vector< std::string > | types |
static std::vector< std::string > | apcs |
static const bool | _init |
static const boost::regex | SPWID |
Friends | |
class | SDMDataObjectStreamReader |
class | SDMDataObjectReader |
class | SDMDataObjectWriter |
class | HeaderParser |
class | SDMDataSubset |
class | CorrSubsetHeaderParser |
SDMDataObject:: declarations.
A class to represent ALMA binary data. Three situations can be handled by this class: <ul> <li> Correlator data </li> <li> Total power data </li> <li> WVR data </li> </ul> At the time of writing: <ul> <li> Correlator data (isCorrelation() returns true) are stored in an SDMDataObject which is organized as a global header containing descriptive informations valid for all the recorded binary data, followed by a sequence of SDMDataSubsets - local header, binary data pairs - . Each SDMDataSubset corresponds to one integration and the full SDMDataObject corresponds to one subscan (hasPackedData returns false). <li> Total Power (TP) data (isTP() returns true) are stored like Correlator data i.e in a sequence of SDMDataSubsets (hasPackedData() returns false) <b>or</b> for TP data recorded before Cycle 3 in a SDMDataObject containing the global header followed by <b>one unique</b> SDMDataSubset containing the data recorded during the whole subscan (hasPackedData() returns true). </li> <li> WVR data (isWVR() returns true) are stored in an SDMDataObject organized as one global header followed by <b>one unique</b> SDMDataSubset containing the data recorded during the whole subscan (hasPackedData() returns true). <ul> An instance of an SDMDataObject is never created explicitely by calling some constructors or setters methods. Instances of SDMDataObject are rather created implicitely : <ul> <li> on output, while creating a MIME message containing ALMA binary data by using the class SDMDataObjectWriter; actual parameters passed to methods of this class are assembled together to
form an SDMDataObject which is in turn converted into a MIME message, on input, while reading a MIME message containing ALMA binary data by using the class SDMDataObjectReader; the result of the parsing of the MIME message is returned in an SDMDataObject.
We give here a quick list of the method which allows to retrieve the different parts of an SDMDataObject :
Definition at line 323 of file SDMDataObject.h.
asdmbinaries::SDMDataObject::SDMDataObject | ( | ) |
asdmbinaries::SDMDataObject::SDMDataObject | ( | unsigned long long | startTime, |
const std::string & | dataOID, | ||
unsigned int | dimensionality, | ||
const std::string & | execBlockUID, | ||
unsigned int | execBlockNum, | ||
unsigned int | scanNum, | ||
unsigned int | subscanNum, | ||
unsigned int | numAntenna, | ||
CorrelationModeMod::CorrelationMode | correlatorMode, | ||
const SDMDataObject::DataStruct & | dataStruct | ||
) |
asdmbinaries::SDMDataObject::SDMDataObject | ( | unsigned long long | startTime, |
const std::string & | dataOID, | ||
unsigned int | dimensionality, | ||
unsigned int | numTime, | ||
const std::string & | execBlockUID, | ||
unsigned int | execBlockNum, | ||
unsigned int | scanNum, | ||
unsigned int | subscanNum, | ||
unsigned int | numAntenna, | ||
const SDMDataObject::DataStruct & | dataStruct | ||
) |
bool asdmbinaries::SDMDataObject::aborted | ( | ) | const |
Returns true if the observation has been aborted.
This method must be used on an SDMDataObject containing correlator data,otherwise a SDMDataObjectException is thrown.
SDMDataObjectException. |
std::string asdmbinaries::SDMDataObject::abortReason | ( | ) | const |
Returns the reason, as a string, why the observation has been aborted.
The returned value is significant only if the observation has been aborted, therefore the method must always be used in conjuction with the aborted method. This method must be used on an SDMDataObject containing correlator data, otherwise a SDMDataObjectException is thrown.
SDMDataObjectException |
unsigned long long asdmbinaries::SDMDataObject::abortTime | ( | ) | const |
Returns the time, as an unsigned long long, at which the observation has been aborted.
The returned value is significant only if the observation has been aborted, therefore the method must always be used in conjuction with the aborted method. This method must be used on an SDMDataObject containing correlator data, otherwise a SDMDataObjectException is thrown.
SDMDataObjectException |
|
private |
|
private |
const ByteOrder* asdmbinaries::SDMDataObject::byteOrder | ( | ) | const |
Returns the byte order of the binary parts.
const std::vector<SDMDataSubset>& asdmbinaries::SDMDataObject::corrDataSubsets | ( | ) | const |
Returns the binary data as a sequence of integrations.
This method must be used only when the SDMDataObject contains correlator data (i.e. isCorrelation() == true)
void asdmbinaries::SDMDataObject::corrDataSubsets | ( | const std::vector< SDMDataSubset > & | value | ) |
CorrelationModeMod::CorrelationMode asdmbinaries::SDMDataObject::correlationMode | ( | ) | const |
Returns the correlation mode.
CorrelatorTypeMod::CorrelatorType asdmbinaries::SDMDataObject::correlatorType | ( | ) | const |
Returns the correlator type.
SDMDataException |
std::string asdmbinaries::SDMDataObject::dataOID | ( | ) | const |
Returns the dataOID.
void asdmbinaries::SDMDataObject::dataOID | ( | const std::string & | value | ) |
const DataStruct& asdmbinaries::SDMDataObject::dataStruct | ( | ) | const |
Returns the structure of the data.
void asdmbinaries::SDMDataObject::dataStruct | ( | const DataStruct & | dataStruct | ) |
|
private |
unsigned int asdmbinaries::SDMDataObject::dimensionality | ( | ) | const |
Dimensionality of the binary content.
== 0 all data are grouped in one subset == 1 data are spread over a sequence of subsets, usually along the time axis with one integration (i.e. one timestamp) per subset.
|
private |
Returns the "dimensionality" of this SDMDataObject.
A value of
void asdmbinaries::SDMDataObject::done | ( | ) |
Makes this SDMDataObject unusable.
After a call to this method any request to this instance will generate an exception.
unsigned int asdmbinaries::SDMDataObject::execBlockNum | ( | ) | const |
Returns the number of the ExecBlock.
void asdmbinaries::SDMDataObject::execBlockNum | ( | unsigned int | value | ) |
std::string asdmbinaries::SDMDataObject::execBlockUID | ( | ) | const |
Returns the UID of the ExecBlock.
void asdmbinaries::SDMDataObject::execBlockUID | ( | const std::string & | value | ) |
bool asdmbinaries::SDMDataObject::hasPackedData | ( | ) | const |
hasPackedData returns true if all the integrations are grouped in one subset for all the timestamps and conversely false if there is one subset per integration (i.e.
per timestamp). Equivalent to the method dimensionality as follows : "hasPackedData returns true is equivalent to dimensionality returns 0"
|
staticprivate |
|
private |
Returns true is the string passed as an argument is found in the title of this.
The search is case insensitive.
what,the | string to be looked for in the title of this. |
bool asdmbinaries::SDMDataObject::isCorrelation | ( | ) | const |
Returns true if the data are correlator data and false otherwise.
bool asdmbinaries::SDMDataObject::isTP | ( | ) | const |
Returns true if the data are total power data and false otherwise.
bool asdmbinaries::SDMDataObject::isWVR | ( | ) | const |
Returns true if the data are wvr data and false otherwise.
unsigned int asdmbinaries::SDMDataObject::numAntenna | ( | ) | const |
Returns the number of antenna.
void asdmbinaries::SDMDataObject::numAntenna | ( | unsigned int | value | ) |
unsigned int asdmbinaries::SDMDataObject::numTime | ( | ) | const |
Returns the number of (sub) integrations.
void asdmbinaries::SDMDataObject::numTime | ( | unsigned int | value | ) |
|
private |
Declares itself as the owner of all its parts.
ProcessorTypeMod::ProcessorType asdmbinaries::SDMDataObject::processorType | ( | ) | const |
Returns the processor type.
std::string asdmbinaries::SDMDataObject::projectPath | ( | ) | const |
Returns the project path.
The project path is a string of the form "/<s>execBlockNum</s>/<s>scanNum</s>/<s>subscanNum</s>"
std::vector<std::string> asdmbinaries::SDMDataObject::projectPaths | ( | ) | const |
Returns the projects paths of all the data subsets present in this SDMDataObject.
unsigned int asdmbinaries::SDMDataObject::scanNum | ( | ) | const |
Returns the number of the scan.
void asdmbinaries::SDMDataObject::scanNum | ( | unsigned int | value | ) |
const SDMDataSubset& asdmbinaries::SDMDataObject::sdmDataSubset | ( | const std::string & | projectPath | ) | const |
Returns a reference to a SDMDataSubset given its projectPath.
projectPath | a string containing the project path of the SDMDataSubset. |
SDMDataObjectException. |
const std::vector<SDMDataSubset>& asdmbinaries::SDMDataObject::sdmDataSubsets | ( | ) | const |
Return all the SDMDataSubsets contained in this.
OptionalSpectralResolutionType asdmbinaries::SDMDataObject::spectralResolutionType | ( | ) | const |
Returns the spectral resolution.
Due to this optional nature, the spectral resolution type is not returned directly as a literal of the enumeration SpectralResolutionType, but as an instance of the class OptionalSpectralResolutionType. This instance can be queried to check if the spectral resolution type information is present and if it is its value as an SpectralResolutionType literal.
|
private |
unsigned long long asdmbinaries::SDMDataObject::startTime | ( | ) | const |
Returns the start time.
void asdmbinaries::SDMDataObject::startTime | ( | unsigned long long | value | ) |
unsigned int asdmbinaries::SDMDataObject::subscanNum | ( | ) | const |
Returns the number of the subscan.
void asdmbinaries::SDMDataObject::subscanNum | ( | int | value | ) |
std::string asdmbinaries::SDMDataObject::title | ( | ) | const |
Returns the title of the SDMDataObject.
void asdmbinaries::SDMDataObject::title | ( | const std::string & | value | ) |
std::string asdmbinaries::SDMDataObject::toString | ( | ) | const |
Returns a string representation of the global header of this SDMDataObject.
|
private |
Returns an XML representation of the global header of this SDMDataObject.
|
private |
|
private |
|
private |
const SDMDataSubset& asdmbinaries::SDMDataObject::tpDataSubset | ( | ) | const |
Returns the binary data for a subscan.
This method must be used only when the SDMDataObject contains total power data (i.e. isTP() == true)
void asdmbinaries::SDMDataObject::tpDataSubset | ( | const SDMDataSubset & | value | ) |
|
private |
|
friend |
Definition at line 329 of file SDMDataObject.h.
|
friend |
Definition at line 327 of file SDMDataObject.h.
|
friend |
Definition at line 325 of file SDMDataObject.h.
|
friend |
Definition at line 324 of file SDMDataObject.h.
|
friend |
Definition at line 326 of file SDMDataObject.h.
|
friend |
Definition at line 328 of file SDMDataObject.h.
|
staticprivate |
Definition at line 1161 of file SDMDataObject.h.
|
private |
Definition at line 1204 of file SDMDataObject.h.
|
private |
Definition at line 1207 of file SDMDataObject.h.
|
private |
Definition at line 1206 of file SDMDataObject.h.
|
staticprivate |
Definition at line 1159 of file SDMDataObject.h.
|
staticprivate |
Definition at line 1157 of file SDMDataObject.h.
|
private |
Definition at line 1170 of file SDMDataObject.h.
|
private |
Definition at line 1192 of file SDMDataObject.h.
|
staticprivate |
Definition at line 1156 of file SDMDataObject.h.
|
private |
Definition at line 1176 of file SDMDataObject.h.
|
private |
Definition at line 1198 of file SDMDataObject.h.
|
private |
Definition at line 1202 of file SDMDataObject.h.
|
private |
Definition at line 1178 of file SDMDataObject.h.
|
private |
Definition at line 1184 of file SDMDataObject.h.
|
private |
Definition at line 1182 of file SDMDataObject.h.
|
private |
Definition at line 1190 of file SDMDataObject.h.
|
private |
Definition at line 1180 of file SDMDataObject.h.
|
private |
Definition at line 1196 of file SDMDataObject.h.
|
private |
Definition at line 1186 of file SDMDataObject.h.
|
private |
Definition at line 1172 of file SDMDataObject.h.
|
private |
Definition at line 1194 of file SDMDataObject.h.
|
staticprivate |
Definition at line 1251 of file SDMDataObject.h.
|
private |
Definition at line 1174 of file SDMDataObject.h.
|
private |
Definition at line 1200 of file SDMDataObject.h.
|
private |
Definition at line 1188 of file SDMDataObject.h.
|
private |
Global header variables.
Definition at line 1168 of file SDMDataObject.h.
|
staticprivate |
Definition at line 1158 of file SDMDataObject.h.
|
private |
Is the SDMDataObject actually properly filled with valid data.
Definition at line 1165 of file SDMDataObject.h.