Changeset 839 for trunk/src


Ignore:
Timestamp:
02/23/06 11:20:02 (19 years ago)
Author:
mar637
Message:

added getEntry to retrieve data by id

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STFocus.cpp

    r807 r839  
    7777}
    7878
     79void asap::STFocus::getEntry( Float& rotation, Float& angle, Float& ftan,
     80                              uInt id)
     81{
     82  Table t = table_(table_.col("ID") == Int(id) );
     83  if (t.nrow() == 0 ) {
     84    throw(AipsError("STFocus::getEntry - id out of range"));
     85  }
     86  ROTableRow row(t);
     87  // get first row - there should only be one matching id
     88  const TableRecord& rec = row.get(0);
     89  rotation = rec.asFloat("ROTATION");
     90  angle = rec.asFloat("ANGLE");
     91  ftan = rec.asFloat("TAN");
    7992}
     93
     94}
  • trunk/src/STFocus.h

    r807 r839  
    3636                       casa::Float ftan);
    3737
     38  void getEntry( casa::Float& rotation, casa::Float& angle,
     39                       casa::Float& ftan, casa::uInt id);
     40
    3841private:
    3942  void setup();
Note: See TracChangeset for help on using the changeset viewer.