Ignore:
Timestamp:
07/07/17 18:17:49 (4 years ago)
Author:
oabramkina
Message:

Two server levels: merging trunk r1200 (except for non-contiguous zoom) into dev. Tested on Curie. Todo: non-contiguous zoom.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/filter/file_writer_filter.cpp

    r1158 r1201  
    1717  void CFileWriterFilter::onInputReady(std::vector<CDataPacketPtr> data) 
    1818  { 
    19     bool ignoreMissingValue = (!field->detect_missing_value.isEmpty() &&  
    20                                !field->default_value.isEmpty() &&  
    21                                field->detect_missing_value == true); 
    22     if (ignoreMissingValue) 
     19    CDataPacketPtr packet = data[0]; 
     20 
     21    const bool detectMissingValue = (!field->detect_missing_value.isEmpty() 
     22                                      && !field->default_value.isEmpty() 
     23                                      && field->detect_missing_value == true); 
     24    if (detectMissingValue) 
    2325    { 
    24       double missingValue = field->default_value; 
    25       size_t nbData = data[0]->data.numElements(); 
     26      const double missingValue = field->default_value; 
     27      const size_t nbData = packet->data.numElements(); 
    2628      for (size_t idx = 0; idx < nbData; ++idx) 
    2729      { 
    28         if (NumTraits<double>::isnan(data[0]->data(idx))) 
    29           data[0]->data(idx) = missingValue; 
     30        if (NumTraits<double>::isnan(packet->data(idx))) 
     31          packet->data(idx) = missingValue; 
    3032      } 
    31     }     
     33    } 
    3234 
    33     field->sendUpdateData(data[0]->data); 
     35    field->sendUpdateData(packet->data); 
    3436  } 
    3537 
Note: See TracChangeset for help on using the changeset viewer.