casa
$Rev:20696$
|
00001 #if !defined(_DATADESCRIPTIONSSET_H) 00002 00003 #include <vector> 00004 #include <set> 00005 #include <map> 00006 00007 #include <AtmPhaseCorrection.h> 00008 #include <CorrelationMode.h> 00009 #include <SidebandProcessingMode.h> 00010 00011 #include "ASDMEntities.h" 00012 #include "SwitchCyclesList.h" 00013 //#include "DataBlock.h" 00014 00015 using namespace std; 00016 using namespace asdm; 00017 00018 namespace sdmbin { 00019 00020 struct DataDescParams { 00021 unsigned int ddIdx; 00022 Tag scId; 00023 Tag spwId; 00024 Tag polId; 00025 unsigned int numChan; 00026 unsigned int numCorr; 00027 unsigned int numBin; 00028 }; 00029 00030 00034 class DataDescriptionsSet : public SwitchCyclesList 00035 { 00036 public: 00037 00038 DataDescriptionsSet(); 00039 00060 DataDescriptionsSet( ASDM* const datasetPtr, vector<Tag> v_switchCycleId, 00061 vector<Tag> v_dataDescriptionId, 00062 CorrelationMode corrMode, vector<AtmPhaseCorrection> atmPhaseCodes); 00063 00083 DataDescriptionsSet( vector<int> v_switchCycleId, 00084 vector<int> v_dataDescriptionId, 00085 CorrelationMode corrMode, vector<AtmPhaseCorrection> atmPhaseCodes); 00086 00088 DataDescriptionsSet(const DataDescriptionsSet &); 00089 00093 virtual ~DataDescriptionsSet(); 00094 00100 BasebandName getBasebandName(unsigned int ndd) ; // throw (Error); 00101 00107 unsigned int getBasebandIndex(unsigned int ndd) ; // throw (Error); 00108 00112 unsigned int numBaseband(); 00113 00120 unsigned int numBin(unsigned int ndd) ; // throw (Error); 00121 00135 unsigned int numPol(unsigned int ndd) ; // throw (Error); 00136 00147 unsigned int numSdPol(unsigned int ndd) ; // throw (Error); 00148 00155 unsigned int numChan(unsigned int ndd) ; // throw (Error); 00156 00162 Tag getSpwId(unsigned int ndd) ; // throw (Error); 00163 00170 Frequency totBandwidth(unsigned int ndd) ; // throw (Error); 00171 00180 unsigned int numApc(); 00181 00192 Enum<AtmPhaseCorrection> atmPhaseCorrection(unsigned int atmPhaseCorrectionIndex); 00193 00199 unsigned int atmPhaseCorrectionIndex(AtmPhaseCorrection apc) ; // throw (Error); 00200 00210 int numAutoData(unsigned int ndd) ; // throw (Error); 00211 00218 unsigned int numCrossData(unsigned int ndd) ; // throw (Error); 00219 00227 unsigned int sumMetaDataIndex(); 00228 00235 unsigned int metaDataIndex(unsigned int ndd) ; // throw (Error); 00236 00250 /* int getBitSize(); */ 00251 00258 CorrelationMode getCorrelationMode(); 00259 00263 unsigned int getNumDataDescription(); 00264 00270 unsigned int getNumChan(unsigned int ndd) ; // throw (Error); 00271 00286 unsigned int getNumPol(unsigned int bbIndex) ; // throw (Error); 00287 00300 unsigned int getNumPol(BasebandName bbName) ; // throw (Error); 00301 00313 unsigned int getNumSdPol(unsigned int bbIndex) ; // throw (Error); 00314 00325 unsigned int getNumSdPol(BasebandName bbName) ; // throw(Error); 00326 00335 unsigned int getNdd(unsigned int bbIndex, unsigned int j) ; // throw (Error); 00336 00344 unsigned int getNdd(BasebandName bbName, unsigned int j) ; // throw (Error); 00345 00351 unsigned int getNumSpw(unsigned int bbIndex) ; // throw (Error); 00352 00358 unsigned int getNumSpw(BasebandName bbName); 00359 00365 unsigned int getDataDescriptionIndex( Tag dataDescriptionId) ; // throw (Error); 00366 00392 unsigned long getAutoSize(); 00393 00406 unsigned long getCrossSize(); 00407 00415 unsigned long getNumAutoData(); 00416 00421 unsigned long getNumCrossData(); 00422 00433 unsigned long getNumAutoData(Tag autoDataDescriptionId) ; // throw (Error); 00434 00435 00443 unsigned long getNumCrossData(Tag crossDataDescriptionId) ; // throw (Error); 00444 00453 Tag getAutoDataDescriptionId(Tag crossDataDescriptionId) ; // throw (Error); 00454 00459 vector<Tag> getAutoDataDescriptionId(); 00460 00465 vector<Tag> getCrossDataDescriptionId(); 00466 00467 00468 protected: 00469 vector<Tag> v_dataDescriptionIdArray_; 00470 00471 Enum<CorrelationMode> e_cm_; 00472 CorrelationMode correlationMode_; 00473 00474 EnumSet<AtmPhaseCorrection> es_apc_; 00475 vector<AtmPhaseCorrection> v_atmPhaseCorrection_; 00476 00477 vector<unsigned int> v_numPol_; 00478 vector<Tag> v_spwId_; 00479 vector<unsigned int> v_numChan_; 00480 vector<BasebandName> v_basebandName_; 00481 vector<vector<int> > vv_nsp_; 00482 map<BasebandName,vector<DataDescParams> > m_bn_v_ddp_; 00483 map<Tag,BasebandName> m_ddid_bbn_; 00484 unsigned int numApc_; 00485 unsigned int numDataDescription_; 00486 00487 unsigned int sumMetaDataIndex_; 00488 unsigned long sumAutoSize_; 00489 unsigned long sumCrossSize_; 00490 00491 vector<unsigned int> v_metaDataIndex_; 00492 vector<unsigned long> v_cumulAutoSize_; 00493 vector<unsigned long> v_cumulCrossSize_; 00494 vector<unsigned long> v_numAutoData_; 00495 vector<unsigned long> v_numCrossData_; 00496 vector<unsigned long> v_autoSize_; 00497 vector<unsigned long> v_crossSize_; 00498 00499 00500 vector<Tag> v_crossDataDescriptionId_; 00501 vector<Tag> v_autoDataDescriptionId_; 00502 vector<bool> v_pairDataDescriptionId_; 00503 00504 00505 vector<BasebandName> v_basebandSet_; 00506 EnumSet<BasebandName> e_basebandSet_; 00507 00508 vector<unsigned int> v_numSpwPerBb_; 00509 00510 private: 00511 00512 void size(); // Method used by the constructor 00513 void metaDataIndex(); // Method used by the constructor 00514 00515 void mapScToBaseband(); // Method to map vectors of switchCycles to the basebandName. 00516 }; 00517 00518 } 00519 #define _DATADESCRIPTIONSSET_H 00520 #endif