Changeset 2596 for branches/hpc34


Ignore:
Timestamp:
07/11/12 17:22:53 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

LogIO instance is created when it is needed.


Location:
branches/hpc34/external-alma/atnf/PKSIO
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/hpc34/external-alma/atnf/PKSIO/NRODataset.cc

    r2590 r2596  
    5858NRODataset::NRODataset( string name )
    5959{
    60   LogIO os( LogOrigin( "NRODataset", "NRODataset()", WHERE ) ) ;
    61 
    6260  // memory allocation
    6361  initialize() ;
     
    243241NRODataRecord *NRODataset::getRecord( int i )
    244242{
    245   LogIO os( LogOrigin( "NRODataset", "getRecord()", WHERE ) ) ;
    246 
    247243  // DEBUG
    248244  //cout << "NRODataset::getRecord()  Start " << i << endl ;
    249245  //
    250246  if ( i < 0 || i >= rowNum_ ) {
     247    LogIO os( LogOrigin( "NRODataset", "getRecord()", WHERE ) ) ;
    251248    //cerr << "NRODataset::getRecord()  data index out of range." << endl ;
    252249    os << LogIO::SEVERE << "data index " << i << " out of range. return NULL." << LogIO::POST ;
     
    267264  }
    268265  else {
     266    LogIO os( LogOrigin( "NRODataset", "getRecord()", WHERE ) ) ;
    269267    //cerr << "NRODataset::getRecord()  error while reading data " << i << endl ;
    270268    os << LogIO::SEVERE << "error while reading data " << i << ". return NULL." << LogIO::POST ;
     
    278276int NRODataset::fillRecord( int i )
    279277{
    280   LogIO os( LogOrigin( "NRODataset", "fillRecord()", WHERE ) ) ;
    281 
    282278  int status = 0 ;
    283279
     
    295291  if ( (int)fread( record_, 1, SCAN_HEADER_SIZE, fp_ ) != SCAN_HEADER_SIZE ) {
    296292    //cerr << "Failed to read scan header: " << i << endl ;
     293    LogIO os( LogOrigin( "NRODataset", "fillRecord()", WHERE ) ) ;
    297294    os << LogIO::SEVERE << "Failed to read scan header for " << i << "th row." << LogIO::POST ;
    298295    return -1 ;
     
    300297  if ( (int)fread( record_->LDATA, 1, dataLen_, fp_ ) != dataLen_ ) {
    301298    //cerr << "Failed to read spectral data: " << i << endl ;
     299    LogIO os( LogOrigin( "NRODataset", "fillRecord()", WHERE ) ) ;
    302300    os << LogIO::SEVERE << "Failed to read spectral data for " << i << "th row." << LogIO::POST ;
    303301    return -1 ;
     
    354352vector<double> NRODataset::getSpectrum( int i )
    355353{
    356   LogIO os( LogOrigin( "NRODataset", "getSpectrum", WHERE ) ) ;
    357  
    358354  // DEBUG
    359355  //cout << "NRODataset::getSpectrum() start process (" << i << ")" << endl ;
     
    413409    if ( ( ivalue < 0 ) || ( ivalue > 4096 ) ) {
    414410      //cerr << "NRODataset::getSpectrum()  ispec[" << i << "] is out of range" << endl ;
     411      LogIO os( LogOrigin( "NRODataset", "getSpectrum", WHERE ) ) ;
    415412      os << LogIO::SEVERE << "ispec[" << i << "] is out of range" << LogIO::EXCEPTION ;
    416413      delete ispec ;
  • branches/hpc34/external-alma/atnf/PKSIO/NROReader.cc

    r2590 r2596  
    300300Vector<Double> NROReader::getSourceDirection()
    301301{
    302   LogIO os( LogOrigin( "NROReader", "getSourceDirection()", WHERE ) ) ;
    303 
    304302  if ( msrcdir_.nelements() == 2 )
    305303    return msrcdir_ ;
     
    323321    //<< srcra << "," << srcdec << ") B1950 to ("
    324322    //<< v( 0 ) << ","<< v( 1 ) << ") J2000" << endl ;
     323    //LogIO os( LogOrigin( "NROReader", "getSourceDirection()", WHERE ) ) ;
    325324    //os << LogIO::NORMAL << "SRCDIRECTION convert from ("
    326325    //   << srcra << "," << srcdec << ") B1950 to ("
     
    337336Vector<Double> NROReader::getDirection( int i )
    338337{
    339   LogIO os( LogOrigin( "NROReader", "getDirection()", WHERE ) ) ;
    340 
    341338  Vector<Double> v( 2 ) ;
    342339  NRODataRecord *record = dataset_->getRecord( i ) ;
Note: See TracChangeset for help on using the changeset viewer.