Hello,
I have a question about the GetTime() method in DRS.cpp. I understand how the DT values are applied for all channels, and I also understand from the evaluation board manual that the timing of each channel is synchronized at sample 0, so samples should really be aligned from channel-to-channel relative to sample 0.
However, DRS.cpp has the following snippet in DrsBoard::GetTime():
if (channelIndex > 0) {
// correct all channels to channel 0 (Daniel's method)
iend = tc >= 700 ? 700+1024 : 700;
for (i=tc,gt0=0 ; i<iend ; i++)
gt0 += fCellDT[chipIndex][0][i % 1024];
for (i=tc,gt=0 ; i<iend ; i++)
gt += fCellDT[chipIndex][channelIndex][i % 1024];
for (i=0 ; i<fChannelDepth ; i++)
time[i] += (float)(gt0 - gt);
}
I can see what this is calculating and applying such an offset, but I don't understand why things seem to be referenced to sample 700. Is there a particular reason why sample 700 is chosen here? This does not seem like a straightforward application of the attached instructions from the evaluation board user's manual.
Any insight would be much appreciated!
Thanks so much,
-Kurtis |