Skip to content

Commit

Permalink
REG: do not require start / stop readout time stamp to be differend,
Browse files Browse the repository at this point in the history
needed to make interpretation work with faulty data, see also:
SiLab-Bonn/pyBAR#48
  • Loading branch information
DavidLP committed Apr 10, 2016
1 parent 40e3802 commit 7c93ea5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pybar_fei4_interpreter/Interpret.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ bool Interpret::setMetaData(MetaInfo* &rMetaInfo, const unsigned int& tLength)
throw std::out_of_range("Meta word index out of range.");
if (_metaInfo[i].stopIndex != _metaInfo[i + 1].startIndex && _metaInfoV2[i + 1].startIndex != 0)
throw std::out_of_range("Meta word index out of range.");
if (_metaInfo[i].timeStamp >= _metaInfo[i + 1].timeStamp)
if (_metaInfo[i].timeStamp > _metaInfo[i + 1].timeStamp)
throw std::out_of_range("Time stamp not increasing.");
}
if (_metaInfo[tLength - 1].startIndex + _metaInfo[tLength - 1].length != _metaInfo[tLength - 1].stopIndex)
Expand All @@ -344,7 +344,7 @@ bool Interpret::setMetaDataV2(MetaInfoV2* &rMetaInfo, const unsigned int& tLengt
throw std::out_of_range("Meta word index out of range.");
if (_metaInfoV2[i].stopIndex != _metaInfoV2[i + 1].startIndex && _metaInfoV2[i + 1].startIndex != 0)
throw std::out_of_range("Meta word index out of range.");
if (_metaInfoV2[i].startTimeStamp >= _metaInfoV2[i].stopTimeStamp || _metaInfoV2[i].stopTimeStamp > _metaInfoV2[i + 1].startTimeStamp)
if (_metaInfoV2[i].startTimeStamp > _metaInfoV2[i].stopTimeStamp || _metaInfoV2[i].stopTimeStamp > _metaInfoV2[i + 1].startTimeStamp)
throw std::out_of_range("Time stamp not increasing.");
}
if (_metaInfoV2[tLength - 1].startIndex + _metaInfoV2[tLength - 1].length != _metaInfoV2[tLength - 1].stopIndex)
Expand Down

0 comments on commit 7c93ea5

Please sign in to comment.