Ignore:
Timestamp:
03/06/06 10:55:24 (18 years ago)
Author:
mar637
Message:

fixed getEntry (wasnt passing reference)
added getRestFrequency()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMolecules.cpp

    r856 r870  
    9595}
    9696
    97 void STMolecules::getEntry( Double restfreq, String& name,
    98                             String& formattedname, uInt id )
     97void STMolecules::getEntry( Double& restfreq, String& name,
     98                            String& formattedname, uInt id ) const
    9999{
    100100  Table t = table_(table_.col("ID") == Int(id) );
     
    118118}
    119119
     120double asap::STMolecules::getRestFrequency( uInt id ) const
     121{
     122  Table t = table_(table_.col("ID") == Int(id) );
     123  if (t.nrow() == 0 ) {
     124    throw(AipsError("STMolecules::getRestFrequency - id out of range"));
     125  }
     126  ROTableRow row(t);
     127  const TableRecord& rec = row.get(0);
     128  return double(rec.asDouble("RESTFREQUENCY"));
     129}
     130
    120131
    121132}//namespace
Note: See TracChangeset for help on using the changeset viewer.