Ignore:
Timestamp:
02/17/06 15:49:59 (18 years ago)
Author:
mar637
Message:

added getEntry to support export for STWriter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMolecules.cpp

    r809 r830  
    7878}
    7979
     80void STMolecules::getEntry( Double restfreq, String& name,
     81                            String& formattedname, uInt id )
     82{
     83  Table t = table_(table_.col("ID") == Int(id) );
     84  if (t.nrow() == 0 ) {
     85    throw(AipsError("STMolecules::getEntry - id out of range"));
     86  }
     87  ROTableRow row(t);
     88  // get first row - there should only be one matching id
     89  const TableRecord& rec = row.get(0);
     90  restfreq = rec.asDouble("RESTFREQUENCY");
     91  name = rec.asString("NAME");
     92  formattedname = rec.asString("FORMATTEDNAME");
    8093}
     94
     95} //namespace
Note: See TracChangeset for help on using the changeset viewer.