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 string &dataOID, unsigned int dimensionality, const string &execBlockUID, unsigned int execBlockNum, unsigned int scanNum, unsigned int subscanNum, unsigned int numAntenna, CorrelationMode correlatorMode, const SDMDataObject::DataStruct &dataStruct) | |
SDMDataObject (unsigned long long startTime, const string &dataOID, unsigned int dimensionality, unsigned int numTime, const string &execBlockUID, unsigned int execBlockNum, unsigned int scanNum, unsigned int subscanNum, unsigned int numAntenna, const SDMDataObject::DataStruct &dataStruct) | |
string | title () const |
Returns the title of the SDMDataObject. | |
void | title (const string &value) |
const ByteOrder * | byteOrder () const |
Returns the byte order of the binary parts. | |
unsigned long long | startTime () const |
Returns the start time. | |
void | startTime (unsigned long long value) |
unsigned int | numTime () const |
Returns the number of (sub) integrations. | |
void | numTime (unsigned int value) |
string | dataOID () const |
Returns the dataOID. | |
void | dataOID (const string &value) |
string | execBlockUID () const |
Returns the UID of the ExecBlock. | |
void | execBlockUID (const string &value) |
unsigned int | execBlockNum () const |
Returns the number of the ExecBlock. | |
void | execBlockNum (unsigned int value) |
unsigned int | scanNum () const |
Returns the number of the scan. | |
void | scanNum (unsigned int value) |
unsigned int | subscanNum () const |
Returns the number of the subscan. | |
void | subscanNum (int value) |
string | projectPath () const |
Returns the project path. | |
vector< string > | projectPaths () const |
Returns the projects paths of all the data subsets present in this SDMDataObject. | |
unsigned int | numAntenna () const |
Returns the number of antenna. | |
void | numAntenna (unsigned int value) |
CorrelationMode | correlationMode () const |
Returns the correlation mode. | |
OptionalSpectralResolutionType | spectralResolutionType () const |
Returns the spectral resolution. | |
ProcessorType | processorType () const |
Returns the processor type. | |
CorrelatorType | correlatorType () const |
Returns the correlator type. | |
bool | isTP () const |
Returns true if the data are total power data and false otherwise. | |
bool | isWVR () const |
Returns true if the data are wvr data and false otherwise. | |
bool | isCorrelation () const |
Returns true if the data are correlator data and false otherwise. | |
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. | |
const DataStruct & | dataStruct () const |
Returns the structure of the data. | |
void | dataStruct (const DataStruct &dataStruct) |
const vector< SDMDataSubset > & | sdmDataSubsets () const |
Return all the SDMDataSubsets contained in this. | |
const vector< SDMDataSubset > & | corrDataSubsets () const |
Returns the binary data as a sequence of integrations. | |
void | corrDataSubsets (const vector< SDMDataSubset > &value) |
const SDMDataSubset & | sdmDataSubset (const string &projectPath) const |
Returns a reference to a SDMDataSubset given its projectPath. | |
bool | aborted () const |
Returns true if the observation has been aborted. | |
unsigned long long | abortTime () const |
Returns the time, as an unsigned long long, at which the observation has been aborted. | |
string | abortReason () const |
Returns the reason, as a string, why the observation has been aborted. | |
const SDMDataSubset & | tpDataSubset () const |
Returns the binary data for a subscan. | |
void | tpDataSubset (const SDMDataSubset &value) |
string | toString () const |
Returns a string representation of the global header of this SDMDataObject. | |
void | done () |
Makes this SDMDataObject unusable. | |
unsigned int | dimensionality () const |
Dimensionality of the binary content. | |
Private Member Functions | |
void | append (const SDMDataSubset &value) |
void | dimensionality (unsigned int value) |
Returns the "dimensionality" of this SDMDataObject. | |
bool | inTitle (const std::string &what) const |
Returns true is the string passed as an argument is found in the title of this. | |
void | owns () |
Declares itself as the owner of all its parts. | |
string | toXML () |
Returns an XML representation of the global header of this SDMDataObject. | |
void | toXML (const BinaryPart &binaryPart, const string &elementName, ostringstream &oss) const |
void | toXML (const AutoDataBinaryPart &autoDataBinaryPart, const string &elementName, ostringstream &oss) const |
void | toXML (const ZeroLagsBinaryPart &zeroLagsBinaryPart, const string &elementName, ostringstream &oss) const |
void | spectralWindowsToXML (const vector< Baseband > &basebands, unsigned int ibb, ostringstream &oss) const |
void | basebandsToXML (ostringstream &oss) const |
void | dataStructToXML (ostringstream &oss) |
void | updateIdImageSPW () |
Static Private Member Functions | |
static bool | init () |
Private Attributes | |
bool | valid_ |
Is the SDMDataObject actually properly filled with valid data. | |
string | title_ |
Global header variables. | |
const ByteOrder * | byteOrder_ |
int | schemaVersion_ |
long long | startTime_ |
string | dataOID_ |
unsigned int | dimensionality_ |
unsigned int | numTime_ |
string | execBlockUID_ |
unsigned int | execBlockNum_ |
unsigned int | scanNum_ |
unsigned int | subscanNum_ |
unsigned int | numAntenna_ |
CorrelationMode | correlationMode_ |
OptionalSpectralResolutionType | spectralResolutionType_ |
ProcessorType | processorType_ |
DataStruct | dataStruct_ |
map< string, unsigned int > | str2index_ |
vector< SDMDataSubset > | dataSubsets_ |
bool | aborted_ |
unsigned long long int | abortTime_ |
string | abortReason_ |
Static Private Attributes | |
static vector< string > | correlationModeRefs |
static vector< string > | axes |
static vector< string > | types |
static vector< string > | apcs |
static const bool | _init |
static const 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:
At the time of writing:
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).
Total Power (TP) data (isTP() returns true) are stored like Correlator data i.e in a sequence of SDMDataSubsets (hasPackedData() returns false) or for TP data recorded before Cycle 3 in a SDMDataObject containing the global header followed by one unique SDMDataSubset containing the data recorded during the whole subscan (hasPackedData() returns true).
WVR data (isWVR() returns true) are stored in an SDMDataObject organized as one global header followed by one unique SDMDataSubset containing the data recorded during the whole subscan (hasPackedData() returns true).
instance of an SDMDataObject is never created explicitely by calling some constructors or setters methods. Instances of SDMDataObject are rather created implicitely :
We give here a quick list of the method which allows to retrieve the different parts of an SDMDataObject :
Definition at line 346 of file SDMDataObject.h.
asdmbinaries::SDMDataObject::SDMDataObject | ( | ) |
asdmbinaries::SDMDataObject::SDMDataObject | ( | unsigned long long | startTime, | |
const string & | dataOID, | |||
unsigned int | dimensionality, | |||
const string & | execBlockUID, | |||
unsigned int | execBlockNum, | |||
unsigned int | scanNum, | |||
unsigned int | subscanNum, | |||
unsigned int | numAntenna, | |||
CorrelationMode | correlatorMode, | |||
const SDMDataObject::DataStruct & | dataStruct | |||
) |
asdmbinaries::SDMDataObject::SDMDataObject | ( | unsigned long long | startTime, | |
const string & | dataOID, | |||
unsigned int | dimensionality, | |||
unsigned int | numTime, | |||
const 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. |
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 |
void asdmbinaries::SDMDataObject::append | ( | const SDMDataSubset & | value | ) | [private] |
void asdmbinaries::SDMDataObject::basebandsToXML | ( | ostringstream & | oss | ) | const [private] |
const ByteOrder* asdmbinaries::SDMDataObject::byteOrder | ( | ) | const |
Returns the byte order of the binary parts.
void asdmbinaries::SDMDataObject::corrDataSubsets | ( | const vector< SDMDataSubset > & | value | ) |
const 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)
CorrelationMode asdmbinaries::SDMDataObject::correlationMode | ( | ) | const |
Returns the correlation mode.
CorrelatorType asdmbinaries::SDMDataObject::correlatorType | ( | ) | const |
Returns the correlator type.
SDMDataException |
void asdmbinaries::SDMDataObject::dataOID | ( | const string & | value | ) |
string asdmbinaries::SDMDataObject::dataOID | ( | ) | const |
Returns the dataOID.
void asdmbinaries::SDMDataObject::dataStruct | ( | const DataStruct & | dataStruct | ) |
const DataStruct& asdmbinaries::SDMDataObject::dataStruct | ( | ) | const |
Returns the structure of the data.
void asdmbinaries::SDMDataObject::dataStructToXML | ( | ostringstream & | oss | ) | [private] |
void asdmbinaries::SDMDataObject::dimensionality | ( | unsigned int | value | ) | [private] |
Returns the "dimensionality" of this SDMDataObject.
A value of
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.
void asdmbinaries::SDMDataObject::done | ( | ) |
Makes this SDMDataObject unusable.
After a call to this method any request to this instance will generate an exception.
void asdmbinaries::SDMDataObject::execBlockNum | ( | unsigned int | value | ) |
unsigned int asdmbinaries::SDMDataObject::execBlockNum | ( | ) | const |
Returns the number of the ExecBlock.
void asdmbinaries::SDMDataObject::execBlockUID | ( | const string & | value | ) |
string asdmbinaries::SDMDataObject::execBlockUID | ( | ) | const |
Returns the UID of the ExecBlock.
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"
static bool asdmbinaries::SDMDataObject::init | ( | ) | [static, private] |
bool asdmbinaries::SDMDataObject::inTitle | ( | const std::string & | what | ) | const [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.
void asdmbinaries::SDMDataObject::numAntenna | ( | unsigned int | value | ) |
unsigned int asdmbinaries::SDMDataObject::numAntenna | ( | ) | const |
Returns the number of antenna.
void asdmbinaries::SDMDataObject::numTime | ( | unsigned int | value | ) |
unsigned int asdmbinaries::SDMDataObject::numTime | ( | ) | const |
Returns the number of (sub) integrations.
void asdmbinaries::SDMDataObject::owns | ( | ) | [private] |
Declares itself as the owner of all its parts.
ProcessorType asdmbinaries::SDMDataObject::processorType | ( | ) | const |
Returns the processor type.
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>"
vector<string> asdmbinaries::SDMDataObject::projectPaths | ( | ) | const |
Returns the projects paths of all the data subsets present in this SDMDataObject.
void asdmbinaries::SDMDataObject::scanNum | ( | unsigned int | value | ) |
unsigned int asdmbinaries::SDMDataObject::scanNum | ( | ) | const |
Returns the number of the scan.
const SDMDataSubset& asdmbinaries::SDMDataObject::sdmDataSubset | ( | const string & | projectPath | ) | const |
Returns a reference to a SDMDataSubset given its projectPath.
projectPath | a string containing the project path of the SDMDataSubset. |
SDMDataObjectException. |
const 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.
void asdmbinaries::SDMDataObject::spectralWindowsToXML | ( | const vector< Baseband > & | basebands, | |
unsigned int | ibb, | |||
ostringstream & | oss | |||
) | const [private] |
void asdmbinaries::SDMDataObject::startTime | ( | unsigned long long | value | ) |
unsigned long long asdmbinaries::SDMDataObject::startTime | ( | ) | const |
Returns the start time.
void asdmbinaries::SDMDataObject::subscanNum | ( | int | value | ) |
unsigned int asdmbinaries::SDMDataObject::subscanNum | ( | ) | const |
Returns the number of the subscan.
void asdmbinaries::SDMDataObject::title | ( | const string & | value | ) |
string asdmbinaries::SDMDataObject::title | ( | ) | const |
Returns the title of the SDMDataObject.
string asdmbinaries::SDMDataObject::toString | ( | ) | const |
Returns a string representation of the global header of this SDMDataObject.
void asdmbinaries::SDMDataObject::toXML | ( | const ZeroLagsBinaryPart & | zeroLagsBinaryPart, | |
const string & | elementName, | |||
ostringstream & | oss | |||
) | const [private] |
void asdmbinaries::SDMDataObject::toXML | ( | const AutoDataBinaryPart & | autoDataBinaryPart, | |
const string & | elementName, | |||
ostringstream & | oss | |||
) | const [private] |
void asdmbinaries::SDMDataObject::toXML | ( | const BinaryPart & | binaryPart, | |
const string & | elementName, | |||
ostringstream & | oss | |||
) | const [private] |
string asdmbinaries::SDMDataObject::toXML | ( | ) | [private] |
Returns an XML representation of the global header of this SDMDataObject.
void asdmbinaries::SDMDataObject::tpDataSubset | ( | const SDMDataSubset & | value | ) |
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::updateIdImageSPW | ( | ) | [private] |
friend class CorrSubsetHeaderParser [friend] |
Definition at line 352 of file SDMDataObject.h.
friend class HeaderParser [friend] |
Definition at line 350 of file SDMDataObject.h.
friend class SDMDataObjectReader [friend] |
Definition at line 348 of file SDMDataObject.h.
friend class SDMDataObjectStreamReader [friend] |
Definition at line 347 of file SDMDataObject.h.
friend class SDMDataObjectWriter [friend] |
Definition at line 349 of file SDMDataObject.h.
friend class SDMDataSubset [friend] |
Definition at line 351 of file SDMDataObject.h.
const bool asdmbinaries::SDMDataObject::_init [static, private] |
Definition at line 1184 of file SDMDataObject.h.
bool asdmbinaries::SDMDataObject::aborted_ [private] |
Definition at line 1227 of file SDMDataObject.h.
string asdmbinaries::SDMDataObject::abortReason_ [private] |
Definition at line 1230 of file SDMDataObject.h.
unsigned long long int asdmbinaries::SDMDataObject::abortTime_ [private] |
Definition at line 1229 of file SDMDataObject.h.
vector<string> asdmbinaries::SDMDataObject::apcs [static, private] |
Definition at line 1182 of file SDMDataObject.h.
vector<string> asdmbinaries::SDMDataObject::axes [static, private] |
Definition at line 1180 of file SDMDataObject.h.
const ByteOrder* asdmbinaries::SDMDataObject::byteOrder_ [private] |
Definition at line 1193 of file SDMDataObject.h.
CorrelationMode asdmbinaries::SDMDataObject::correlationMode_ [private] |
Definition at line 1215 of file SDMDataObject.h.
vector<string> asdmbinaries::SDMDataObject::correlationModeRefs [static, private] |
Definition at line 1179 of file SDMDataObject.h.
string asdmbinaries::SDMDataObject::dataOID_ [private] |
Definition at line 1199 of file SDMDataObject.h.
Definition at line 1221 of file SDMDataObject.h.
vector<SDMDataSubset> asdmbinaries::SDMDataObject::dataSubsets_ [private] |
Definition at line 1225 of file SDMDataObject.h.
unsigned int asdmbinaries::SDMDataObject::dimensionality_ [private] |
Definition at line 1201 of file SDMDataObject.h.
unsigned int asdmbinaries::SDMDataObject::execBlockNum_ [private] |
Definition at line 1207 of file SDMDataObject.h.
string asdmbinaries::SDMDataObject::execBlockUID_ [private] |
Definition at line 1205 of file SDMDataObject.h.
unsigned int asdmbinaries::SDMDataObject::numAntenna_ [private] |
Definition at line 1213 of file SDMDataObject.h.
unsigned int asdmbinaries::SDMDataObject::numTime_ [private] |
Definition at line 1203 of file SDMDataObject.h.
ProcessorType asdmbinaries::SDMDataObject::processorType_ [private] |
Definition at line 1219 of file SDMDataObject.h.
unsigned int asdmbinaries::SDMDataObject::scanNum_ [private] |
Definition at line 1209 of file SDMDataObject.h.
int asdmbinaries::SDMDataObject::schemaVersion_ [private] |
Definition at line 1195 of file SDMDataObject.h.
Definition at line 1217 of file SDMDataObject.h.
const regex asdmbinaries::SDMDataObject::SPWID [static, private] |
Definition at line 1273 of file SDMDataObject.h.
long long asdmbinaries::SDMDataObject::startTime_ [private] |
Definition at line 1197 of file SDMDataObject.h.
map<string, unsigned int> asdmbinaries::SDMDataObject::str2index_ [private] |
Definition at line 1223 of file SDMDataObject.h.
unsigned int asdmbinaries::SDMDataObject::subscanNum_ [private] |
Definition at line 1211 of file SDMDataObject.h.
string asdmbinaries::SDMDataObject::title_ [private] |
Global header variables.
Definition at line 1191 of file SDMDataObject.h.
vector<string> asdmbinaries::SDMDataObject::types [static, private] |
Definition at line 1181 of file SDMDataObject.h.
bool asdmbinaries::SDMDataObject::valid_ [private] |
Is the SDMDataObject actually properly filled with valid data.
Definition at line 1188 of file SDMDataObject.h.