All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
icarus::trigger::TrackedTriggerGate< Gate, TrackedType > Class Template Reference

A wrapper to trigger gate objects tracking the input of operations. More...

#include <TrackedTriggerGate.h>

Classes

class  TrackingInfo
 Tracked information. Interface is pretty minimal so far. More...
 

Public Types

using TriggerGate_t = Gate
 Gate type being wrapped. More...
 
using Tracked_t = TrackedType
 Type for tracking. More...
 

Public Member Functions

 TrackedTriggerGate ()=default
 Default constructor: default-constructed gate, no tracking. More...
 
 TrackedTriggerGate (TriggerGate_t gate)
 Constructor: copies the data of the specified gate (no tracking added). More...
 
decltype(auto) channels () const
 Returns the list of channels of the enclosed gate. More...
 
TrackingInfo const & tracking () const
 Returns the tracking information. More...
 
TrackingInfotracking ()
 
TriggerGate_t const & gate () const &
 Returns the enclosed gate. More...
 
TriggerGate_tgate ()&
 
TriggerGate_t && gate ()&&
 

Private Attributes

TriggerGate_t fGate
 Local copy of the gate information. More...
 
TrackingInfo fTracking
 Tracking information. More...
 

Detailed Description

template<typename Gate, typename TrackedType>
class icarus::trigger::TrackedTriggerGate< Gate, TrackedType >

A wrapper to trigger gate objects tracking the input of operations.

Template Parameters
Gatetype of trigger gate object being wrapped
TrackedTypetype of the objects being tracked

This object includes its own Gate object, plus tracking().

Functions taking as argument a generic sequence of Gate objects can be passed the result of icarus::trigger::gatesIn() (sold separately), which behaves like a sequence of Gate.

Supporting functions can add specific tracking operations when operating of a TrackedTriggerGate object. The trait icarus::trigger::isTrackedTriggerGate_v will return whether that is the case.

Tracking is performed by accessing tracking() and add()'ing objects to be tracked. Tracking is currently just a collection of objects of a specific type (TrackedType). That type is expected to support strict comparison. A copy of each tracking object is used and owned: if the object is complex and externally owned, a pointer or handle should be stored as tracking object instead of the object itself. If an object is already present, it is not added again into the tracking.

The Gate type is expected to be a trigger gate type, like icarus::trigger::ReadoutTriggerGate.

Definition at line 40 of file TrackedTriggerGate.h.

Member Typedef Documentation

template<typename Gate, typename TrackedType>
using icarus::trigger::TrackedTriggerGate< Gate, TrackedType >::Tracked_t = TrackedType

Type for tracking.

Definition at line 105 of file TrackedTriggerGate.h.

template<typename Gate, typename TrackedType>
using icarus::trigger::TrackedTriggerGate< Gate, TrackedType >::TriggerGate_t = Gate

Gate type being wrapped.

Definition at line 104 of file TrackedTriggerGate.h.

Constructor & Destructor Documentation

template<typename Gate, typename TrackedType>
icarus::trigger::TrackedTriggerGate< Gate, TrackedType >::TrackedTriggerGate ( )
default

Default constructor: default-constructed gate, no tracking.

template<typename Gate, typename TrackedType>
icarus::trigger::TrackedTriggerGate< Gate, TrackedType >::TrackedTriggerGate ( TriggerGate_t  gate)
inline

Constructor: copies the data of the specified gate (no tracking added).

Definition at line 135 of file TrackedTriggerGate.h.

135 : fGate(std::move(gate)) {}
TriggerGate_t fGate
Local copy of the gate information.
TriggerGate_t const & gate() const &
Returns the enclosed gate.

Member Function Documentation

template<typename Gate, typename TrackedType>
decltype(auto) icarus::trigger::TrackedTriggerGate< Gate, TrackedType >::channels ( ) const
inline

Returns the list of channels of the enclosed gate.

Definition at line 158 of file TrackedTriggerGate.h.

158 { return gate().channels(); }
TriggerGate_t const & gate() const &
Returns the enclosed gate.
template<typename Gate, typename TrackedType>
TriggerGate_t const& icarus::trigger::TrackedTriggerGate< Gate, TrackedType >::gate ( ) const
inline

Returns the enclosed gate.

Definition at line 150 of file TrackedTriggerGate.h.

150 { return fGate; }
TriggerGate_t fGate
Local copy of the gate information.
template<typename Gate, typename TrackedType>
TriggerGate_t& icarus::trigger::TrackedTriggerGate< Gate, TrackedType >::gate ( )
inline

Definition at line 151 of file TrackedTriggerGate.h.

151 { return fGate; }
TriggerGate_t fGate
Local copy of the gate information.
template<typename Gate, typename TrackedType>
TriggerGate_t&& icarus::trigger::TrackedTriggerGate< Gate, TrackedType >::gate ( )
inline

Definition at line 152 of file TrackedTriggerGate.h.

152 { return std::move(fGate); }
TriggerGate_t fGate
Local copy of the gate information.
template<typename Gate, typename TrackedType>
TrackingInfo const& icarus::trigger::TrackedTriggerGate< Gate, TrackedType >::tracking ( ) const
inline

Returns the tracking information.

Definition at line 141 of file TrackedTriggerGate.h.

141 { return fTracking; }
TrackingInfo fTracking
Tracking information.
template<typename Gate, typename TrackedType>
TrackingInfo& icarus::trigger::TrackedTriggerGate< Gate, TrackedType >::tracking ( )
inline

Definition at line 142 of file TrackedTriggerGate.h.

142 { return fTracking; }
TrackingInfo fTracking
Tracking information.

Member Data Documentation

template<typename Gate, typename TrackedType>
TriggerGate_t icarus::trigger::TrackedTriggerGate< Gate, TrackedType >::fGate
private

Local copy of the gate information.

Definition at line 162 of file TrackedTriggerGate.h.

template<typename Gate, typename TrackedType>
TrackingInfo icarus::trigger::TrackedTriggerGate< Gate, TrackedType >::fTracking
private

Tracking information.

Definition at line 163 of file TrackedTriggerGate.h.


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