Hotfix for wave analysis, bug in size of test first hit

This commit is contained in:
Gordon McCann 2022-05-23 09:14:44 -04:00
parent 0850f9a5e5
commit 946c14cae3

View File

@ -91,7 +91,7 @@ namespace EventBuilder {
{
EVB_ERROR("Waveforms are not supported by the SPS_SABRE_EventBuilder. The wave data will be skipped.");
m_hitsize += 5;
char* firstHit = new char[24]; //A compass hit by default has 24 bytes (at least in our setup)
char* firstHit = new char[m_hitsize]; //A compass hit by default has 24 bytes (at least in our setup)
m_file->read(firstHit, 24);
firstHit += m_hitsize - 4;
uint32_t nsamples = *((uint32_t*) firstHit);
@ -186,6 +186,7 @@ namespace EventBuilder {
m_currentHit.Ns = *((uint32_t*)m_bufferIter);
m_bufferIter += 4;
m_bufferIter += 2*m_currentHit.Ns;
//Skip wavedata for SPS_SABRE_EventBuilder
}
if(m_smap != nullptr)