51 #include "art_root_io/TFileService.h"
52 #include "art_root_io/TFileDirectory.h"
53 #include "art/Framework/Services/Registry/ServiceHandle.h"
54 #include "art/Framework/Core/EDProducer.h"
55 #include "art/Framework/Core/ModuleMacros.h"
56 #include "art/Framework/Principal/Event.h"
57 #include "canvas/Utilities/InputTag.h"
58 #include "canvas/Utilities/Exception.h"
59 #include "messagefacility/MessageLogger/MessageLogger.h"
60 #include "fhiclcpp/types/Sequence.h"
61 #include "fhiclcpp/types/OptionalAtom.h"
62 #include "fhiclcpp/types/Atom.h"
65 #include "TEfficiency.h"
86 using namespace util::quantities::time_literals;
90 namespace icarus::trigger {
class SlidingWindowTriggerSimulation; }
254 :
public art::EDProducer
270 fhicl::Atom<std::string> TriggerGatesTag {
271 Name(
"TriggerGatesTag"),
272 Comment(
"label of the input trigger gate data product (no instance name)")
277 Comment(
"tags of the thresholds to consider")
280 fhicl::OptionalAtom<bool> KeepThresholdName {
281 Name(
"KeepThresholdName"),
283 (
"add threshold to output product tag even with only one threshold")
288 Comment(
"trigger requirements as a trigger window pattern")
291 fhicl::Atom<microseconds> BeamGateDuration {
292 Name(
"BeamGateDuration"),
293 Comment(
"length of time interval when optical triggers are accepted")
296 fhicl::Atom<microseconds> BeamGateStart {
297 Name(
"BeamGateStart"),
298 Comment(
"open the beam gate this long after the nominal beam gate time"),
302 fhicl::Atom<std::uint32_t> BeamBits {
304 Comment(
"bits to be set in the trigger object as beam identified")
307 fhicl::Atom<nanoseconds> TriggerTimeResolution {
308 Name(
"TriggerTimeResolution"),
309 Comment(
"resolution of trigger in time"),
313 fhicl::Atom<double> EventTimeBinning {
314 Name(
"EventTimeBinning"),
315 Comment(
"binning for the trigger time plot [second]"),
319 fhicl::Atom<std::string> LogCategory {
321 Comment(
"name of the category used for the output"),
322 "SlidingWindowTriggerSimulation"
340 virtual void beginJob()
override;
343 virtual void produce(art::Event& event)
override;
346 virtual void endJob()
override;
423 std::optional<icarus::trigger::SlidingWindowPatternAlg>
fPatternAlg;
436 std::atomic<unsigned int> fTotalEvents { 0U };
449 void initializePlots();
452 void finalizePlots();
456 void makeThresholdPlots(
457 std::string
const& threshold,
463 void makeEventPlots();
470 void plotTriggerResponse(
471 std::size_t iThr, std::string
const& thrTag,
499 std::size_t
const iThr, std::string
const& thrTag
518 void printSummary()
const;
521 TH1* makeHistogramFromBinnedContent(
523 std::string
const&
name, std::string
const& title,
533 fBeamGateDuration, fBeamGateStart,
539 (art::Event
const* event =
nullptr)
const
542 (art::Event
const& event)
const {
return makeMyBeamGate(&event); }
548 static TriggerGates_t readTriggerGates
549 (art::Event
const& event, art::InputTag
const& dataTag);
553 static double eventTimestampInSeconds(art::Timestamp
const& time);
554 static double eventTimestampInSeconds(art::Event
const& event);
566 : art::EDProducer (config)
568 , fPattern (config().
Pattern())
569 , fBeamGateDuration (config().BeamGateDuration())
570 , fBeamGateStart (config().BeamGateStart())
571 , fBeamBits (config().BeamBits())
572 , fTriggerTimeResolution(config().TriggerTimeResolution())
573 , fEventTimeBinning (config().EventTimeBinning())
576 , fOutputDir (*art::ServiceHandle<art::TFileService>())
579 { *lar::providerFrom<geo::Geometry>(),
fLogCategory +
"_WindowMapManager" }
581 fOutputDir,
"",
"requirement: " + fPattern.description()
586 fTriggerTimeResolution.convertInto
587 <detinfo::timescales::trigger_time::interval_t>().
value()
590 fTriggerTimeResolution.convertInto
591 <detinfo::timescales::trigger_time::interval_t>().
value()
594 fTriggerTimeResolution.convertInto
595 <detinfo::timescales::trigger_time::interval_t>().
value()
603 std::string
const& discrModuleLabel = config().TriggerGatesTag();
604 for (std::string
const& threshold: config().
Thresholds())
605 fADCthresholds[threshold] = art::InputTag{ discrModuleLabel, threshold };
608 fTriggerCount = std::vector<std::atomic<unsigned int>>(fADCthresholds.size());
609 std::fill(fTriggerCount.begin(), fTriggerCount.end(), 0U);
618 consumes<std::vector<OpticalTriggerGateData_t>>(inputDataTag);
619 consumes<art::Assns<OpticalTriggerGateData_t, sbn::OpDetWaveformMeta>>
627 bool const keepThresholdName
628 = config().KeepThresholdName().value_or(config().
Thresholds().
size() > 1);
630 throw art::Exception(art::errors::Configuration)
631 << config().KeepThresholdName.name()
632 <<
" can be set to `true` only when a single threshold is specified ("
633 << config().Thresholds.name() <<
" has " << config().Thresholds().size()
638 std::string
const outputInstance
639 = keepThresholdName? inputDataTag.instance():
"";
640 produces<std::vector<raw::Trigger>>(outputInstance);
641 fOutputInstances.push_back(outputInstance);
646 log <<
"\nConfigured " << fADCthresholds.size() <<
" thresholds (ADC):";
647 for (
auto const& [ thresholdTag, dataTag ]: fADCthresholds)
648 log <<
"\n * " << thresholdTag <<
" (from '" << dataTag.encode() <<
"')";
669 = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(event);
671 auto const beamGate = makeMyBeamGate(clockData);
673 if (
auto oldGate = fGateChangeCheck(beamGate); oldGate) {
675 <<
"Beam gate has changed from " << *oldGate <<
" to " << beamGate;
680 log <<
"Event " <<
event.id() <<
":";
682 for (
auto const& [ iThr, thrTag ]
687 = produceForThreshold(event,
detTimings, beamGate, iThr, thrTag);
689 log <<
"\n * threshold " << thrTag <<
": ";
690 if (triggerInfo) log <<
"trigger at " << triggerInfo.
info.
atTick();
691 else log <<
"not triggered";
719 std::vector<std::string> thresholdLabels;
720 thresholdLabels.reserve(
size(fADCthresholds));
721 for (std::string thr: util::get_elements<0U>(fADCthresholds))
722 thresholdLabels.push_back(std::move(thr));
724 auto const beamGate = makeMyBeamGate();
725 fGateChangeCheck(beamGate);
727 <<
"Beam gate for plots: " << beamGate.asSimulationTime()
728 <<
" (simulation time), " << beamGate.tickRange()
729 <<
" (optical ticks)"
735 auto* NTriggers = fPlots.make<TH1F>(
737 "Number of triggering events"
738 ";PMT discrimination threshold [ ADC counts ]"
740 thresholdLabels.size(), 0.0, double(thresholdLabels.size())
744 auto* Eff = fPlots.make<TEfficiency>(
746 "Triggering pass fraction"
747 ";PMT discrimination threshold [ ADC counts ]"
748 ";trigger pass fraction",
749 thresholdLabels.size(), 0.0, double(thresholdLabels.size())
756 (const_cast<TH1*>(Eff->GetTotalHistogram())->GetXaxis(), thresholdLabels);
762 auto const& beamGateTicks = beamGate.tickRange();
763 auto* TrigTime = fPlots.make<TH2F>(
766 ";optical time tick [ /" +
util::to_string(triggerResolutionTicks) +
" ]"
767 ";PMT discrimination threshold [ ADC counts ]"
769 static_cast<int>(std::ceil(beamGate.lengthTicks()/triggerResolutionTicks)),
770 beamGateTicks.start().value(),
772 (beamGateTicks.start() + beamGate.lengthTicks(), triggerResolutionTicks)
774 thresholdLabels.size(), 0.0, double(thresholdLabels.size())
791 (- beamGate.length() - beamPlotPadding).
value(),
792 (beamGate.length() + beamPlotPadding).
value(),
793 fTriggerTimeResolution.convertInto<trigger_time::interval_t>().
value()
798 "TriggerTimeVsHWTrig",
799 "Time of the trigger"
800 ";trigger time (relative to hardware trigger) [ #mus ]"
801 ";PMT discrimination threshold [ ADC counts ]"
804 thresholdLabels.size(), 0.0, double(thresholdLabels.size())
809 (-beamPlotPadding).
value(),
810 (beamGate.length() + beamPlotPadding).
value(),
811 fTriggerTimeResolution.convertInto<trigger_time::interval_t>().
value()
816 "TriggerTimeVsBeamGate",
817 "Time of the trigger"
818 ";trigger time (relative to beam gate opening) [ #mus ]"
819 ";PMT discrimination threshold [ ADC counts ]"
821 beamGateBinning.
nBins(), beamGateBinning.
lower(), beamGateBinning.
upper(),
822 thresholdLabels.size(), 0.0, double(thresholdLabels.size())
828 for (
auto const& [ thr,
info ]
829 :
util::zip(util::get_elements<0U>(fADCthresholds), fThresholdPlots))
832 = fPlots.addSubSandbox(
"Thr" + thr,
"Threshold: " + thr);
835 "TriggerTimeVsHWTrigVsBeam",
836 "Time of the trigger: emulated vs. hardware"
837 ";hardware trigger time (relative to beam gate opening) [ #mus ]"
838 ";emulated trigger time (relative to beam gate opening) [ #mus ]"
843 fThresholdPlots.resize(
844 size(fADCthresholds),
859 for (
auto const& [ thr,
info ]
860 :
util::zip(util::get_elements<0U>(fADCthresholds), fThresholdPlots))
863 makeThresholdPlots(thr, plots,
info);
864 if (plots.
empty()) fPlots.deleteSubSandbox(plots.
name());
874 std::string
const& threshold,
882 makeHistogramFromBinnedContent(plots,
884 "Time of the triggered events"
892 makeHistogramFromBinnedContent(plots,
894 "Time of the hardware trigger"
895 ";trigger time (relative to beam gate) [ #mus ]"
902 makeHistogramFromBinnedContent(plots,
903 "TriggerTimeVsHWTrig",
904 "Time of the trigger"
905 ";trigger time (relative to hardware trigger) [ #mus ]"
912 makeHistogramFromBinnedContent(plots,
913 "TriggerTimeVsBeamGate",
914 "Time of the trigger"
915 ";trigger time (relative to beam gate opening) [ #mus ]"
930 content = &(fEventPlotInfo.eventTimes);
931 makeHistogramFromBinnedContent(fPlots,
940 content = &(fEventPlotInfo.HWtrigTimeVsBeam);
941 makeHistogramFromBinnedContent(fPlots,
943 "Time of the hardware trigger"
944 ";trigger time (relative to beam gate) [ #mus ]"
958 std::size_t
const iThr, std::string
const& thrTag
961 auto& plotInfo = fThresholdPlots[iThr];
966 art::InputTag
const& dataTag = fADCthresholds.at(thrTag);
967 auto const& gates = readTriggerGates(event, dataTag);
971 if (fWindowMapMan(gates))
972 fPatternAlg.emplace(*fWindowMapMan, fPattern,
fLogCategory);
979 = fPatternAlg->simulateResponse(beamGate.applyToAll(gates));
981 ++fTriggerCount[iThr];
982 plotInfo.eventTimes.add(eventTimestampInSeconds(event));
988 plotTriggerResponse(iThr, thrTag, triggerInfo,
detTimings);
993 auto triggers = std::make_unique<std::vector<raw::Trigger>>();
996 (triggerInfoToTriggerData(
detTimings, fTriggerCount[iThr], triggerInfo));
998 event.put(std::move(triggers), fOutputInstances[iThr]);
1013 fEventPlotInfo.eventTimes.add(eventTimestampInSeconds(event));
1014 fEventPlotInfo.HWtrigTimeVsBeam.add(-beamGateTime.value());
1021 std::size_t iThr, std::string
const& thrTag,
1026 bool const fired = triggerInfo.
info.
fired();
1028 fPlots.demand<TEfficiency>(
"Eff").Fill(fired, iThr);
1031 using namespace detinfo::timescales;
1041 { thisTriggerTimeVsHWtrig - beamGateTime };
1044 <<
"Trigger " << fPattern.tag() <<
" at tick " << thisTriggerTick
1045 <<
" (" << thisTriggerTimeVsHWtrig <<
" vs. HW trigger, "
1046 << thisTriggerTimeVsBeamGate <<
" vs. beam gate)"
1049 fPlots.demand<TH1>(
"NTriggers").Fill(iThr);
1050 fPlots.demand<TH2>(
"TriggerTick").Fill(thisTriggerTick.value(), iThr);
1051 fPlots.demand<TH2>(
"TriggerTimeVsHWTrig").Fill
1052 (thisTriggerTimeVsHWtrig.value(), iThr);
1053 fPlots.demand<TH2>(
"TriggerTimeVsBeamGate").Fill
1054 (thisTriggerTimeVsBeamGate.value(), iThr);
1058 TGraph& graph =
plots.demand<TGraph>(
"TriggerTimeVsHWTrigVsBeam");
1059 graph.SetPoint(graph.GetN(),
1060 -beamGateTime.value(), thisTriggerTimeVsBeamGate.value()
1065 plotInfo.triggerTimesVsHWtrig.add(thisTriggerTimeVsHWtrig.value());
1066 plotInfo.triggerTimesVsBeam.add(thisTriggerTimeVsBeamGate.value());
1081 <<
"Summary of triggers for " << fTriggerCount.size()
1082 <<
" thresholds (ADC) with pattern: " << fPattern.description()
1084 for (
auto const& [
count, thr ]
1085 :
util::zip(fTriggerCount, util::get_elements<0U>(fADCthresholds)))
1087 log <<
"\n threshold " << thr
1089 if (fTotalEvents > 0U) {
1090 log <<
"/" << fTotalEvents
1091 <<
" (" << (double(count) / fTotalEvents * 100.0) <<
"%)";
1093 else log <<
" events triggered";
1119 (art::Event
const& event, art::InputTag
const& dataTag)
1127 =
event.getProduct<std::vector<OpticalTriggerGateData_t>>(dataTag);
1128 auto const& gateToWaveforms =
event.getProduct
1129 <art::Assns<OpticalTriggerGateData_t, sbn::OpDetWaveformMeta>>(dataTag);
1134 catch (cet::exception
const&
e) {
1135 throw cet::exception(
"SlidingWindowTriggerSimulation",
"", e)
1136 <<
"Error encountered while reading data products from '"
1137 << dataTag.encode() <<
"'\n";
1147 std::string
const&
name, std::string
const& title,
1151 if (binnedContent.
empty())
return nullptr;
1153 TH1* hist = plots.
make<TH1F>(
1155 binnedContent.
nBins(), binnedContent.
min(), binnedContent.
max()
1159 unsigned int total = 0U;
1161 hist->SetBinContent(iBin + 1,
count);
1164 hist->SetEntries(static_cast<double>(total));
1171 (art::Timestamp
const& time)
1175 return static_cast<double>(time.timeHigh())
1176 + static_cast<double>(time.timeHigh()) * 1
e-9;
1182 (art::Event
const& event)
1183 {
return eventTimestampInSeconds(event.time()); }
BinnedContent_t triggerTimesVsBeam
BEGIN_PROLOG BeamGateDuration pmtthr physics producers trigtilewindowORS Thresholds
bool fired() const
Returns whether the trigger fired.
Obj * make(std::string const &name, std::string const &title, Args &&...args)
Creates a new ROOT object with the specified name and title.
void plotEvent(art::Event const &event, detinfo::DetectorTimings const &detTimings)
Fills event-wide plots.
icarus::trigger::WindowTopologyManager fWindowMapMan
Mapping of each sliding window with location and topological information.
electronics_time BeamGateTime() const
An empty class that can't be copied nor moved.
void makeThresholdPlots(std::string const &threshold, icarus::trigger::PlotSandbox &plots, ThresholdPlotInfo_t const &plotInfo)
Utilities related to art service access.
Utilities for the conversion of trigger gate data formats.
Assembles the topology of trigger windows.
Class to extract and verify a window topology from trigger gates.
ApplyBeamGateClass makeApplyBeamGate(util::quantities::intervals::microseconds duration, util::quantities::intervals::microseconds delay, detinfo::DetectorClocksData const &clockData, std::string const &logCategory="ApplyBeamGateClass")
Returns a new ApplyBeamGateClass object with the specified gate.
constexpr T roundup(T const value, U const quantum, T const offset=T{})
Returns the value, rounded up.
Definition of util::get_elements() and util::get_const_elements().
virtual void produce(art::Event &event) override
Runs the simulation and saves the results into the art event.
TH1 * makeHistogramFromBinnedContent(icarus::trigger::PlotSandbox &plots, std::string const &name, std::string const &title, BinnedContent_t const &binnedContent) const
Creates and returns a 1D histogram filled with binnedContent.
Definition of util::enumerate().
A wrapper to trigger gate objects tracking the input of operations.
microseconds_as<> microseconds
Type of time interval stored in microseconds, in double precision.
Defines classes that can't be copied nor moved.
Simple utility for human-friendly binning.
std::uint32_t fBeamBits
Bits for the beam gate being simulated.
trigger_time toTriggerTime(FromTime time) const
Converts a time point into trigger time scale.
icarus::trigger::SlidingWindowPatternAlg::TriggerGates_t TriggerGates_t
List of trigger gates.
void printSummary() const
Prints the summary of fired triggers on screen.
Base class facilitating logging to message facility.
BinIndex_t add(Data_t value)
Increases by a unit the count at the bin including value.
void finalizePlots()
Creates summary plots from proto-histogram data.
Helper to manage a beam gate.
decltype(auto) const_values(Coll &&coll)
Range-for loop helper iterating across the constant values of the specified collection.
Utilities for numerical rounding.
std::map< std::string, art::InputTag > fADCthresholds
Name of ADC thresholds to read, and the input tag connected to their data.
void makeEventPlots()
Creates in the main sandbox all event-wide plots.
void applyAxisLabels(TAxis *pAxis, std::vector< std::string > const &labels, int first=1)
Sets all the labels starting with the bin first (1 by default).
Data_t max() const noexcept
std::string const & name() const
Returns the sandbox name.
Helper applying a beam gate to any gate.
double lower() const
Returns the value of the lower end of the first bin.
Helper to check if an object has changed. Thread-safe.
BinnedContent_t eventTimes
double fEventTimeBinning
Trigger time plot binning [s].
static TriggerGates_t readTriggerGates(art::Event const &event, art::InputTag const &dataTag)
Data_t min() const noexcept
Helper data structure to store transient trigger result.
std::vector< ThresholdPlotInfo_t > fThresholdPlots
Proto-histogram information in a not-so-practical array; per threshold.
auto enumerate(Iterables &&...iterables)
Range-for loop helper tracking the number of iteration.
BinningSpecs alignBinningTo(BinningSpecs const &binning, double boundary, bool extendCoverage=true)
Returns a binning shifted to align with the specified boundary.
timescale_traits< OpticalTimeCategory >::tick_interval_t optical_time_ticks
Interface to detinfo::DetectorClocks.
Specification of the requirement of sliding window firing pattern.
void initializePlots()
Initializes the full set of plots (all ADC thresholds).
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
void plotTriggerResponse(std::size_t iThr, std::string const &thrTag, WindowTriggerInfo_t const &triggerInfo, detinfo::DetectorTimings const &detTimings)
Fills the plots for threshold index iThr with trigger information.
virtual void beginJob() override
Initializes the plots.
Access the description of detector geometry.
timescale_traits< TriggerTimeCategory >::time_point_t trigger_time
A point in time on the trigger time scale.
bool empty() const noexcept
Returns whether there is no storage at all.
All information needed to generate plots for a specific threshold.
Data structure holding binning information.
double binWidth() const
Returns the width of the bins (all bins have the same width).
icarus::trigger::PlotSandbox fPlots
All plots in one practical sandbox.
electronics_time toElectronicsTime(FromTime time) const
Converts a time point into electronics time scale.
BinnedContent_t triggerTimesVsHWtrig
Ticks toOpticalTicks(time_interval time) const
Returns the optical ticks corresponding to a time interval.
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
bool empty() const
Returns if the sandbox is empty (neither it nor subboxes hold objects).
Simple functions to streamline the creation of DetectorClocksData.
Defines a (sliding) window trigger pattern.
raw::Trigger triggerInfoToTriggerData(detinfo::DetectorTimings const &detTimings, unsigned int triggerNumber, WindowTriggerInfo_t const &info) const
Converts the trigger information into a raw::Trigger object.
Simple type definitions for trigger algorithms.
art::EDProducer::Table< Config > Parameters
A trigger gate data object for optical detector electronics.
icarus::trigger::ReadoutTriggerGate< TriggerGateTick_t, TriggerGateTicks_t, raw::Channel_t > OpticalTriggerGateData_t
Type of trigger gate data serialized into art data products.
A bunch of diverse utilities and futilities related to ROOT.
std::vector< PlotDef > plots
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
BEGIN_PROLOG vertical distance to the surface Name
Test of util::counter and support utilities.
art::TFileDirectory fOutputDir
ROOT directory where all the plots are written.
An interval (duration, length, distance) between two quantity points.
Definition of data types for geometry description.
Class with extensible fix-sized binning.
FHiCL configuration structure for icarus::trigger::WindowPattern.
nanoseconds fTriggerTimeResolution
Trigger resolution in time.
std::size_t nBins() const noexcept
Returns how many bins currently have storage.
nanoseconds_as<> nanoseconds
Type of time interval stored in nanoseconds, in double precision.
double upper() const
Returns the value of the upper end of the last bin.
microseconds fBeamGateStart
Start of the beam gate with respect to BeamGate().
::fhicl::TableAs< icarus::trigger::WindowPattern, WindowPatternConfig > WindowPatternTable
Configuration element for a trigger window.
Utilities to read interval and point quantity FHiCL configuration.
SlidingWindowTriggerSimulation(Parameters const &config)
TriggerInfo_t info
Standard trigger information.
timescale_traits< OpticalTimeCategory >::tick_t optical_tick
Classes to detect the change of object values.
optical_tick atTick() const
Returns the time of the trigger (undefined if !fired()).
Simulates a sliding window trigger.
Contains all timing reference information for the detector.
WindowPattern const fPattern
Configured sliding window requirement pattern.
std::string to_string(WindowPattern const &pattern)
Dimensioned variables representing space or time quantities.
WindowTriggerInfo_t produceForThreshold(art::Event &event, detinfo::DetectorTimings const &detTimings, ApplyBeamGateClass const &beamGate, std::size_t const iThr, std::string const &thrTag)
Performs the simulation for the specified ADC threshold.
Helper class to store transient trigger result.
A class exposing an upgraded interface of detinfo::DetectorClocksData.
BinnedContent_t HWtrigTimeVsBeam
Data types for detinfo::DetectorTimings.
virtual void endJob() override
Prints end-of-job summaries.
Functions pulling in STL customization if available.
Class to create an object representing a beam gate.
microseconds fBeamGateDuration
Duration of the gate during with global optical triggers are accepted.
std::vector< InputTriggerGate_t > TriggerGates_t
A list of trigger gates from input.
std::string const fLogCategory
Message facility stream category for output.
icarus::trigger::TrackedOpticalTriggerGate< sbn::OpDetWaveformMeta > InputTriggerGate_t
Type of trigger gate provided as input.
std::vector< icarus::trigger::TrackedOpticalTriggerGate< OpDetInfo > > FillTriggerGates(std::vector< icarus::trigger::OpticalTriggerGateData_t > const &gates, art::Assns< icarus::trigger::OpticalTriggerGateData_t, OpDetInfo > const &gateToWaveformInfo)
Creates a gate object out of trigger gate data products.
std::vector< std::string > fOutputInstances
Output data product instance names (same order as fADCthresholds).
auto zip(Iterables &&...iterables)
Range-for loop helper iterating across many collections at the same time.
Definition of util::values() and util::const_values().
BEGIN_PROLOG triggeremu_data_config_icarus settings sequence::triggeremu_data_config_icarus settings PMTADCthresholds sequence::triggeremu_data_config_icarus settings PMTADCthresholds sequence::triggeremu_data_config_icarus settings PMTADCthresholds Pattern
unsigned long nBins() const
Returns the number of bins.
std::size_t count(Cont const &cont)
std::vector< std::atomic< unsigned int > > fTriggerCount
detinfo::DetectorClocksData makeDetClockData(art::Event const *event)
Returns a detinfo::DetectorClocksData from DetectorClocksService.
std::optional< icarus::trigger::SlidingWindowPatternAlg > fPatternAlg
Pattern algorithm.
Complete information from this algorithm, standard + non-standard (extra).
static double eventTimestampInSeconds(art::Timestamp const &time)
Returns the time of the event in seconds from The Epoch.
Applies sliding window trigger patterns.
icarus::ns::util::ThreadSafeChangeMonitor< icarus::trigger::ApplyBeamGateClass > fGateChangeCheck
Functor returning whether a gate has changed.
A helper to manage ROOT objects in a art::TFileDirectory.
art framework interface to geometry description
detinfo::DetectorTimings makeDetTimings(art::Event const *event)
Returns a detinfo::DetectorTimings from DetectorClocksService.
A helper to manage ROOT objects with consistent naming.
ThresholdPlotInfo_t fEventPlotInfo
Proto-histogram information in a convenient packet; event-wide.
Interval_t binWidth() const noexcept
Returns the width of the bins.