DataDescriptionsSet.h

Go to the documentation of this file.
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 
00163     Frequency         totBandwidth(unsigned int ndd) throw (Error); 
00164 
00173     unsigned int      numApc();
00174 
00185       Enum<AtmPhaseCorrection> atmPhaseCorrection(unsigned int atmPhaseCorrectionIndex);
00186 
00192      unsigned int atmPhaseCorrectionIndex(AtmPhaseCorrection apc) throw (Error);
00193 
00203     int               numAutoData(unsigned int ndd) throw (Error);
00204 
00211     unsigned int      numCrossData(unsigned int ndd) throw (Error);
00212 
00220      unsigned int     sumMetaDataIndex();
00221 
00228      unsigned int      metaDataIndex(unsigned int ndd)  throw (Error);
00229 
00243 /*     int               getBitSize(); */
00244 
00251     CorrelationMode   getCorrelationMode();
00252 
00256     unsigned int      getNumDataDescription();
00257 
00263     unsigned int      getNumChan(unsigned int ndd)  throw (Error);
00264 
00279     unsigned int       getNumPol(unsigned int bbIndex)  throw (Error);
00280 
00293     unsigned int      getNumPol(BasebandName bbName)  throw (Error);
00294 
00306     unsigned int      getNumSdPol(unsigned int bbIndex)  throw (Error);
00307 
00318     unsigned int      getNumSdPol(BasebandName bbName) throw(Error);
00319 
00328     unsigned int      getNdd(unsigned int bbIndex, unsigned int j)  throw (Error);
00329 
00337     unsigned int      getNdd(BasebandName bbName, unsigned int j)  throw (Error);
00338 
00344     unsigned int      getNumSpw(unsigned int bbIndex)  throw (Error);
00345 
00351     unsigned int      getNumSpw(BasebandName bbName);
00352 
00358     unsigned int      getDataDescriptionIndex( Tag dataDescriptionId)  throw (Error);
00359 
00385     unsigned long     getAutoSize();
00386 
00399     unsigned long     getCrossSize();
00400 
00408     unsigned long     getNumAutoData();
00409 
00414     unsigned long     getNumCrossData();
00415 
00426     unsigned long     getNumAutoData(Tag autoDataDescriptionId) throw (Error);
00427 
00428 
00436     unsigned long     getNumCrossData(Tag crossDataDescriptionId)  throw (Error);
00437 
00446     Tag               getAutoDataDescriptionId(Tag crossDataDescriptionId) throw (Error);
00447 
00452     vector<Tag>       getAutoDataDescriptionId();
00453 
00458     vector<Tag>       getCrossDataDescriptionId();
00459 
00460 
00461   protected:
00462     vector<Tag>                 v_dataDescriptionIdArray_;
00463 
00464     Enum<CorrelationMode>       e_cm_;                    
00465     CorrelationMode             correlationMode_;         
00466 
00467     EnumSet<AtmPhaseCorrection> es_apc_;                  
00468     vector<AtmPhaseCorrection>  v_atmPhaseCorrection_;    
00469     
00470     vector<unsigned int>        v_numPol_;                
00471     vector<Tag>                 v_spwId_;                 
00472     vector<unsigned int>        v_numChan_;               
00473     vector<BasebandName>        v_basebandName_;          
00474     vector<vector<int> >        vv_nsp_;                  
00475     map<BasebandName,vector<DataDescParams> > m_bn_v_ddp_; 
00476     map<Tag,BasebandName>       m_ddid_bbn_;              
00477     unsigned int                numApc_;                  
00478     unsigned int                numDataDescription_;      
00479 
00480     unsigned int                sumMetaDataIndex_;        
00481     unsigned long               sumAutoSize_;             
00482     unsigned long               sumCrossSize_;            
00483 
00484     vector<unsigned int>        v_metaDataIndex_;         
00485     vector<unsigned long>       v_cumulAutoSize_;         
00486     vector<unsigned long>       v_cumulCrossSize_;        
00487     vector<unsigned long>       v_numAutoData_;           
00488     vector<unsigned long>       v_numCrossData_;          
00489     vector<unsigned long>       v_autoSize_;              
00490     vector<unsigned long>       v_crossSize_;             
00491 
00492 
00493     vector<Tag>                 v_crossDataDescriptionId_;
00494     vector<Tag>                 v_autoDataDescriptionId_; 
00495     vector<bool>                v_pairDataDescriptionId_; 
00496 
00497 
00498     vector<BasebandName>        v_basebandSet_;           
00499     EnumSet<BasebandName>       e_basebandSet_;           
00500 
00501     vector<unsigned int>        v_numSpwPerBb_;           
00502 
00503   private:
00504     
00505     void                        size();                   // Method used by the constructor
00506     void                        metaDataIndex();          // Method used by the constructor
00507 
00508     void mapScToBaseband();                               // Method to map vectors of switchCycles to the basebandName.
00509   };
00510 
00511 }
00512 #define _DATADESCRIPTIONSSET_H
00513 #endif

Generated on Mon Sep 1 22:33:10 2008 for NRAOCASA by  doxygen 1.5.1