7 int nPresamples = theData.
getNPS();
15 theDigi =
HcalTTPDigi(theID, nSamples, nPresamples, fwVersion, algorithm, lPipe);
18 const unsigned short *daq_first, *daq_last, *tp_first, *tp_last;
19 theData.
dataPointers(&daq_first, &daq_last, &tp_first, &tp_last);
23 const uint16_t* daq_start = (daq_first + 6 *
i);
24 if (daq_start > daq_last)
27 const uint16_t* inputContent = daq_start;
28 const uint32_t algoDep = (daq_start[4] >> 8) | ((uint32_t(daq_start[5]) & 0xFFF) << 8);
29 const uint8_t trigOutput = (daq_start[5] >> 12) & 0xF;
31 int relativeSample =
i - nPresamples;
32 theDigi.
setSample(relativeSample, inputContent, algoDep, trigOutput);
int getNDD() const
Get the number of daq data samples per channel when not zero-suppressed.
unsigned int getPipelineLength() const
Get the pipeline length used for this event.
void setSample(int relativeSample, const uint16_t *triggerInputs, const uint32_t algodep, const uint8_t outputTrigger)
constexpr size_t nSamples
void dataPointers(const unsigned short **daq_first, const unsigned short **daq_last, const unsigned short **tp_first, const unsigned short **tp_last) const
Obtain the starting and ending pointers for external unpacking of the data.
bool unpack(const HcalHTRData &data, HcalTTPDigi &digi)
int getNPS() const
Get the number of presamples in daq data.
int getFirmwareFlavor() const
Get the HTR firmware flavor.
unsigned int getSubmodule() const
Get the HTR submodule number.
unsigned int getFirmwareRevision() const
Get the HTR firmware version.