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/STWeather.cpp

    r811 r830  
    8282}
    8383
     84void STWeather::getEntry( Float& temperature, Float& pressure,
     85                          Float& humidity, Float& windspeed, Float& windaz,
     86                          uInt id )
     87{
     88  Table t = table_(table_.col("ID") == Int(id) );
     89  if (t.nrow() == 0 ) {
     90    throw(AipsError("STWeather::getEntry - id out of range"));
     91  }
     92  ROTableRow row(t);
     93  // get first row - there should only be one matching id
     94  const TableRecord& rec = row.get(0);
     95  temperature = rec.asFloat("TEMPERATURE");
     96  pressure = rec.asDouble("PRESSURE");
     97  humidity = rec.asDouble("HUMIDITY");
     98  windspeed = rec.asDouble("WINDSPEED");
     99  windaz = rec.asDouble("WINDAZ");
    84100}
     101
     102}
     103
Note: See TracChangeset for help on using the changeset viewer.