19#include <unordered_map>
56 auto cput = mTimer.CpuTime();
60 std::vector<InputSpec>
67 auto const* dh = framework::DataRefUtils::getHeader<o2::header::DataHeader*>(inputRef);
68 if (dh->subSpecification >=
NEvTypes) {
69 throw std::runtime_error(fmt::format(
"SubSpecification={} does not match EvenTypes for {}", dh->subSpecification, dh->dataDescription.as<std::string>()));
72 tfData.colData[dh->subSpecification] = pc.
inputs().
get<gsl::span<o2::mid::ColumnData>>(inputRef);
76 tfData.rofData[dh->subSpecification] = pc.
inputs().
get<gsl::span<o2::mid::ROFRecord>>(inputRef);
89 iosize.rawIn = insize;
94 LOG(info) << iosize.asString() <<
" in " << mTimer.CpuTime() - cput <<
" s";
99 LOGF(info,
"MID Entropy Encoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
100 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
105 std::vector<InputSpec> inputs;
110 inputs.emplace_back(
"selIRFrames",
"CTF",
"SELIRFRAMES", 0, Lifetime::Timeframe);
113 "mid-entropy-encoder",
118 Options{{
"ctf-dict", VariantType::String,
"ccdb", {
"CTF dictionary: empty or ccdb=CCDB, none=no external dictionary otherwise: local filename"}},
119 {
"irframe-margin-bwd", VariantType::UInt32, 0u, {
"margin in BC to add to the IRFrame lower boundary when selection is requested"}},
120 {
"irframe-margin-fwd", VariantType::UInt32, 0u, {
"margin in BC to add to the IRFrame upper boundary when selection is requested"}},
121 {
"mem-factor", VariantType::Float, 1.f, {
"Memory allocation margin factor"}},
122 {
"ans-version", VariantType::String, {
"version of ans entropy coder implementation to use"}}}};
Declarations for CTFCoderBase class (support of external dictionaries)
Convert MID data to CTF (EncodedBlocks)
Definition of the Names Generator class.
void updateTimeDependentParams(o2::framework::ProcessingContext &pc, bool askTree=false)
void init(o2::framework::InitContext &ic)
void setSelectedIRFrames(const SPAN &sp)
o2::utils::IRFrameSelector & getIRFramesSelector()
bool finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj)
void snapshot(const Output &spec, T const &object)
decltype(auto) make(const Output &spec, Args... args)
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
InputRecord & inputs()
The inputs associated with this processing context.
o2::ctf::CTFIOSize encode(VEC &buff, const CTFHelper::TFData &tfData)
entropy-encode data to buffer with CTF
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void run(o2::framework::ProcessingContext &pc) final
void init(o2::framework::InitContext &ic) final
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
EntropyEncoderSpec(bool selIR)
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
constexpr o2::header::DataOrigin gDataOriginMID
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > ccdbParamSpec(std::string const &path, int runDependent, std::vector< CCDBMetadata > metadata={}, int qrate=0)
std::vector< ConfigParamSpec > Options
std::vector< OutputSpec > Outputs
framework::DataProcessorSpec getEntropyEncoderSpec(bool selIR=false)
create a processor spec
constexpr uint32_t NEvTypes
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static bool match(DataRef const &ref, const char *binding)
wrapper for the Entropy-encoded clusters of the TF
Column data structure for MID.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"