21 #ifndef DAQ_DDAS_DDASHIT_H
22 #define DAQ_DDAS_DDASHIT_H
66 uint32_t channellength;
67 uint32_t channelheaderlength;
68 uint32_t overflowcode;
73 uint32_t cfdtrigsourcebit;
81 std::vector<uint32_t> energySums;
82 std::vector<uint32_t> qdcSums;
85 std::vector<uint16_t> trace;
87 uint64_t externalTimestamp;
91 bool m_adcOverflowUnderflow;
103 void copyIn(
const DDASHit& rhs);
226 const std::vector<uint16_t>&
GetTrace()
const {
return trace;}
230 const std::vector<uint32_t>&
GetEnergySums()
const {
return energySums; }
234 const std::vector<uint32_t>&
GetQDCSums()
const {
return qdcSums; }
246 void setChannel(uint32_t channel);
247 void setSlot(uint32_t slot);
248 void setCrate(uint32_t crate);
249 void setChannelHeaderLength(uint32_t channelHeaderLength);
250 void setChannelLength(uint32_t channelLength);
251 void setOverflowCode(uint32_t overflow);
252 void setFinishCode(
bool finishCode);
253 void setCoarseTime(uint64_t time);
254 void setRawCFDTime(uint32_t data);
255 void setCFDTrigSourceBit(uint32_t bit);
256 void setCFDFailBit(uint32_t bit);
258 void setTimeLow(uint32_t datum);
259 void setTimeHigh(uint32_t datum);
261 void setTime(
double time);
262 void setEnergy(uint32_t value);
263 void setTraceLength(uint32_t trace);
264 void setADCFrequency(uint32_t value);
265 void setADCResolution(
int value);
266 void setHardwareRevision(
int value);
267 void appendEnergySum(uint32_t value);
268 void appendQDCSum(uint32_t value);
269 void appendTraceSample(uint16_t value);
270 void setExternalTimestamp(uint64_t tstamp);
271 void setADCOverflowUnderflow(
bool state);
uint32_t GetTraceLength() const
Definition: DDASHit.h:222
double GetTime() const
Retrieve computed time.
Definition: DDASHit.h:173
uint32_t GetTimeLow() const
Retrieve least significant 32-bit of raw timestamp.
Definition: DDASHit.h:145
uint32_t GetCrateID() const
Retrieve the index of the crate the module resided in.
Definition: DDASHit.h:201
DDASHit(const DDASHit &obj)
Copy constructor.
Definition: DDASHit.h:107
uint32_t GetOverflowCode() const
Retrieve the overflow code.
Definition: DDASHit.h:195
uint32_t GetChannelLength() const
Retrieve number of 32-bit words that were in original data packet.
Definition: DDASHit.h:189
Encapsulation of a generic DDAS event.
Definition: DDASHit.h:51
uint32_t GetTimeCFD() const
Retrieve the raw cfd time.
Definition: DDASHit.h:148
std::vector< uint16_t > & GetTrace()
Definition: DDASHit.h:225
virtual ~DDASHit()
Destructor.
Definition: DDASHit.cpp:75
uint32_t GetChannelLengthHeader() const
Retrieve length of header in original data packet.
Definition: DDASHit.h:192
uint32_t GetModMSPS() const
Retrieve the ADC frequency of the module.
Definition: DDASHit.h:207
uint32_t GetCFDTrigSource() const
Definition: DDASHit.h:216
uint32_t GetTimeHigh() const
Retrieve most significant 16-bits of raw timestamp.
Definition: DDASHit.h:142
uint64_t GetCoarseTime() const
Retrieve the 48-bit timestamp in nanoseconds without any CFD correction.
Definition: DDASHit.h:176
uint32_t GetFinishCode() const
Retrieve finish code.
Definition: DDASHit.h:182
DDASHit()
Default constructor.
Definition: DDASHit.cpp:19
std::vector< uint32_t > & GetEnergySums()
Definition: DDASHit.h:229
DDASHit & operator=(const DDASHit &obj)
Assignment operator.
Definition: DDASHit.h:112
uint32_t GetChannelID() const
Retrieve the channel index.
Definition: DDASHit.h:204
uint32_t GetSlotID() const
Retrieve the slot that the module resided in.
Definition: DDASHit.h:198
uint32_t GetEnergy() const
Retrieve the energy.
Definition: DDASHit.h:139
int GetADCResolution() const
Retrieve the adc resolution.
Definition: DDASHit.h:213
void Reset()
Resets the state of all member data to that of initialization.
Definition: DDASHit.cpp:46
std::vector< uint32_t > & GetQDCSums()
Definition: DDASHit.h:233
Definition: functions.h:26
Definition: SystemBooter.cpp:16
uint32_t GetCFDFailBit() const
Definition: DDASHit.h:219
bool GetADCOverflowUnderflow() const
Return the adc overflow/underflow status.
Definition: DDASHit.h:244
uint64_t GetExternalTimestamp() const
Definition: DDASHit.h:237
int GetHardwareRevision() const
Retrieve the hardware revision.
Definition: DDASHit.h:210