Helper applying a beam gate to any gate. More...
#include <ApplyBeamGate.h>
Public Types | |
using | microseconds = util::quantities::intervals::microseconds |
Type aliases. More... | |
using | optical_tick = detinfo::timescales::optical_tick |
using | optical_time_ticks = detinfo::timescales::optical_time_ticks |
Public Member Functions | |
ApplyBeamGateClass (icarus::trigger::BeamGateStruct &&beamGate, std::string const &logCategory="ApplyBeamGateClass") | |
Constructor: gets the gate (in optical ticks) and its duration (in time). More... | |
icarus::trigger::OpticalTriggerGate const & | gate () const |
Returns the beam gate as a icarus::trigger::OpticalTriggerGate . More... | |
template<typename Gate > | |
Gate | gateAs () const |
Returns the beam gate as the specified gate type Gate . More... | |
template<typename Gate > | |
Gate | apply (Gate gate) const |
Returns a copy of gate in AND with this beam gate. More... | |
template<typename GateColl , typename GateObj = typename GateColl::value_type> | |
std::vector< GateObj > | applyToAll (GateColl const &gates) const |
auto | asSimulationTime () const |
Returns the gate as a simulation time range. More... | |
auto | tickRange () const |
Returns the range of the beam gate as start and stop tick. More... | |
microseconds | length () const |
Returns the length of the gate (in time units). More... | |
optical_time_ticks | lengthTicks () const |
Returns the length of the gate (in time units). More... | |
bool | operator== (ApplyBeamGateClass const &other) const |
Comparison operators. More... | |
bool | operator!= (ApplyBeamGateClass const &other) const |
Private Attributes | |
icarus::trigger::BeamGateStruct const | fGate |
Additional Inherited Members | |
Protected Member Functions inherited from icarus::ns::util::mfLoggingClass | |
mfLoggingClass (std::string const &logCategory) | |
Constructor: initializes with the specified log category. More... | |
std::string | logCategory () const |
Returns the logging category string for this object. More... | |
mfLoggingClass const & | loggingClass () const |
Returns this object (as a logging class object). More... | |
mf::LogError | mfLogError (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogError() stream for logging. More... | |
mf::LogWarning | mfLogWarning (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogWarning() stream for logging. More... | |
mf::LogProblem | mfLogProblem (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogProblem() stream for logging. More... | |
mf::LogInfo | mfLogInfo (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogInfo() stream for logging. More... | |
mf::LogVerbatim | mfLogVerbatim (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogVerbatim() stream for logging. More... | |
mf::LogDebug | mfLogDebug (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogDebug() stream for logging. More... | |
mf::LogTrace | mfLogTrace (std::string const &file={}, int const lineNumber=0) const |
Returns a mf::LogTrace() stream for logging. More... | |
Helper applying a beam gate to any gate.
The gate starts from detinfo::DetectorClocks::BeamGateTime()
(with an optional delay) and has length specified on construction.
The assumption that the optical tick clock starts with the electronics time is used.
Access to beam gate range may happen in a few ways: in simulation time scale and in optical time ticks. In all cases, the returned object supports the calls to start()
, stop()
and duration()
.
Definition at line 85 of file ApplyBeamGate.h.
Type aliases.
Definition at line 92 of file ApplyBeamGate.h.
Definition at line 93 of file ApplyBeamGate.h.
using icarus::trigger::ApplyBeamGateClass::optical_time_ticks = detinfo::timescales::optical_time_ticks |
Definition at line 94 of file ApplyBeamGate.h.
|
inline |
Constructor: gets the gate (in optical ticks) and its duration (in time).
Definition at line 98 of file ApplyBeamGate.h.
|
inline |
Returns a copy of gate
in AND with this beam gate.
Definition at line 116 of file ApplyBeamGate.h.
std::vector< GateObj > icarus::trigger::ApplyBeamGateClass::applyToAll | ( | GateColl const & | gates | ) | const |
Returns a collection of copies of the specified gates
each in AND with this beam gate.
Definition at line 198 of file ApplyBeamGate.h.
|
inline |
Returns the gate as a simulation time range.
Definition at line 126 of file ApplyBeamGate.h.
|
inline |
Returns the beam gate as a icarus::trigger::OpticalTriggerGate
.
Definition at line 107 of file ApplyBeamGate.h.
|
inline |
Returns the beam gate as the specified gate type Gate
.
Definition at line 112 of file ApplyBeamGate.h.
|
inline |
Returns the length of the gate (in time units).
Definition at line 132 of file ApplyBeamGate.h.
|
inline |
Returns the length of the gate (in time units).
Definition at line 135 of file ApplyBeamGate.h.
|
inline |
Definition at line 141 of file ApplyBeamGate.h.
|
inline |
Comparison operators.
Definition at line 139 of file ApplyBeamGate.h.
|
inline |
Returns the range of the beam gate as start and stop tick.
Definition at line 129 of file ApplyBeamGate.h.
|
private |
Definition at line 147 of file ApplyBeamGate.h.