asdmbinaries::SDMDataObject Class Reference

SDMDataObject:: declarations. More...

#include <SDMDataObject.h>

List of all members.

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 ByteOrderbyteOrder () 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 DataStructdataStruct () 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 SDMDataSubsetsdmDataSubset (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 SDMDataSubsettpDataSubset () 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 ByteOrderbyteOrder_
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< SDMDataSubsetdataSubsets_
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

Detailed Description

SDMDataObject:: declarations.

A class to represent ALMA binary data. Three situations can be handled by this class:

At the time of writing:

Accessing the different parts of an SDMDataObject.

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.


Constructor & Destructor Documentation

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 
)

Member Function Documentation

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.

Returns:
a bool.
Exceptions:
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.

Returns:
a string.
Exceptions:
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.

Returns:
an unsigned long long.
Exceptions:
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.

Returns:
a pointer of a ByteOrder instance.
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)

Returns:
a reference to a vector of SDMDataSubset.
CorrelationMode asdmbinaries::SDMDataObject::correlationMode (  )  const

Returns the correlation mode.

Returns:
a value from enumeration CorrelationMode.
CorrelatorType asdmbinaries::SDMDataObject::correlatorType (  )  const

Returns the correlator type.

Returns:
a value from the enumeration CorrelatorType if processorType == CORRELATOR else an SDMDataObjectException is thrown.
Exceptions:
SDMDataException 
void asdmbinaries::SDMDataObject::dataOID ( const string &  value  ) 
string asdmbinaries::SDMDataObject::dataOID (  )  const

Returns the dataOID.

Returns:
a string.
void asdmbinaries::SDMDataObject::dataStruct ( const DataStruct dataStruct  ) 
const DataStruct& asdmbinaries::SDMDataObject::dataStruct (  )  const

Returns the structure of the data.

Returns:
a reference to a DataStruct.
void asdmbinaries::SDMDataObject::dataStructToXML ( ostringstream &  oss  )  [private]
void asdmbinaries::SDMDataObject::dimensionality ( unsigned int  value  )  [private]

Returns the "dimensionality" of this SDMDataObject.

A value of

  • 0 corresponds to total power data.
  • 1 corresponds to correlator data.
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.

Returns:
an unsigned int.
void asdmbinaries::SDMDataObject::execBlockUID ( const string &  value  ) 
string asdmbinaries::SDMDataObject::execBlockUID (  )  const

Returns the UID of the ExecBlock.

Returns:
a string.
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.

Parameters:
what,the string to be looked for in the title of this.
Returns:
true if and only if s is found in the title of this.
bool asdmbinaries::SDMDataObject::isCorrelation (  )  const

Returns true if the data are correlator data and false otherwise.

Returns:
a bool.
Note:
data are considered as correlator data if SpectralResolutionType != BASEBAND_WIDE.
bool asdmbinaries::SDMDataObject::isTP (  )  const

Returns true if the data are total power data and false otherwise.

Returns:
a bool.
Note:
data are considered as total power data if title contains the words "Total Power".
bool asdmbinaries::SDMDataObject::isWVR (  )  const

Returns true if the data are wvr data and false otherwise.

Returns:
a bool.
Note:
data are considered as WVR data if title contains the acronym "WVR".
void asdmbinaries::SDMDataObject::numAntenna ( unsigned int  value  ) 
unsigned int asdmbinaries::SDMDataObject::numAntenna (  )  const

Returns the number of antenna.

Returns:
an unsigned int.
void asdmbinaries::SDMDataObject::numTime ( unsigned int  value  ) 
unsigned int asdmbinaries::SDMDataObject::numTime (  )  const

Returns the number of (sub) integrations.

Returns:
an unsigned int.
void asdmbinaries::SDMDataObject::owns (  )  [private]

Declares itself as the owner of all its parts.

ProcessorType asdmbinaries::SDMDataObject::processorType (  )  const

Returns the processor type.

Returns:
a value from the enumeration ProcessorType.
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.

Returns:
a vector of string.
void asdmbinaries::SDMDataObject::scanNum ( unsigned int  value  ) 
unsigned int asdmbinaries::SDMDataObject::scanNum (  )  const

Returns the number of the scan.

Returns:
an unsigned int.
const SDMDataSubset& asdmbinaries::SDMDataObject::sdmDataSubset ( const string &  projectPath  )  const

Returns a reference to a SDMDataSubset given its projectPath.

Parameters:
projectPath a string containing the project path of the SDMDataSubset.
Returns:
a pointer to an SDMDataSubset.
Exceptions:
SDMDataObjectException. 
const vector<SDMDataSubset>& asdmbinaries::SDMDataObject::sdmDataSubsets (  )  const

Return all the SDMDataSubsets contained in this.

Returns:
a reference on the vector of SDMDataSubsets contained in this instance of SDMDataObject. It's the responsibility of the user to determine what's in the element(s) of this vector from what's returned by a call to the method hasPackedData. If packedData returns true then the vector contains only one element containing all the data (typically this happens for WVR data), conversely if it returns false then the vector may have more than one element and the data are distributed over the elements on the basis of one integration per element.
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.

Returns:
a value from enumeration SpectralResolutionType.
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.

Returns:
a long long.
void asdmbinaries::SDMDataObject::subscanNum ( int  value  ) 
unsigned int asdmbinaries::SDMDataObject::subscanNum (  )  const

Returns the number of the subscan.

Returns:
an unsigned int.
void asdmbinaries::SDMDataObject::title ( const string &  value  ) 
string asdmbinaries::SDMDataObject::title (  )  const

Returns the title of the SDMDataObject.

Returns:
a string.
string asdmbinaries::SDMDataObject::toString (  )  const

Returns a string representation of the global header of this SDMDataObject.

Returns:
a string.
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.

Returns:
a string.
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)

Returns:
a reference to an SDMDataSubset.
void asdmbinaries::SDMDataObject::updateIdImageSPW (  )  [private]

Friends And Related Function Documentation

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.


Member Data Documentation

const bool asdmbinaries::SDMDataObject::_init [static, private]

Definition at line 1184 of file SDMDataObject.h.

Definition at line 1227 of file SDMDataObject.h.

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.

Definition at line 1193 of file SDMDataObject.h.

Definition at line 1215 of file SDMDataObject.h.

vector<string> asdmbinaries::SDMDataObject::correlationModeRefs [static, private]

Definition at line 1179 of file SDMDataObject.h.

Definition at line 1199 of file SDMDataObject.h.

Definition at line 1221 of file SDMDataObject.h.

Definition at line 1225 of file SDMDataObject.h.

Definition at line 1201 of file SDMDataObject.h.

Definition at line 1207 of file SDMDataObject.h.

Definition at line 1205 of file SDMDataObject.h.

Definition at line 1213 of file SDMDataObject.h.

unsigned int asdmbinaries::SDMDataObject::numTime_ [private]

Definition at line 1203 of file SDMDataObject.h.

Definition at line 1219 of file SDMDataObject.h.

unsigned int asdmbinaries::SDMDataObject::scanNum_ [private]

Definition at line 1209 of file SDMDataObject.h.

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.

Definition at line 1197 of file SDMDataObject.h.

map<string, unsigned int> asdmbinaries::SDMDataObject::str2index_ [private]

Definition at line 1223 of file SDMDataObject.h.

Definition at line 1211 of file SDMDataObject.h.

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.

Is the SDMDataObject actually properly filled with valid data.

Definition at line 1188 of file SDMDataObject.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1