All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Private Types | Private Attributes | List of all members
icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > Class Template Reference

Logical multi-level gate associated to one or more readout channels. More...

#include <ReadoutTriggerGate.h>

Inheritance diagram for icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >:
icarus::trigger::TriggerGateData< Tick, TickInterval > icarus::trigger::ReadoutTriggerGateTag icarus::trigger::OpticalTriggerGate icarus::trigger::MultiChannelOpticalTriggerGate icarus::trigger::SingleChannelOpticalTriggerGate

Public Types

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...
 

Public Member Functions

 ReadoutTriggerGate ()=default
 
 ReadoutTriggerGate (ReadoutTriggerGate const &)=default
 
 ReadoutTriggerGate (ReadoutTriggerGate &&)=default
 
ReadoutTriggerGateoperator= (ReadoutTriggerGate const &)=default
 
ReadoutTriggerGateoperator= (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_taddChannel (ChannelID_t const channel)
 Associates the specified channel to this readout gate. More...
 
This_taddChannels (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
 
ReadoutTriggerGateoperator= (GateData_t const &data)
 Copies/steals all the levels from the specified data. More...
 
ReadoutTriggerGateoperator= (GateData_t &&data)
 
Gate query
GateData_t const & gateLevels () const
 Access to the underlying gate level data. More...
 
GateData_tgateLevels ()
 Access to the underlying gate level data (mutable). 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_tMin (triggergatedata_t const &other)
 Combines with a gate, keeping the minimum opening among the two. More...
 
triggergatedata_tMax (triggergatedata_t const &other)
 Combines with a gate, keeping the maximum opening among the two. More...
 
triggergatedata_tSum (triggergatedata_t const &other)
 Combines with a gate, keeping the sum of openings of the two. More...
 
triggergatedata_tMul (triggergatedata_t const &other)
 Combines with a gate, keeping the product of openings of the two. More...
 

Protected Types

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

 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_tnormalizeChannels ()
 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

template<typename BIter , typename EIter >
static ChannelList_tmergeSortedChannelsInto (ChannelList_t &channels, BIter b, EIter e)
 
static ChannelList_tnormalizeSortedChannels (ChannelList_t &channels)
 Removes duplicate channel IDs. More...
 
template<typename BIter , typename EIter >
static ChannelList_tmergeChannelsInto (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_tnormalizeChannels (ChannelList_t &channels)
 Removes duplicate channel IDs and sorts the remaining ones. More...
 
static ChannelList_t normalizeChannels (ChannelList_t &&channels)
 

Private Types

using Base_t = icarus::trigger::TriggerGateData< Tick, TickInterval >
 Type of the base class. More...
 
using This_t = icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >
 Type of this class. More...
 

Private Attributes

ChannelList_t fChannels
 List of readout channels associated to this data. More...
 

Combination operations

ReadoutTriggerGateMin (ReadoutTriggerGate const &other)
 Combines with a gate, keeping the minimum opening among the two. More...
 
ReadoutTriggerGateMax (ReadoutTriggerGate const &other)
 Combines with a gate, keeping the maximum opening among the two. More...
 
ReadoutTriggerGateSum (ReadoutTriggerGate const &other)
 Combines with a gate, keeping the sum of openings of the two. More...
 
ReadoutTriggerGateMul (ReadoutTriggerGate const &other)
 Combines with a gate, keeping the product of openings of the two. More...
 
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...
 

Additional Inherited Members

- 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...
 

Detailed Description

template<typename Tick, typename TickInterval, typename ChannelIDType>
class icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >

Logical multi-level gate associated to one or more readout channels.

Template Parameters
Ticktype used to count the ticks
TickIntervaltype used to quantify tick difference
ChannelIDTypetype of channel ID

This object is a trigger gate associated with one or more readout channels. The channels are expressed as channel identifiers.

Note
This object should be parametrized with optical ticks (detinfo::timescales::optical_tick). But currently the quantities (util::quantity derived objects) are not well suited to be serialized by ROOT, because
  1. they are defined in lardataalg rather than lardataobj
  2. writing all their serialization is daunting (see how ROOT dealt with GenVector vectors for an example of how to do it) So we chicken out here and use simple data types instead.

Definition at line 41 of file ReadoutTriggerGate.h.

Member Typedef Documentation

template<typename Tick, typename TickInterval, typename ChannelIDType>
using icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::Base_t = icarus::trigger::TriggerGateData<Tick, TickInterval>
private

Type of the base class.

Definition at line 108 of file ReadoutTriggerGate.h.

template<typename Tick, typename TickInterval, typename ChannelIDType>
using icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::ChannelID_t = ChannelIDType

Type of stored channel ID.

Definition at line 118 of file ReadoutTriggerGate.h.

template<typename Tick, typename TickInterval, typename ChannelIDType>
using icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::ChannelList_t = std::vector<ChannelID_t>

Type of list of associated channels.

Definition at line 124 of file ReadoutTriggerGate.h.

template<typename Tick, typename TickInterval, typename ChannelIDType>
using icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::ClockTick_t = Tick

Tick point.

Definition at line 116 of file ReadoutTriggerGate.h.

template<typename Tick, typename TickInterval, typename ChannelIDType>
using icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::ClockTicks_t = TickInterval

Tick interval.

Definition at line 117 of file ReadoutTriggerGate.h.

template<typename Tick, typename TickInterval, typename ChannelIDType>
using icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::GateData_t = Base_t

Type for gate data access.

Definition at line 121 of file ReadoutTriggerGate.h.

template<typename Tick, typename TickInterval, typename ChannelIDType>
using icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::GateEvolution_t = typename Base_t::GateEvolution_t
protected

Definition at line 327 of file ReadoutTriggerGate.h.

template<typename Tick, typename TickInterval, typename ChannelIDType>
using icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::This_t = icarus::trigger::ReadoutTriggerGate<Tick, TickInterval, ChannelIDType>
private

Type of this class.

Definition at line 112 of file ReadoutTriggerGate.h.

Constructor & Destructor Documentation

template<typename Tick, typename TickInterval, typename ChannelIDType>
icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::ReadoutTriggerGate ( )
default

Constructor: a closed gate with no associated channels

See Also
ReadoutTriggerGate(std::initializer_list<ChannelID_t>), addChannel(), addChannels()
template<typename Tick, typename TickInterval, typename ChannelIDType>
icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::ReadoutTriggerGate ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  )
default
template<typename Tick, typename TickInterval, typename ChannelIDType>
icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::ReadoutTriggerGate ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > &&  )
default
template<typename Tick, typename TickInterval, typename ChannelIDType>
icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::ReadoutTriggerGate ( std::initializer_list< ChannelID_t channels)

Constructor: a closed gate associated to the specified channels.

template<typename Tick, typename TickInterval, typename ChannelIDType>
icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::ReadoutTriggerGate ( GateEvolution_t &&  gateLevel,
ChannelList_t &&  channels 
)
inlineprotected

Protected constructor: set the data directly.

Definition at line 330 of file ReadoutTriggerGate.h.

331  : Base_t(std::move(gateLevel)), fChannels(std::move(channels))
332  { normalizeChannels(); }
decltype(auto) channels() const
Returns the channels associated to the gate data.
ChannelList_t & normalizeChannels()
Removes duplicate channel IDs and sorts the remaining ones.
icarus::trigger::TriggerGateData< Tick, TickInterval > Base_t
Type of the base class.
ChannelList_t fChannels
List of readout channels associated to this data.
template<typename Tick, typename TickInterval, typename ChannelIDType>
template<typename BIter , typename EIter >
icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::ReadoutTriggerGate ( GateEvolution_t &&  gateLevel,
BIter  b,
EIter  e 
)
inlineprotected

Protected constructor: set the data directly.

Definition at line 336 of file ReadoutTriggerGate.h.

337  : Base_t(std::move(gateLevel)), fChannels(b, e)
338  { normalizeChannels(); }
ChannelList_t & normalizeChannels()
Removes duplicate channel IDs and sorts the remaining ones.
do i e
icarus::trigger::TriggerGateData< Tick, TickInterval > Base_t
Type of the base class.
ChannelList_t fChannels
List of readout channels associated to this data.

Member Function Documentation

template<typename Tick, typename TickInterval, typename ChannelIDType>
This_t& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::addChannel ( ChannelID_t const  channel)

Associates the specified channel to this readout gate.

template<typename Tick, typename TickInterval, typename ChannelIDType>
This_t& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::addChannels ( std::initializer_list< ChannelID_t channels)
inline

Associates the specified channels to this readout gate.

Definition at line 206 of file ReadoutTriggerGate.h.

207  { associateChannels(channels); return *this; }
decltype(auto) channels() const
Returns the channels associated to the gate data.
void associateChannels(std::initializer_list< ChannelID_t > const &moreChannels)
Associates this data with the channels from the specified list.
template<typename Tick, typename TickInterval, typename ChannelIDType>
void icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::associateChannels ( std::initializer_list< ChannelID_t > const &  moreChannels)
protected

Associates this data with the channels from the specified list.

template<typename Tick, typename TickInterval, typename ChannelIDType>
void icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::associateChannels ( ChannelList_t const &  moreChannels)
protected
template<typename Tick, typename TickInterval, typename ChannelIDType>
void icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::associateChannelsFromGate ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  other)
inlineprotected

Associates this data with the channels from the other gate.

Definition at line 352 of file ReadoutTriggerGate.h.

353  { associateChannels(other.channels()); }
void associateChannels(std::initializer_list< ChannelID_t > const &moreChannels)
Associates this data with the channels from the specified list.
template<typename Tick, typename TickInterval, typename ChannelIDType>
ChannelID_t icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::channel ( ) const

Returns the channel associated to the gate data.

Returns
the channel associated to the gate data
Exceptions
MoreThanOneChannelErrorif more than one associated channel
NoChannelErrorif no channel is associated
See Also
hasChannel()
template<typename Tick, typename TickInterval, typename ChannelIDType>
decltype(auto) icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::channels ( ) const

Returns the channels associated to the gate data.

Returns
an iterable object with all channel IDs associated to the gate data
See Also
hasChannels(), channel()
template<typename Tick, typename TickInterval, typename ChannelIDType>
GateData_t const& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::gateLevels ( ) const
inline

Access to the underlying gate level data.

Definition at line 155 of file ReadoutTriggerGate.h.

155 { return *this; }
template<typename Tick, typename TickInterval, typename ChannelIDType>
GateData_t& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::gateLevels ( )
inline

Access to the underlying gate level data (mutable).

Definition at line 158 of file ReadoutTriggerGate.h.

158 { return *this; }
template<typename Tick, typename TickInterval, typename ChannelIDType>
bool icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::hasChannel ( ) const
inline

Returns whether exactly one channel id associated to the gate data.

Returns
whether exactly one channel id associated to the gate data
See Also
channel()

If this methods returns true, channel() can safely be used.

Definition at line 180 of file ReadoutTriggerGate.h.

180 { return nChannels() == 1U; }
std::size_t nChannels() const
Returns the number of associated channels.
template<typename Tick, typename TickInterval, typename ChannelIDType>
bool icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::hasChannels ( ) const
inline

Returns whether there is any channel id associated to the gate data.

Returns
whether channel ids are associated to the gate data
See Also
hasChannel()

Definition at line 171 of file ReadoutTriggerGate.h.

171 { return !fChannels.empty(); }
ChannelList_t fChannels
List of readout channels associated to this data.
template<typename Tick, typename TickInterval, typename ChannelIDType>
ReadoutTriggerGate& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::Max ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  other)

Combines with a gate, keeping the maximum opening among the two.

Parameters
othergate to combine to
Returns
this object
See Also
Min(), Sum()

Multi-level equivalent of an or logical operation.

template<typename Tick, typename TickInterval, typename ChannelIDType>
static ReadoutTriggerGate icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::Max ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  a,
ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  b 
)
static

Returns a gate with the maximum opening between the specified two.

Parameters
afirst gate
bsecond gate
Returns
gate with at every tick the maximum opening among a and b
See Also
Min(), Sum()

Multi-level equivalent of an or logical operation.

template<typename Tick, typename TickInterval, typename ChannelIDType>
static ChannelList_t icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::mergeChannels ( ChannelList_t const &  a,
ChannelList_t const &  b 
)
staticprotected

Returns a merged list of channels from a and b.

template<typename Tick, typename TickInterval, typename ChannelIDType>
template<typename BIter , typename EIter >
static ChannelList_t& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::mergeChannelsInto ( ChannelList_t channels,
BIter  b,
EIter  e 
)
staticprotected

Adds channels from iterators b to e into channels (returned).

template<typename Tick, typename TickInterval, typename ChannelIDType>
template<typename BIter , typename EIter >
static ChannelList_t& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::mergeSortedChannelsInto ( ChannelList_t channels,
BIter  b,
EIter  e 
)
staticprotected
template<typename Tick, typename TickInterval, typename ChannelIDType>
ReadoutTriggerGate& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::Min ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  other)

Combines with a gate, keeping the minimum opening among the two.

Parameters
othergate to combine to
Returns
this object
See Also
Max()

Multi-level equivalent of an and logical operation.

template<typename Tick, typename TickInterval, typename ChannelIDType>
static ReadoutTriggerGate icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::Min ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  a,
ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  b 
)
static

Returns a gate with the minimum opening between the specified two.

Parameters
afirst gate
bsecond gate
Returns
gate with at every tick the minimum opening among a and b
See Also
Max()

Multi-level equivalent of an and logical operation.

template<typename Tick, typename TickInterval, typename ChannelIDType>
ReadoutTriggerGate& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::Mul ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  other)

Combines with a gate, keeping the product of openings of the two.

Parameters
othergate to combine to
Returns
this object
See Also
Min(), Max(), Sum()
template<typename Tick, typename TickInterval, typename ChannelIDType>
static ReadoutTriggerGate icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::Mul ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  a,
ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  b 
)
static

Returns a gate with opening product of the specified two.

Parameters
afirst gate
bsecond gate
Returns
gate with at every tick the product of openings of a and b
See Also
Max()
template<typename Tick, typename TickInterval, typename ChannelIDType>
std::size_t icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::nChannels ( ) const
inline

Returns the number of associated channels.

Definition at line 183 of file ReadoutTriggerGate.h.

183 { return fChannels.size(); }
ChannelList_t fChannels
List of readout channels associated to this data.
template<typename Tick, typename TickInterval, typename ChannelIDType>
ChannelList_t& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::normalizeChannels ( )
inlineprotected

Removes duplicate channel IDs and sorts the remaining ones.

Definition at line 342 of file ReadoutTriggerGate.h.

342 { return normalizeChannels(fChannels); }
ChannelList_t & normalizeChannels()
Removes duplicate channel IDs and sorts the remaining ones.
ChannelList_t fChannels
List of readout channels associated to this data.
template<typename Tick, typename TickInterval, typename ChannelIDType>
static ChannelList_t& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::normalizeChannels ( ChannelList_t channels)
staticprotected

Removes duplicate channel IDs and sorts the remaining ones.

template<typename Tick, typename TickInterval, typename ChannelIDType>
static ChannelList_t icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::normalizeChannels ( ChannelList_t &&  channels)
staticprotected
template<typename Tick, typename TickInterval, typename ChannelIDType>
static ChannelList_t& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::normalizeSortedChannels ( ChannelList_t channels)
staticprotected

Removes duplicate channel IDs.

template<typename Tick, typename TickInterval, typename ChannelIDType>
bool icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::operator!= ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  ) const
template<typename Tick, typename TickInterval, typename ChannelIDType>
ReadoutTriggerGate& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::operator= ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  )
default
template<typename Tick, typename TickInterval, typename ChannelIDType>
ReadoutTriggerGate& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::operator= ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > &&  )
default
template<typename Tick, typename TickInterval, typename ChannelIDType>
ReadoutTriggerGate& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::operator= ( GateData_t const &  data)
inline

Copies/steals all the levels from the specified data.

Definition at line 143 of file ReadoutTriggerGate.h.

144  { GateData_t::operator=(data); return *this; }
template<typename Tick, typename TickInterval, typename ChannelIDType>
ReadoutTriggerGate& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::operator= ( GateData_t &&  data)
inline

Definition at line 145 of file ReadoutTriggerGate.h.

146  { GateData_t::operator=(std::move(data)); return *this; }
template<typename Tick, typename TickInterval, typename ChannelIDType>
bool icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::operator== ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  ) const
template<typename Tick, typename TickInterval, typename ChannelIDType>
ReadoutTriggerGate& icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::Sum ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  other)

Combines with a gate, keeping the sum of openings of the two.

Parameters
othergate to combine to
Returns
this object
See Also
Min(), Max()
template<typename Tick, typename TickInterval, typename ChannelIDType>
static ReadoutTriggerGate icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::Sum ( ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  a,
ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  b 
)
static

Returns a gate with opening sum of the specified two.

Parameters
afirst gate
bsecond gate
Returns
gate with at every tick the total opening of a and b
See Also
Max()
template<typename Tick, typename TickInterval, typename ChannelIDType>
template<typename Op >
static ReadoutTriggerGate icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::SymmetricCombination ( Op &&  op,
ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  a,
ReadoutTriggerGate< Tick, TickInterval, ChannelIDType > const &  b,
ClockTicks_t  aDelay = ClockTicks_t{0},
ClockTicks_t  bDelay = ClockTicks_t{0} 
)
static

Returns a gate combination of the openings of two other gates.

Template Parameters
Opbinary operation: OpeningCount_t (x2) to OpeningCount_t
Parameters
opsymmetric binary combination operation
afirst gate
bsecond gate
Returns
gate with opening combination of a and b

For this algorithm to work, the operation needs to be symmetric, i.e. op(c1, c2) == op(c2, c1) for every valid combinations of counts c1 and c2.

Member Data Documentation

template<typename Tick, typename TickInterval, typename ChannelIDType>
ChannelList_t icarus::trigger::ReadoutTriggerGate< Tick, TickInterval, ChannelIDType >::fChannels
private

List of readout channels associated to this data.

Definition at line 382 of file ReadoutTriggerGate.h.


The documentation for this class was generated from the following file: