Changeset 19


Ignore:
Timestamp:
06/30/04 16:44:24 (20 years ago)
Author:
mmarquar
Message:

Added documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMemTable.h

    r18 r19  
    5050class SDMemTable {
    5151public:
     52  // create a new (empty) SDMemTable
    5253  SDMemTable();
     54  // create a SDMemTable from a )aips++) table on disk
    5355  SDMemTable(const std::string& name);
     56
     57  // Copy Construct a SDMemTable, if clear==True only header and
     58  // skeleton are copied, otherwise the whole table is copied.
    5459  SDMemTable(const SDMemTable& other, Bool clear=False);
    5560
     61  // Copy Construct a SDMemTable, give a scanid constraint
     62  // see also getScan()
    5663  SDMemTable(const Table& tab, Int scanID);
     64
    5765  virtual ~SDMemTable();
     66
     67  // put data from meta conatiner into the table
    5868  virtual bool putSDContainer(const SDContainer& sdc);
    5969  virtual bool putSDHeader(const SDHeader& sdh);
    6070  virtual bool putSDFreqTable(const SDFrequencyTable& sdft) {;}
    6171 
     72  // get spectrum,mask and tsys for the given row, at the selected
     73  // cursor
    6274  virtual std::vector<float> getSpectrum(Int whichRow) const;
    6375  virtual std::vector<bool> getMask(Int whichRow) const;
     76  virtual Float getTsys(Int whichRow) const;
     77
     78  // get info fro current row
     79  virtual Double getTime(Int whichRow) const ;
     80  virtual std::string getSourceName(Int whichRow) const;
    6481 
    65   MaskedArray<Float> rowAsMaskedArray(uInt whichRow,
    66                                       Bool useSelection = False);
    67 
    68   virtual Float getTsys(Int whichRow) const;
    69   virtual Double getTime(Int whichRow) const ;
    70   virtual std::string getSourceName(Int whichRow) const ;
    71  
     82  // set the current value
    7283  virtual bool setIF(Int whichIF=0);
    7384  virtual bool setBeam(Int whichBeam=0);
     
    7687  virtual bool setMask(const std::vector<int>& whichChans);
    7788 
    78 
     89  // return the currently selected values
    7990  virtual Int getIF() { return IFSel_; }
    8091  virtual Int getBeam() { return beamSel_; }
    8192  virtual Int getPol() { return polSel_; }   
    8293 
     94  // print a summary to stdout
    8395  virtual void summary() const;
    8496 
     97  // the (irrelevant) name
    8598  std::string name() const;
     99
     100  // write to disk as aips++ table
    86101  void makePersistent(const std::string& filename);
     102
     103  // get a new SDMemTable containg all rows with the same give SCANID
    87104  SDMemTable getScan(Int scanID);
    88105
    89106  const TableRecord& getHeader() const {;}
     107  // get a handle to the "raw" aips++ table
    90108  const Table& table() { return table_; }
    91109
     110  // return the number of values
    92111  Int nBeam() const;
    93112  Int nIF() const;
     
    95114  Int nChan() const;
    96115
     116  // return a row as a Masked array, internally converting uChar flags
     117  // to bool mask
     118  MaskedArray<Float> rowAsMaskedArray(uInt whichRow,
     119                                      Bool useSelection = False);
     120
    97121private:
     122  // set up tabel structure
    98123  void setup();
    99 
     124  // the current cursor into the array
    100125  Int IFSel_,beamSel_,polSel_;
    101   std::vector<bool> chanMask_;
     126  std::vector<bool> chanMask_; 
    102127  String name_;
     128  // the unerlying memory table
    103129  Table table_;
    104130};
Note: See TracChangeset for help on using the changeset viewer.