pflib v3.12.0-1-g716e801
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
TrigAlgoOutput.h
1#pragma once
2#ifndef PFLIB_PACKING_TRIGALGOOUTPUT_H
3#define PFLIB_PACKING_TRIGALGOOUTPUT_H
4
5#include <bitset>
6#include <optional>
7
8#include "pflib/logging/Logging.h"
9#include "pflib/packing/ECONTCaptureHeader.h"
10#include "pflib/packing/Reader.h"
11
12namespace pflib::packing {
13
15 mutable ::pflib::logging::logger the_log_{::pflib::logging::get("decoding")};
17 std::bitset<8> is_high_peak_;
18 bool trigger_;
19 };
20 const SingleBXOutput& sample(std::optional<int> i_sample = {}) const;
22 ECONTCaptureHeader header_;
23
24 public:
25 TrigAlgoOutput() = default;
26 TrigAlgoOutput(std::span<uint32_t> data);
27 void from(std::span<uint32_t> data);
28 Reader& read(Reader& r);
29 std::size_t n_samples() const;
30 const ECONTCaptureHeader& header() const;
31 int length() const;
32 bool is_high_peak(int i_stc, std::optional<int> i_sample = {}) const;
33 bool trigger(std::optional<int> i_sample = {}) const;
34};
35
36} // namespace pflib::packing
37
38#endif
The econt_buffer_manager firmware block inserts a pair of headers with the same format for the data c...
Definition ECONTCaptureHeader.h:17
Reading a raw data stream with some underlying backend.
Definition Reader.h:19
Definition TrigAlgoOutput.h:14
logger get(const std::string &name)
Gets a logger with the input name for its channel.
Definition Logging.cxx:24