2#ifndef PFLIB_PACKING_TRIGALGOOUTPUT_H
3#define PFLIB_PACKING_TRIGALGOOUTPUT_H
8#include "pflib/logging/Logging.h"
9#include "pflib/packing/ECONTCaptureHeader.h"
10#include "pflib/packing/Reader.h"
12namespace pflib::packing {
39 const SingleBXOutput& sample(std::optional<int> i_sample = {})
const;
40 TrigAlgoOutput() =
default;
41 TrigAlgoOutput(std::span<uint32_t> data);
42 void from(std::span<uint32_t> data);
43 Reader& read(Reader& r);
45 const ECONTCaptureHeader& header()
const;
47 bool is_high_peak(
int i_stc, std::optional<int> i_sample = {})
const;
49 bool trigger(std::optional<int> i_sample = {})
const;
51 bool algo_trigger(std::optional<int> i_sample = {})
const;
52 bool elink_valid(std::optional<int> i_sample = {})
const;
53 bool econ_tdata_dv(std::optional<int> i_sample = {})
const;
58 ECONTCaptureHeader header_;
Definition TrigAlgoOutput.h:14
bool algo_trigger(std::optional< int > i_sample={}) const
reports if the algo would have triggered
Definition TrigAlgoOutput.cxx:63
bool trigger(std::optional< int > i_sample={}) const
reports the gated trigger i.e. if a readout request would be sent
Definition TrigAlgoOutput.cxx:59
logger get(const std::string &name)
Gets a logger with the input name for its channel.
Definition Logging.cxx:24
Definition TrigAlgoOutput.h:16
bool algo_trigger_
if the algorithm would trigger
Definition TrigAlgoOutput.h:20
friend std::ostream & operator<<(std::ostream &o, const SingleBXOutput &sample)
print human readable sample
Definition TrigAlgoOutput.h:29
bool gated_trigger_
if a trigger was actually sent (the trigger may be prevented by the single-shot gate)
Definition TrigAlgoOutput.h:23
bool econ_tdata_dv_
if the link alignment was valid
Definition TrigAlgoOutput.h:27
std::bitset< 8 > is_high_peak_
whether STC i had a high peak
Definition TrigAlgoOutput.h:18
bool elink_valid_
if the elink was valid
Definition TrigAlgoOutput.h:25