82 uint64_t m_coarseTime;
83 uint64_t m_externalTimestamp;
88 uint32_t m_finishCode;
89 uint32_t m_channelLength;
90 uint32_t m_channelHeaderLength;
94 uint32_t m_cfdTrigSourceBit;
95 uint32_t m_cfdFailBit;
96 uint32_t m_traceLength;
98 uint16_t m_hdwrRevision;
99 uint16_t m_adcResolution;
100 bool m_adcOverflowUnderflow;
104 std::vector<uint32_t> m_energySums;
105 std::vector<uint32_t> m_qdcSums;
106 std::vector<uint16_t> m_trace;
270 std::vector<uint16_t> &
getTrace() {
return m_trace; }
275 const std::vector<uint16_t> &
getTrace()
const {
return m_trace; }
295 const std::vector<uint32_t> &
getQDCSums()
const {
return m_qdcSums; }
329 m_channelHeaderLength = channelHeaderLength;
336 m_channelLength = channelLength;
405 void setTime(
double compTime) { m_time = compTime; }
453 void setQDCSums(std::vector<uint32_t> qdcSums);
464 m_trace = std::move(trace);
Encapsulation of a generic DDAS event.
Definition: DDASHit.h:76
uint32_t getFinishCode() const
Retrieve finish code.
Definition: DDASHit.h:204
void setChannelLength(uint32_t channelLength)
Set the channel length.
Definition: DDASHit.h:335
void setTime(double compTime)
Set the hit time.
Definition: DDASHit.h:405
void appendQDCSum(uint32_t value)
Append a QDC value to the vector of QDC sums.
Definition: DDASHit.h:448
const std::vector< uint32_t > & getEnergySums() const
Access the energy/baseline sum data.
Definition: DDASHit.h:285
void setFinishCode(bool finishCode)
Set the finish code.
Definition: DDASHit.h:342
uint32_t getSlotID() const
Retrieve the slot that the module resided in.
Definition: DDASHit.h:223
uint16_t getADCResolution() const
Retrieve the ADC resolution.
Definition: DDASHit.h:248
std::vector< uint32_t > & getQDCSums()
Access the QDC data.
Definition: DDASHit.h:290
void setTimeLow(uint32_t datum)
Set the lower 32 bits of the 48-bit timestamp.
Definition: DDASHit.h:392
uint32_t getChannelHeaderLength() const
Retrieve length of header in original data packet.
Definition: DDASHit.h:218
void appendTraceSample(uint16_t value)
Append a 16-bit ADC trace sample to the trace vector.
Definition: DDASHit.h:458
void setADCOverflowUnderflow(bool state)
Set ADC over- or under-flow state.
Definition: DDASHit.h:478
void setTrace(std::vector< uint16_t > trace)
Set the trace data from an existing trace.
Definition: DDASHit.h:463
void setRawCFDTime(uint32_t data)
Set the raw CFD time.
Definition: DDASHit.h:363
uint32_t getEnergy() const
Retrieve the energy.
Definition: DDASHit.h:182
void setCoarseTime(uint64_t time)
Set the coarse timestamp (timestamp without CFD correction).
Definition: DDASHit.h:358
void setModMSPS(uint32_t msps)
Set the value of the ADC frequency in MSPS for the ADC which recorded this hit.
Definition: DDASHit.h:421
bool getADCOverflowUnderflow() const
Retrieve the ADC overflow/underflow status.
Definition: DDASHit.h:307
uint64_t getCoarseTime() const
Retrieve the raw timestamp in nanoseconds without any CFD correction.
Definition: DDASHit.h:172
uint32_t getCFDTrigSource() const
Retrieve trigger source bit from CFD data.
Definition: DDASHit.h:253
uint32_t getCrateID() const
Retrieve the index of the crate the module resided in.
Definition: DDASHit.h:228
virtual ~DDASHit()
Destructor.
Definition: DDASHit.h:118
void appendEnergySum(uint32_t value)
Append energy sum value to the vector of energy sums.
Definition: DDASHit.h:438
uint32_t getModMSPS() const
Retrieve the ADC frequency of the module.
Definition: DDASHit.h:238
uint64_t getExternalTimestamp() const
Retrieve the external timestamp.
Definition: DDASHit.h:300
const std::vector< uint16_t > & getTrace() const
Access the trace data.
Definition: DDASHit.h:275
void setHardwareRevision(uint16_t value)
Set the ADC hardware revision for the ADC which recorded this hit.
Definition: DDASHit.h:433
uint32_t getChannelID() const
Retrieve the channel index.
Definition: DDASHit.h:233
uint16_t getHardwareRevision() const
Retrieve the hardware revision.
Definition: DDASHit.h:243
uint32_t getTimeHigh() const
Retrieve most significant 16-bits of raw timestamp.
Definition: DDASHit.h:187
DDASHit()
Default constructor.
Definition: DDASHit.cpp:41
void Reset()
Resets the state of all member data to that of initialization.
Definition: DDASHit.cpp:54
void setCrateID(uint32_t crate)
Set the crate ID.
Definition: DDASHit.h:323
void setExternalTimestamp(uint64_t value)
Set the value of the external timestamp.
Definition: DDASHit.h:472
void setEnergySums(std::vector< uint32_t > eneSums)
Set the energy sum data from an existing set of sums.
Definition: DDASHit.cpp:85
void setChannelID(uint32_t channel)
Set the channel ID.
Definition: DDASHit.h:313
void setEnergy(uint32_t energy)
Set the energy for this hit.
Definition: DDASHit.h:410
void setADCResolution(uint16_t value)
Set the value of the ADC resolution (bit depth) for the ADC which recorded this hit.
Definition: DDASHit.h:427
uint32_t getTimeCFD() const
Retrieve the raw CFD time.
Definition: DDASHit.h:197
void setTimeHigh(uint32_t datum)
Set the higher 16 bits of the 48-bit timestamp.
Definition: DDASHit.cpp:81
uint32_t getChannelLength() const
Retrieve number of 32-bit words that were in original data packet.
Definition: DDASHit.h:213
uint32_t getTraceLength() const
Retrieve trace length.
Definition: DDASHit.h:265
void setQDCSums(std::vector< uint32_t > qdcSums)
Set the QDC sum data from an existing set of sums.
Definition: DDASHit.cpp:96
void setChannelHeaderLength(uint32_t channelHeaderLength)
Set the channel header length.
Definition: DDASHit.h:328
void setSlotID(uint32_t slot)
Set the slot ID.
Definition: DDASHit.h:318
void setTraceLength(uint32_t length)
Set the ADC trace length.
Definition: DDASHit.h:415
double getTime() const
Retrieve computed time.
Definition: DDASHit.h:155
std::vector< uint32_t > & getEnergySums()
Access the energy/baseline sum data.
Definition: DDASHit.h:280
std::vector< uint16_t > & getTrace()
Access the trace data.
Definition: DDASHit.h:270
uint32_t getCFDFailBit() const
Retreive failure bit from CFD data.
Definition: DDASHit.h:260
const std::vector< uint32_t > & getQDCSums() const
Access the QDC data.
Definition: DDASHit.h:295
void setCFDTrigSourceBit(uint32_t bit)
Set the CFD trigger source bit.
Definition: DDASHit.h:376
void setCFDFailBit(uint32_t bit)
Set the CFD fail bit.
Definition: DDASHit.h:387
uint32_t getTimeLow() const
Retrieve least significant 32-bit of raw timestamp.
Definition: DDASHit.h:192