Newer
Older
Gigg, Martyn Anthony
committed
if (numberOfPeriods == 1)
{
if (++histCurrent % 100 == 0)
{
m_prog = double(histCurrent) / histTotal;
}
interruption_point();
}
}
else
{
skipData(file, histToRead);
}
Gigg, Martyn Anthony
committed
}
}
Sofia Antony
committed
///
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;
Sofia Antony
committed
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
/*
* 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;
}
Sofia Antony
committed
Gigg, Martyn Anthony
committed
} // namespace DataHandling
Russell Taylor
committed
} // namespace Mantid