pflib v3.15.1-5-ge6391b0
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
HcalBackplaneECONTPairSample.h
1#pragma once
2#ifndef PFLIB_PACKING_HCALBACKPLANEECONTPAIRSAMPLE_H
3#define PFLIB_PACKING_HCALBACKPLANEECONTPAIRSAMPLE_H
4
5#include <array>
6#include <span>
7
8#include "pflib/logging/Logging.h"
9
10namespace pflib::packing {
11
48 mutable ::pflib::logging::logger the_log_{::pflib::logging::get("decoding")};
49 static constexpr std::size_t N_STC = 16;
51 std::array<int, N_STC> stc_sums_;
53
54 public:
56 static constexpr int WORD_LEN = 6;
58 void from(std::span<uint32_t> data);
60 int bx(int i_econt) const;
62 int stc_sum(int i_stc) const;
64 int encoded_stc_sum(int i_stc) const;
66 int max_tc(int i_stc) const;
67 friend std::ostream& operator<<(std::ostream& o,
69};
70
71} // namespace pflib::packing
72
73#endif
A single sample from a pair of ECON-T on an Hcal Backplane.
Definition HcalBackplaneECONTPairSample.h:47
void from(std::span< uint32_t > data)
parse the input data
Definition HcalBackplaneECONTPairSample.cxx:8
int max_tc(int i_stc) const
index of the TC within the STC that was the maximum
Definition HcalBackplaneECONTPairSample.cxx:49
int bx(int i_econt) const
bx counter for this sample of STC sums
Definition HcalBackplaneECONTPairSample.cxx:39
int stc_sum(int i_stc) const
decode the 5E+4M encoding into a linearized sum value
Definition HcalBackplaneECONTPairSample.cxx:41
static constexpr int WORD_LEN
2 ECON-T producing 3 words each
Definition HcalBackplaneECONTPairSample.h:56
int encoded_stc_sum(int i_stc) const
the raw value trasmitted by the ECON-T
Definition HcalBackplaneECONTPairSample.cxx:45
logger get(const std::string &name)
Gets a logger with the input name for its channel.
Definition Logging.cxx:24