Changeset 996 for trunk/src/STWriter.cpp


Ignore:
Timestamp:
04/06/06 13:45:58 (18 years ago)
Author:
mar637
Message:

more fixes after compiling with -Wall.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STWriter.cpp

    r988 r996  
    141141  Int status;
    142142  Bool havexpol = Bool(in->npol() > 2);
    143   if (status = writer_->create(filename, hdr.observer, hdr.project,
     143  status = writer_->create(filename, hdr.observer, hdr.project,
    144144                               hdr.antennaname, hdr.antennaposition,
    145145                               hdr.obstype, hdr.equinox, hdr.freqref,
    146                                nChan, nPol, False, havexpol)) {
     146                               nChan, nPol, False, havexpol);
     147  if ( status ) {
    147148    throw(AipsError("Failed to create output file"));
    148149  }
     
    214215          Vector<Float>   sigma(npol, 0.0f);
    215216          Vector<Float>   calFctr(npol, 0.0f);
    216           if (status = writer_->write(scanno, cycno, rec.asDouble("TIME"),
     217          status = writer_->write(scanno, cycno, rec.asDouble("TIME"),
    217218                                      rec.asDouble("INTERVAL"),
    218219                                      rec.asString("FIELDNAME"),
     
    239240                                      specs, flags,
    240241                                      xCalFctr,//
    241                                       xpol)
    242                                       ) {
     242                                      xpol);
     243          if ( status ) {
    243244            writer_->close();
    244245            throw(AipsError("STWriter: Failed to export Scantable."));
     
    281282                              Vector< Complex > & xpol, const Table & tab )
    282283{
    283   TableRow row(tab);
    284284  String poltype = tab.keywordSet().asString("POLTYPE");
    285285  if ( poltype != "linear") {
     
    287287    throw(AipsError(msg));
    288288  }
    289   // use the first row to fill in all the "metadata"
    290   const TableRecord& rec = row.get(0);
    291289  ROArrayColumn<Float> specCol(tab, "SPECTRA");
    292290  ROArrayColumn<uChar> flagCol(tab, "FLAGTRA");
Note: See TracChangeset for help on using the changeset viewer.