Skip to content
Snippets Groups Projects
LoadRawHelper.cpp 39.4 KiB
Newer Older
          if (numberOfPeriods == 1)
          {
            if (++histCurrent % 100 == 0)
            {
              m_prog = double(histCurrent) / histTotal;
            }
            interruption_point();
          }

        }
        else
        {
          skipData(file, histToRead);
        }
    
 ///
bool LoadRawHelper::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer)
{
  std::string extn=extension(filePath);
  bool braw(false);
  (!extn.compare("raw")||!extn.compare("add")||extn[0]=='s')?braw=true:braw=false;
  /*
  * look at the "address of RUN and INST section" attribute - if there, must be an ISIS raw file
  */
  if ( ((nread > 88) && (header_buffer[84] == 32) && (header_buffer[88] == 126))|| braw )
  {
   return true;
  }
  else
  {
    return false;
  }
 
}
///
int LoadRawHelper::fileCheck(const std::string& filePath)
{
  //here the assumption is generic load algorithm will
  //call filecheck if quickFileCheck passed.
  // once quick checked passed return 80 for loadraw 
  return 80;
}