0b00 : The TOT is not in operation (not busy), normal behaviour with ADC data (TOT filled with 0)
0b01 : The TOT is busy (integration or undershoot), Tp highlights the fact that provided ADC
correspond to saturation (during integration) or undershoot (TOT filled with 0)
0b10 : should not appear => we only output value when TOT is busy
0b11 : The TOT value is output, normal behaviour with TOT data (ADC value is between saturation
and undershoot)
As discussed yesterday in the CMG HGCal Chat with @asteencern, @adavidzh, @pfs: TcTp has a 2-bit value, and TOT should be used for TcTp > 1.
From p. 33 in the HGCROC3 spec working document:
While this PR is open, @hqucms, do you know if the compiler should already optimize this? (See https://en.wikipedia.org/wiki/Constant_folding):
Also for the record: @adavidzh proposed to look into branchless programming for optimizing
cond ? branch1 : branch2
.