All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
icarus::trigger::FixedTriggerGateBuilder::FixedGateManager::FixedGateInfo Struct Reference
Inheritance diagram for icarus::trigger::FixedTriggerGateBuilder::FixedGateManager::FixedGateInfo:
icarus::trigger::ManagedTriggerGateBuilder::GateManager::GateInfoBase

Public Member Functions

 FixedGateInfo (TriggerGate_t &gate, optical_time_ticks gateDuration, bool extendGate=false)
 
void belowThresholdAt (optical_tick)
 
void aboveThresholdAt (optical_tick tick)
 
- Public Member Functions inherited from icarus::trigger::ManagedTriggerGateBuilder::GateManager::GateInfoBase
 GateInfoBase (TriggerGate_t &gate)
 
TriggerGateData_toperator-> () const
 
TriggerGateData_tgate () const
 
void addTrackingInfo (raw::OpDetWaveform const &waveform) const
 
void belowThresholdAt (optical_tick tick)
 
void aboveThresholdAt (optical_tick tick)
 

Public Attributes

optical_tick openUntil { TriggerGateData_t::MinTick }
 Activity ignored up to this tick excluded. More...
 
optical_time_ticks gateDuration
 Ticks to keep the gate open. More...
 
bool const extendGate { false }
 Whether new crossings extend the duration of opening or are ignored. More...
 
- Public Attributes inherited from icarus::trigger::ManagedTriggerGateBuilder::GateManager::GateInfoBase
TriggerGate_tpGate = nullptr
 Pointer to the gate. More...
 

Additional Inherited Members

- Public Types inherited from icarus::trigger::ManagedTriggerGateBuilder::GateManager::GateInfoBase
using TriggerGate_t = Base_t::TriggerGates::triggergate_t
 
using TriggerGateData_t = TriggerGate_t::TriggerGate_t
 

Detailed Description

Definition at line 75 of file FixedTriggerGateBuilder.h.

Constructor & Destructor Documentation

icarus::trigger::FixedTriggerGateBuilder::FixedGateManager::FixedGateInfo::FixedGateInfo ( TriggerGate_t gate,
optical_time_ticks  gateDuration,
bool  extendGate = false 
)
inline

Member Function Documentation

void icarus::trigger::FixedTriggerGateBuilder::FixedGateManager::FixedGateInfo::aboveThresholdAt ( optical_tick  tick)
inline

Definition at line 93 of file FixedTriggerGateBuilder.h.

94  {
95  using namespace util::quantities::electronics_literals;
96  MF_LOG_TRACE(details::TriggerGateDebugLog)
97  << "Declared above threshold at: " << tick;
98  if ((tick < openUntil) && !extendGate) {
99  MF_LOG_TRACE(details::TriggerGateDebugLog)
100  << " we are in dead time until " << openUntil
101  << ", come back later.";
102  return; // open only if not in "dead time"
103  }
104 
105  // open or extend the gate:
106  auto const reopenAt = extendGate? openUntil: tick;
107  openUntil = tick + gateDuration; // set some dead time
108  gate().openBetween(reopenAt.value(), openUntil.value());
109 
110  MF_LOG_TRACE(details::TriggerGateDebugLog) << " gate (re)opened ("
111  << gate().openingCount((tick - 1_tick).value())
112  << " => " << gate().openingCount(tick.value())
113  << ") for " << gateDuration << " until " << openUntil
114  << " (" << gate().openingCount((openUntil - 1_tick).value())
115  << " => " << gate().openingCount(openUntil.value()) << ")";
116  } // aboveThresholdAt()
constexpr auto TriggerGateDebugLog
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:75
optical_tick openUntil
Activity ignored up to this tick excluded.
bool const extendGate
Whether new crossings extend the duration of opening or are ignored.
temporary value
void icarus::trigger::FixedTriggerGateBuilder::FixedGateManager::FixedGateInfo::belowThresholdAt ( optical_tick  )
inline

Definition at line 92 of file FixedTriggerGateBuilder.h.

92 {}

Member Data Documentation

bool const icarus::trigger::FixedTriggerGateBuilder::FixedGateManager::FixedGateInfo::extendGate { false }

Whether new crossings extend the duration of opening or are ignored.

Definition at line 83 of file FixedTriggerGateBuilder.h.

optical_time_ticks icarus::trigger::FixedTriggerGateBuilder::FixedGateManager::FixedGateInfo::gateDuration

Ticks to keep the gate open.

Definition at line 80 of file FixedTriggerGateBuilder.h.

optical_tick icarus::trigger::FixedTriggerGateBuilder::FixedGateManager::FixedGateInfo::openUntil { TriggerGateData_t::MinTick }

Activity ignored up to this tick excluded.

Definition at line 77 of file FixedTriggerGateBuilder.h.


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