10 #ifndef ICARUSCODE_PMT_TRIGGER_UTILITIES_TRIGGERRESPONSEMANAGER_H
11 #define ICARUSCODE_PMT_TRIGGER_UTILITIES_TRIGGERRESPONSEMANAGER_H
19 #include "art/Framework/Core/ConsumesCollector.h"
20 #include "art/Framework/Principal/Event.h"
21 #include "canvas/Utilities/InputTag.h"
36 namespace sbn::details {
class TriggerResponseManager; }
90 struct TriggerInfoBranch_t;
103 struct TriggerInfo_t {
133 struct TriggerInputData_t {
134 std::vector<raw::Trigger>
const*
triggers;
138 std::vector<TriggerInfoBranch_t>
const*
fBranchInfo {
nullptr };
146 (art::Event
const& event, TriggerInfoBranch_t
const& branchInfo)
const;
151 TriggerInfoBranch_t
const&
info,
152 TriggerInputData_t& inputData,
160 art::Event
const& event,
161 std::vector<TriggerInfoBranch_t>& branchInfoList
166 void fetch(std::size_t iEntry);
171 art::ConsumesCollector& collector, TriggerInfoBranch_t
const& branchInfo
180 art::ConsumesCollector& collector,
192 struct TriggerInfoBranch_t {
195 std::unique_ptr<TriggerInfo_t>
data = std::make_unique<TriggerInfo_t>();
196 TBranch*
branch =
nullptr;
206 (TTree& tree, std::vector<TriggerInputSpec_t>
const&
triggerSpecs)
const;
210 (TTree& tree, TriggerInputSpec_t
const& spec)
const;
222 #endif // ICARUSCODE_PMT_TRIGGER_UTILITIES_TRIGGERRESPONSEMANAGER_H
Manages extraction of trigger results and filling of their branches.
void declareConsumables(art::ConsumesCollector &collector) const
Declares all the data products we are going to read.
Defines classes that can't be copied nor moved.
TriggerInfoBranch_t buildTriggerResponseBranch(TTree &tree, TriggerInputSpec_t const &spec) const
Sets up a tree branch and returns its branch information structure.
std::vector< TriggerInfoBranch_t > fBranchInfo
Data structures for the tree.
static constexpr double NotTriggeredTime
Mnemonic value for absence of trigger time information.
std::unique_ptr< TriggerInfo_t > data
std::vector< TriggerInfoBranch_t > buildTriggerResponseBranches(TTree &tree, std::vector< TriggerInputSpec_t > const &triggerSpecs) const
Sets up the tree branches and returns the branch information structures.
TriggerResponseManager(std::vector< TriggerInputSpec_t > const &triggerSpecs, art::ConsumesCollector &collector, TTree &tree)
Initializes tree to accommodate the specified trigger information.
Extractors extractorsFor(art::Event const &event)
Returns an object to extract trigger information from event.
An empty class that can't be copied (moving is allowed).
double gateTime
Time of the opening of the gate for the trigger evaluation.
bool fired
Whether this trigger fired.
static std::string const TriggerResponseBranchStructure
ROOT TTree specification for this data structure (leaf list).