Ignore:
Timestamp:
01/31/13 18:55:29 (11 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-4770

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: test_sdcal2

Put in Release Notes: No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Replace assert with casa::assert_ to avoid aborting casapy session.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/CalibrationManager.cpp

    r2750 r2756  
    1414#include <casa/Arrays/Vector.h>
    1515#include <casa/Exceptions/Error.h>
     16#include <casa/Utilities/Assert.h>
    1617#include <casa/Utilities/Regex.h>
    1718#include <casa/BasicSL/String.h>
     
    150151  os_.origin(LogOrigin("CalibrationManager","calibrate",WHERE));
    151152  os_ << LogIO::DEBUGGING << "start calibration with mode " << calmode_ << "." << LogIO::POST;
    152   assert(!target_.null());
     153  //assert(!target_.null());
     154  assert_<AipsError>(!target_.null(), "You have to set target scantable first.");
    153155  if (calmode_ == "TSYS") {
    154     assert(spwlist_.size() > 0);
     156    //assert(spwlist_.size() > 0);
     157    assert_<AipsError>(spwlist_.size() > 0, "You have to set list of IFNOs for ATM calibration.");
    155158    STCalTsys cal(target_, spwlist_);
    156159    cal.calibrate();
     
    198201  os_.origin(LogOrigin("CalibrationManager","saveCaltable",WHERE));
    199202  if (calmode_ == "TSYS") {
    200     assert(tsystables_.size() > 0);
     203    //assert(tsystables_.size() > 0);
     204    assert_<AipsError>(tsystables_.size() > 0, "Tsys table list is empty.");
    201205    os_ << LogIO::DEBUGGING << "save latest STCalTsysTable as " << name << "." << LogIO::POST;
    202206    tsystables_[tsystables_.size()-1]->save(name);
    203207  }
    204208  else {
    205     assert(skytables_.size() > 0);
     209    //assert(skytables_.size() > 0);
     210    assert_<AipsError>(skytables_.size() > 0, "Sky table list is empty.");
    206211    os_ << LogIO::DEBUGGING << "save latest STCalSkyTable as " << name << "." << LogIO::POST;
    207212    skytables_[skytables_.size()-1]->save(name);
Note: See TracChangeset for help on using the changeset viewer.