36 virtual ~Hit() =
default;
49 template <
class STREAM>
52 stream <<
"CRT::Hit Dump:\n" 55 <<
"ADC: " <<
fADC <<
"\n" 56 <<
"Was this CRT::Hit default-constructed? " << (
IsDefault()?
"true":
"false") <<
"\n";
74 template <
class STREAM>
87 std::vector<CRT::Hit>&& hits):
fChannel(channel), fTimestamp(timestamp), fHits(hits)
91 fTimestamp(
std::numeric_limits<decltype(fTimestamp)>::
max()), fHits() {}
96 inline unsigned long long Timestamp()
const {
return fTimestamp; }
97 inline const std::vector<CRT::Hit>&
Hits()
const {
return fHits; }
103 template <
class STREAM>
106 stream <<
"CRT::Trigger dump:\n" 109 <<
"Timestamp: " << fTimestamp <<
"\n" 111 for(
const auto&
hit: fHits)
hit.dump(stream);
129 template <
class STREAM>
132 return trigger.
dump(lhs);
136 #endif //CRT_TRIGGER_H
void dump(STREAM &stream) const
unsigned long long fTimestamp
unsigned long long Timestamp() const
STREAM & operator<<(STREAM &lhs, const CRT::Hit &hit)
unsigned short Channel() const
static int max(int a, int b)
Trigger(const unsigned short channel, const unsigned long long timestamp, std::vector< CRT::Hit > &&hits)
Detector simulation of raw signals on wires.
Hit(uint8_t channel, uint16_t adc)
std::vector< CRT::Hit > fHits
const std::vector< CRT::Hit > & Hits() const
void dump(STREAM &stream) const