83 uint64_t m_coarseTime;
84 uint64_t m_externalTimestamp;
89 uint32_t m_finishCode;
90 uint32_t m_channelLength;
91 uint32_t m_channelHeaderLength;
95 uint32_t m_cfdTrigSourceBit;
96 uint32_t m_cfdFailBit;
97 uint32_t m_traceLength;
101 bool m_adcOverflowUnderflow;
105 std::vector<uint32_t> m_energySums;
106 std::vector<uint32_t> m_qdcSums;
107 std::vector<uint16_t> m_trace;
118 void copyIn(
const DDASHit& rhs);
239 return m_channelHeaderLength;
292 std::vector<uint16_t>&
getTrace() {
return m_trace; }
297 const std::vector<uint16_t>&
getTrace()
const {
return m_trace; }
327 return m_externalTimestamp;
340 return m_adcOverflowUnderflow;
458 void setQDCSums(std::vector<uint32_t> qdcSums);
468 void setTrace(std::vector<uint16_t> trace);
Encapsulation of a generic DDAS event.
Definition: DDASHit.h:76
uint32_t getFinishCode() const
Retrieve finish code.
Definition: DDASHit.h:224
void setChannelLength(uint32_t channelLength)
Set the channel length.
Definition: DDASHit.cpp:115
const std::vector< uint16_t > & getTrace() const
Access the trace data.
Definition: DDASHit.h:297
void setTime(double compTime)
Set the hit time.
Definition: DDASHit.cpp:192
void appendQDCSum(uint32_t value)
Append a QDC value to the vector of QDC sums.
Definition: DDASHit.cpp:247
std::vector< uint16_t > & getTrace()
Access the trace data.
Definition: DDASHit.h:292
void setFinishCode(bool finishCode)
Set the finish code.
Definition: DDASHit.cpp:121
void setHardwareRevision(int value)
Set the ADC hardware revision for the ADC which recorded this hit.
Definition: DDASHit.cpp:222
uint32_t getSlotID() const
Retrieve the slot that the module resided in.
Definition: DDASHit.h:245
int getHardwareRevision() const
Retrieve the hardware revision.
Definition: DDASHit.h:265
DDASHit & operator=(const DDASHit &obj)
Assignment operator.
Definition: DDASHit.h:126
void setTimeLow(uint32_t datum)
Set the lower 32 bits of the 48-bit timestamp.
Definition: DDASHit.cpp:180
uint32_t getChannelHeaderLength() const
Retrieve length of header in original data packet.
Definition: DDASHit.h:238
void appendTraceSample(uint16_t value)
Append a 16-bit ADC trace sample to the trace vector.
Definition: DDASHit.cpp:266
void setADCOverflowUnderflow(bool state)
Set ADC over- or under-flow state.
Definition: DDASHit.cpp:285
void setTrace(std::vector< uint16_t > trace)
Set the trace data from an existing trace.
Definition: DDASHit.cpp:272
void setRawCFDTime(uint32_t data)
Set the raw CFD time.
Definition: DDASHit.cpp:146
uint32_t getEnergy() const
Retrieve the energy.
Definition: DDASHit.h:202
void setCoarseTime(uint64_t time)
Set the coarse timestamp.
Definition: DDASHit.cpp:140
void setModMSPS(uint32_t msps)
Set the value of the ADC frequency in MSPS for the ADC which recorded this hit.
Definition: DDASHit.cpp:210
const std::vector< uint32_t > & getEnergySums() const
Access the energy/baseline sum data.
Definition: DDASHit.h:307
bool getADCOverflowUnderflow() const
Retrieve the ADC overflow/underflow status.
Definition: DDASHit.h:339
uint64_t getCoarseTime() const
Retrieve the 48-bit timestamp in nanoseconds without any CFD correction.
Definition: DDASHit.h:192
uint32_t getCFDTrigSource() const
Retrieve trigger source bit from CFD data.
Definition: DDASHit.h:275
uint32_t getCrateID() const
Retrieve the index of the crate the module resided in.
Definition: DDASHit.h:250
void appendEnergySum(uint32_t value)
Set the crate ID.
Definition: DDASHit.cpp:228
uint32_t getModMSPS() const
Retrieve the ADC frequency of the module.
Definition: DDASHit.h:260
uint64_t getExternalTimestamp() const
Retrieve the external timestamp.
Definition: DDASHit.h:326
DDASHit(const DDASHit &obj)
Copy constructor.
Definition: DDASHit.h:122
std::vector< uint32_t > & getQDCSums()
Access the QDC data.
Definition: DDASHit.h:314
uint32_t getChannelID() const
Retrieve the channel index.
Definition: DDASHit.h:255
uint32_t getTimeHigh() const
Retrieve most significant 16-bits of raw timestamp.
Definition: DDASHit.h:207
DDASHit()
Default constructor.
Definition: DDASHit.cpp:40
void Reset()
Resets the state of all member data to that of initialization.
Definition: DDASHit.cpp:57
void setCrateID(uint32_t crate)
Set the crate ID.
Definition: DDASHit.cpp:103
void setExternalTimestamp(uint64_t value)
Set the value of the external timestamp.
Definition: DDASHit.cpp:279
void setEnergySums(std::vector< uint32_t > eneSums)
Set the energy sum data from an existing set of sums.
Definition: DDASHit.cpp:234
void setChannelID(uint32_t channel)
Set the channel ID.
Definition: DDASHit.cpp:91
void setEnergy(uint32_t energy)
Set the energy for this hit.
Definition: DDASHit.cpp:198
uint32_t getTimeCFD() const
Retrieve the raw CFD time.
Definition: DDASHit.h:217
void setTimeHigh(uint32_t datum)
Set the higher 16 bits of the 48-bit timestamp.
Definition: DDASHit.cpp:186
virtual ~DDASHit()
Destructor.
Definition: DDASHit.cpp:87
uint32_t getChannelLength() const
Retrieve number of 32-bit words that were in original data packet.
Definition: DDASHit.h:233
uint32_t getTraceLength() const
Retrieve trace length.
Definition: DDASHit.h:287
std::vector< uint32_t > & getEnergySums()
Access the energy/baseline sum data.
Definition: DDASHit.h:302
void setQDCSums(std::vector< uint32_t > qdcSums)
Set the QDC sum data from an existing set of sums.
Definition: DDASHit.cpp:253
void setChannelHeaderLength(uint32_t channelHeaderLength)
Set the channel header length.
Definition: DDASHit.cpp:109
void setSlotID(uint32_t slot)
Set the slot ID.
Definition: DDASHit.cpp:97
void setADCResolution(int value)
Set the value of the ADC resolution (bit depth) for the ADC which recorded this hit.
Definition: DDASHit.cpp:216
void setTraceLength(uint32_t length)
Set the ADC trace length.
Definition: DDASHit.cpp:204
double getTime() const
Retrieve computed time.
Definition: DDASHit.h:175
int getADCResolution() const
Retrieve the ADC resolution.
Definition: DDASHit.h:270
uint32_t getCFDFailBit() const
Retreive failure bit from CFD data.
Definition: DDASHit.h:282
void setCFDTrigSourceBit(uint32_t bit)
Set the CFD trigger source bit.
Definition: DDASHit.cpp:161
void setCFDFailBit(uint32_t bit)
Set the CFD fail bit.
Definition: DDASHit.cpp:174
uint32_t getTimeLow() const
Retrieve least significant 32-bit of raw timestamp.
Definition: DDASHit.h:212
const std::vector< uint32_t > & getQDCSums() const
Access the QDC data.
Definition: DDASHit.h:319