16#ifndef O2_MID_CTFCODER_H
17#define O2_MID_CTFCODER_H
44 template <typename VEC>
48 template <typename VROF, typename VCOL>
54 void appendToTree(TTree&
tree,
CTF& ec);
59template <typename VEC>
87#define ENCODEMID(beg, end, slot, bits) CTF::get(buff.data())->encode(beg, end, int(slot), bits, optField[int(slot)], &buff, mCoders[int(slot)], getMemMarginFactor());
99 finaliseCTFOutput<CTF>(buff);
105template <
typename VROF,
typename VCOL>
111 std::vector<int16_t> bcInc;
112 std::vector<int32_t> orbitInc;
113 std::vector<uint16_t> entries,
pattern;
114 std::vector<uint8_t> evType, deId, colId;
117#define DECODEMID(part, slot) ec.decode(part, int(slot), mCoders[int(slot)])
132 rofVec[
i].reserve(header.nROFs);
133 colVec[
i].reserve(header.nColumns);
136 uint32_t firstEntry = 0, rofCount = 0, colCount = 0, pCount = 0;
139 for (uint32_t irof = 0; irof < header.nROFs; irof++) {
141 if (orbitInc[irof]) {
145 ir.
bc += bcInc[irof];
147 auto& cv = colVec[evType[irof]];
148 firstEntry = cv.size();
149 for (uint16_t ic = 0; ic < entries[irof]; ic++) {
154 rofVec[evType[irof]].emplace_back(
ROFRecord{
ir,
EventType(evType[irof]), firstEntry, entries[irof]});
156 assert(colCount == header.nColumns);
Declarations for CTFCoderBase class (support of external dictionaries)
Strip pattern (aka digits)
#define ENCODEMID(beg, end, slot, bits)
#define DECODEMID(part, slot)
Helper for MID CTF creation.
void checkDictVersion(const CTFDictHeader &h) const
ctf::ANSHeader mANSVersion
std::string getPrefix() const
virtual void assignDictVersion(CTFDictHeader &h) const
<<======================== Auxiliary classes =======================<<
static auto get(void *head)
cast arbitrary buffer head to container class. Head is supposed to respect the alignment
const H & getHeader() const
void print(const std::string &prefix="", int verbosity=1) const
print itself
static constexpr int getNBlocks()
EncodedBlocks< CTFHeader, N, uint32_t > base
static auto create(void *head, size_t sz)
create container from arbitrary buffer of predefined size (in bytes!!!). Head is supposed to respect ...
Static class with identifiers, bitmasks and names for ALICE detectors.
o2::ctf::CTFIOSize encode(VEC &buff, const CTFHelper::TFData &tfData)
entropy-encode data to buffer with CTF
void createCoders(const std::vector< char > &bufVec, o2::ctf::CTFCoderBase::OpType op) final
CTFCoder(o2::ctf::CTFCoderBase::OpType op)
~CTFCoder() final=default
o2::ctf::CTFIOSize decode(const CTF::base &ec, std::array< VROF, NEvTypes > &rofVec, std::array< VCOL, NEvTypes > &colVec)
entropy decode data from buffer with CTF
Iter_orbitIncROF begin_orbitIncROF() const
Iter_pattern end_pattern() const
Iter_deId end_deId() const
Iter_evtypeROF end_evtypeROF() const
Iter_deId begin_deId() const
Iter_pattern begin_pattern() const
Iter_evtypeROF begin_evtypeROF() const
Iter_orbitIncROF end_orbitIncROF() const
Iter_entriesROF end_entriesROF() const
Iter_bcIncROF begin_bcIncROF() const
Iter_bcIncROF end_bcIncROF() const
Iter_entriesROF begin_entriesROF() const
Iter_colId end_colId() const
Iter_colId begin_colId() const
constexpr uint32_t NEvTypes
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.
uint16_t bc
bunch crossing ID of interaction
wrapper for the Entropy-encoded clusters of the TF
Column data structure for MID.
o2::InteractionRecord ir(0, 0)
std::unique_ptr< TTree > tree((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str()))
std::array< uint16_t, 5 > pattern