Changeset 830 for trunk/src/STMolecules.cpp
- Timestamp:
- 02/17/06 15:49:59 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STMolecules.cpp
r809 r830 78 78 } 79 79 80 void 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"); 80 93 } 94 95 } //namespace
Note: See TracChangeset
for help on using the changeset viewer.