Logical multi-level gate associated to one or more channels. More...
#include <MultiChannelOpticalTriggerGate.h>
Public Member Functions | |
MultiChannelOpticalTriggerGate (OpticalTriggerGate const &gate) | |
MultiChannelOpticalTriggerGate (OpticalTriggerGate &&gate) | |
MultiChannelOpticalTriggerGate & | operator= (OpticalTriggerGate const &gate) |
MultiChannelOpticalTriggerGate & | operator= (OpticalTriggerGate &&gate) |
ChannelID_t | channel () const =delete |
Do not support single-channel interface. More... | |
Public Member Functions inherited from icarus::trigger::OpticalTriggerGate | |
OpticalTriggerGate ()=default | |
Constructor: a closed gate with no associated waveform (add() them). More... | |
OpticalTriggerGate (OpticalTriggerGate const &)=default | |
OpticalTriggerGate (OpticalTriggerGate &&)=default | |
OpticalTriggerGate & | operator= (OpticalTriggerGate const &)=default |
OpticalTriggerGate & | operator= (OpticalTriggerGate &&)=default |
OpticalTriggerGate (raw::OpDetWaveform const &waveform) | |
Constructor: a closed gate for the channel in waveform . More... | |
fWaveforms ({&waveform}) | |
OpticalTriggerGate (ChannelID_t channel) | |
Constructor: a closed gate for the specified channel. More... | |
bool | add (raw::OpDetWaveform const &waveform) |
Adds another waveform to the gate (unless it has already been added). More... | |
bool | operator== (OpticalTriggerGate const &) const |
bool | operator!= (OpticalTriggerGate const &) const |
template<typename Op > | |
icarus::trigger::OpticalTriggerGate | SymmetricCombination (Op &&op, OpticalTriggerGate const &a, OpticalTriggerGate const &b, TriggerGateTicks_t aDelay, TriggerGateTicks_t bDelay) |
OpticalTriggerGate & | operator= (GateData_t const &data) |
Copies/steals all the levels and channels from the specified data. More... | |
OpticalTriggerGate & | operator= (GateData_t &&data) |
GateData_t & | gateLevels () |
Access to the underlying gate level data (mutable). More... | |
GateData_t const & | gateLevels () const |
Access to the underlying gate level data (immutable). More... | |
std::vector < raw::OpDetWaveform const * > | waveforms () const |
OpticalTriggerGate & | Min (OpticalTriggerGate const &other) |
Combines with a gate, keeping the minimum opening among the two. More... | |
OpticalTriggerGate & | Max (OpticalTriggerGate const &other) |
Combines with a gate, keeping the maximum opening among the two. More... | |
OpticalTriggerGate & | Sum (OpticalTriggerGate const &other) |
Combines with a gate, keeping the sum of openings of the two. More... | |
OpticalTriggerGate & | Mul (OpticalTriggerGate const &other) |
Combines with a gate, keeping the product of openings of the two. More... | |
Public Member Functions inherited from icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > | |
ReadoutTriggerGate ()=default | |
ReadoutTriggerGate (ReadoutTriggerGate const &)=default | |
ReadoutTriggerGate (ReadoutTriggerGate &&)=default | |
ReadoutTriggerGate & | operator= (ReadoutTriggerGate const &)=default |
ReadoutTriggerGate & | operator= (ReadoutTriggerGate &&)=default |
ReadoutTriggerGate (std::initializer_list< ChannelID_t > channels) | |
Constructor: a closed gate associated to the specified channels . More... | |
bool | hasChannels () const |
Returns whether there is any channel id associated to the gate data. More... | |
bool | hasChannel () const |
Returns whether exactly one channel id associated to the gate data. More... | |
std::size_t | nChannels () const |
Returns the number of associated channels. More... | |
decltype(auto) | channels () const |
Returns the channels associated to the gate data. More... | |
ChannelID_t | channel () const |
Returns the channel associated to the gate data. More... | |
This_t & | addChannel (ChannelID_t const channel) |
Associates the specified channel to this readout gate. More... | |
This_t & | addChannels (std::initializer_list< ChannelID_t > channels) |
Associates the specified channels to this readout gate. More... | |
bool | operator== (ReadoutTriggerGate const &) const |
bool | operator!= (ReadoutTriggerGate const &) const |
ReadoutTriggerGate & | operator= (GateData_t const &data) |
Copies/steals all the levels from the specified data. More... | |
ReadoutTriggerGate & | operator= (GateData_t &&data) |
GateData_t const & | gateLevels () const |
Access to the underlying gate level data. More... | |
GateData_t & | gateLevels () |
Access to the underlying gate level data (mutable). More... | |
ReadoutTriggerGate & | Min (ReadoutTriggerGate const &other) |
Combines with a gate, keeping the minimum opening among the two. More... | |
ReadoutTriggerGate & | Max (ReadoutTriggerGate const &other) |
Combines with a gate, keeping the maximum opening among the two. More... | |
ReadoutTriggerGate & | Sum (ReadoutTriggerGate const &other) |
Combines with a gate, keeping the sum of openings of the two. More... | |
ReadoutTriggerGate & | Mul (ReadoutTriggerGate const &other) |
Combines with a gate, keeping the product of openings of the two. More... | |
Public Member Functions inherited from icarus::trigger::TriggerGateData< Tick, TickInterval > | |
TriggerGateData () | |
Constructor: a closed gate for the channel in waveform . More... | |
bool | operator== (TriggerGateData const &) const |
bool | operator!= (TriggerGateData const &) const |
ClockTick_t | lastTick () const |
Returns the number of ticks this gate covers. More... | |
OpeningCount_t | openingCount (ClockTick_t tick) const |
Returns the opening count of the gate at the specified tick . More... | |
bool | alwaysClosed () const |
Returns whether this gate never opened. More... | |
bool | isOpen (ClockTick_t tick) const |
Returns whether the gate is open at all at the specified tick . More... | |
ClockTick_t | findOpen (OpeningCount_t minOpening=1U, ClockTick_t start=MinTick, ClockTick_t end=MaxTick) const |
Returns the tick at which the gate opened. More... | |
ClockTick_t | findClose (OpeningCount_t minOpening=1U, ClockTick_t start=MinTick, ClockTick_t end=MaxTick) const |
Returns the tick at which the gate closed. More... | |
ClockTick_t | findMaxOpen (ClockTick_t start=MinTick, ClockTick_t end=MaxTick) const |
Returns the tick at which the gate has the maximum opening. More... | |
std::pair< OpeningCount_t, OpeningCount_t > | openingRange (ClockTick_t start, ClockTick_t end) const |
Returns the range of trigger opening values in the specified range. More... | |
void | setOpeningAt (ClockTick_t tick, OpeningCount_t openingCount) |
Changes the opening to match openingCount at the specified time. More... | |
void | openAt (ClockTick_t tick, OpeningDiff_t count) |
Open this gate at the specified time (increase the opening by count ). More... | |
void | openAt (ClockTick_t tick) |
Open this gate at the specified time (increase the opening by 1). More... | |
void | openBetween (ClockTick_t start, ClockTick_t end, OpeningDiff_t count=1) |
Open this gate at specified start tick, and close it at end tick. More... | |
void | openFor (ClockTick_t tick, ClockTicks_t length, OpeningDiff_t count=1) |
Open this gate at the specified time, and close it length ticks later. More... | |
void | closeAt (ClockTick_t tick, OpeningDiff_t count) |
Close this gate at the specified time (decrease the opening by count ). More... | |
void | closeAt (ClockTick_t tick) |
Close this gate at the specified time. More... | |
void | closeAllAt (ClockTick_t tick) |
Completely close this gate at the specified time. More... | |
void | clear () |
Sets the gate levels in the state at construction. More... | |
triggergatedata_t & | Min (triggergatedata_t const &other) |
Combines with a gate, keeping the minimum opening among the two. More... | |
triggergatedata_t & | Max (triggergatedata_t const &other) |
Combines with a gate, keeping the maximum opening among the two. More... | |
triggergatedata_t & | Sum (triggergatedata_t const &other) |
Combines with a gate, keeping the sum of openings of the two. More... | |
triggergatedata_t & | Mul (triggergatedata_t const &other) |
Combines with a gate, keeping the product of openings of the two. More... | |
Additional Inherited Members | |
Public Types inherited from icarus::trigger::OpticalTriggerGate | |
using | GateData_t = OpticalTriggerGateData_t |
Type for gate data access. More... | |
using | ChannelID_t = GateData_t::ChannelID_t |
Type of channel identifier. More... | |
Public Types inherited from icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > | |
using | ClockTick_t = Tick |
Tick point. More... | |
using | ClockTicks_t = TickInterval |
Tick interval. More... | |
using | ChannelID_t = ChannelIDType |
Type of stored channel ID. More... | |
using | GateData_t = Base_t |
Type for gate data access. More... | |
using | ChannelList_t = std::vector< ChannelID_t > |
Type of list of associated channels. More... | |
Public Types inherited from icarus::trigger::TriggerGateData< Tick, TickInterval > | |
using | triggergatedata_t = TriggerGateData< Tick, TickInterval > |
This type. More... | |
using | ClockTick_t = Tick |
Type of a point in time, measured in ticks. More... | |
using | ClockTicks_t = TickInterval |
Type of a time interval, measured in ticks. More... | |
using | OpeningCount_t = unsigned int |
Type of count of number of open channels. More... | |
using | OpeningDiff_t = std::make_signed_t< OpeningCount_t > |
Type representing a variation of open channels. More... | |
Static Public Member Functions inherited from icarus::trigger::OpticalTriggerGate | |
static OpticalTriggerGate | Min (OpticalTriggerGate const &a, OpticalTriggerGate const &b) |
Returns a gate with the minimum opening between the specified two. More... | |
static OpticalTriggerGate | Max (OpticalTriggerGate const &a, OpticalTriggerGate const &b) |
Returns a gate with the maximum opening between the specified two. More... | |
static OpticalTriggerGate | Sum (OpticalTriggerGate const &a, OpticalTriggerGate const &b) |
Returns a gate with opening sum of the specified two. More... | |
static OpticalTriggerGate | Mul (OpticalTriggerGate const &a, OpticalTriggerGate const &b) |
Returns a gate with opening product of the specified two. More... | |
template<typename Op > | |
static OpticalTriggerGate | SymmetricCombination (Op &&op, OpticalTriggerGate const &a, OpticalTriggerGate const &b, TriggerGateTicks_t aDelay=TriggerGateTicks_t{0}, TriggerGateTicks_t bDelay=TriggerGateTicks_t{0}) |
Returns a gate combination of the openings of two other gates. More... | |
Static Public Member Functions inherited from icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > | |
static ReadoutTriggerGate | Min (ReadoutTriggerGate const &a, ReadoutTriggerGate const &b) |
Returns a gate with the minimum opening between the specified two. More... | |
static ReadoutTriggerGate | Max (ReadoutTriggerGate const &a, ReadoutTriggerGate const &b) |
Returns a gate with the maximum opening between the specified two. More... | |
static ReadoutTriggerGate | Sum (ReadoutTriggerGate const &a, ReadoutTriggerGate const &b) |
Returns a gate with opening sum of the specified two. More... | |
static ReadoutTriggerGate | Mul (ReadoutTriggerGate const &a, ReadoutTriggerGate const &b) |
Returns a gate with opening product of the specified two. More... | |
template<typename Op > | |
static ReadoutTriggerGate | SymmetricCombination (Op &&op, ReadoutTriggerGate const &a, ReadoutTriggerGate const &b, ClockTicks_t aDelay=ClockTicks_t{0}, ClockTicks_t bDelay=ClockTicks_t{0}) |
Returns a gate combination of the openings of two other gates. More... | |
Static Public Member Functions inherited from icarus::trigger::TriggerGateData< Tick, TickInterval > | |
static triggergatedata_t | Min (triggergatedata_t const &a, triggergatedata_t const &b) |
Returns a gate with the minimum opening between the specified two. More... | |
static triggergatedata_t | Max (triggergatedata_t const &a, triggergatedata_t const &b) |
Returns a gate with the maximum opening between the specified two. More... | |
static triggergatedata_t | Sum (triggergatedata_t const &a, triggergatedata_t const &b) |
Returns a gate with opening sum of the specified two. More... | |
static triggergatedata_t | Mul (triggergatedata_t const &a, triggergatedata_t const &b) |
Returns a gate with opening product of the specified two. More... | |
template<typename Op > | |
static triggergatedata_t | SymmetricCombination (Op &&op, triggergatedata_t const &a, triggergatedata_t const &b, ClockTicks_t aDelay=ClockTicks_t{}, ClockTicks_t bDelay=ClockTicks_t{}) |
Returns a gate combination of the openings of two other gates. More... | |
Static Public Attributes inherited from icarus::trigger::TriggerGateData< Tick, TickInterval > | |
static constexpr ClockTick_t | MinTick = std::numeric_limits<ClockTick_t>::min() |
An unbearably small tick number. More... | |
static constexpr ClockTick_t | MaxTick = std::numeric_limits<ClockTick_t>::max() |
An unbearably large tick number. More... | |
Protected Types inherited from icarus::trigger::OpticalTriggerGate | |
using | Waveforms_t = std::vector< raw::OpDetWaveform const * > |
Internal list of registered waveforms. More... | |
Protected Types inherited from icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > | |
using | GateEvolution_t = typename Base_t::GateEvolution_t |
Protected Types inherited from icarus::trigger::TriggerGateData< Tick, TickInterval > | |
using | EventType = details::TriggerGateEventType |
using | Status = details::TriggerGateStatus< ClockTick_t, OpeningCount_t > |
using | GateEvolution_t = std::vector< Status > |
Type to describe the time evolution of the gate. More... | |
Protected Member Functions inherited from icarus::trigger::OpticalTriggerGate | |
OpticalTriggerGate (GateEvolution_t &&gateLevel, Waveforms_t &&waveforms) | |
Protected constructor: set the data directly. More... | |
void | registerWaveforms (Waveforms_t const &moreWaveforms) |
Registers the waveforms from the specified list. More... | |
void | mergeWaveformsFromGate (OpticalTriggerGate const &other) |
Registers the waveforms from the other gate into this one. More... | |
Protected Member Functions inherited from icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > | |
ReadoutTriggerGate (GateEvolution_t &&gateLevel, ChannelList_t &&channels) | |
Protected constructor: set the data directly. More... | |
template<typename BIter , typename EIter > | |
ReadoutTriggerGate (GateEvolution_t &&gateLevel, BIter b, EIter e) | |
Protected constructor: set the data directly. More... | |
ChannelList_t & | normalizeChannels () |
Removes duplicate channel IDs and sorts the remaining ones. More... | |
void | associateChannelsFromGate (ReadoutTriggerGate const &other) |
Associates this data with the channels from the other gate. More... | |
void | associateChannels (std::initializer_list< ChannelID_t > const &moreChannels) |
Associates this data with the channels from the specified list. More... | |
void | associateChannels (ChannelList_t const &moreChannels) |
Protected Member Functions inherited from icarus::trigger::TriggerGateData< Tick, TickInterval > | |
TriggerGateData (GateEvolution_t &&gateLevel) | |
Protected constructor: set the data directly. More... | |
Static Protected Member Functions inherited from icarus::trigger::OpticalTriggerGate | |
static Waveforms_t | mergeWaveforms (Waveforms_t const &a, Waveforms_t const &b) |
Registers the waveforms from the other gate into this one. More... | |
Static Protected Member Functions inherited from icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > | |
template<typename BIter , typename EIter > | |
static ChannelList_t & | mergeSortedChannelsInto (ChannelList_t &channels, BIter b, EIter e) |
static ChannelList_t & | normalizeSortedChannels (ChannelList_t &channels) |
Removes duplicate channel IDs. More... | |
template<typename BIter , typename EIter > | |
static ChannelList_t & | mergeChannelsInto (ChannelList_t &channels, BIter b, EIter e) |
Adds channels from iterators b to e into channels (returned). More... | |
static ChannelList_t | mergeChannels (ChannelList_t const &a, ChannelList_t const &b) |
Returns a merged list of channels from a and b . More... | |
static ChannelList_t & | normalizeChannels (ChannelList_t &channels) |
Removes duplicate channel IDs and sorts the remaining ones. More... | |
static ChannelList_t | normalizeChannels (ChannelList_t &&channels) |
Logical multi-level gate associated to one or more channels.
This object is a trigger gate associated with one or more readout channels. The object contains a single trigger gate, representing the combination of all involved channels.
Definition at line 54 of file MultiChannelOpticalTriggerGate.h.
|
inline |
Definition at line 62 of file MultiChannelOpticalTriggerGate.h.
|
inline |
Definition at line 64 of file MultiChannelOpticalTriggerGate.h.
|
delete |
Do not support single-channel interface.
|
inline |
Definition at line 68 of file MultiChannelOpticalTriggerGate.h.
|
inline |
Definition at line 70 of file MultiChannelOpticalTriggerGate.h.