52 auto cput = mTimer.CpuTime();
57 auto buff = pc.
inputs().
get<gsl::span<o2::ctf::BufferType>>(
"ctf_MID");
59 std::array<std::vector<o2::mid::ROFRecord>,
NEvTypes> rofs{};
60 std::array<std::vector<o2::mid::ColumnData>,
NEvTypes>
cols{};
67 for (uint32_t it = 0; it <
NEvTypes; it++) {
73 iosize.
rawIn = insize;
76 LOG(info) <<
"Decoded {" <<
cols[0].size() <<
',' <<
cols[1].size() <<
',' <<
cols[2].size()
77 <<
"} MID columns for {" << rofs[0].size() <<
',' << rofs[1].size() <<
',' << rofs[2].size()
78 <<
"} ROFRecords, (" << iosize.
asString() <<
") in " << mTimer.CpuTime() - cput <<
" s";
83 LOGF(info,
"MID Entropy Decoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
84 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
89 std::vector<OutputSpec> outputs;
94 outputs.emplace_back(
OutputSpec{{
"ctfrep"},
"MID",
"CTFDECREP", 0, Lifetime::Timeframe});
95 std::vector<InputSpec> inputs;
96 inputs.emplace_back(
"ctf_MID",
"MID",
"CTFDATA", sspec, Lifetime::Timeframe);
97 inputs.emplace_back(
"ctfdict_MID",
"MID",
"CTFDICT", 0, Lifetime::Condition,
ccdbParamSpec(
"MID/Calib/CTFDictionaryTree"));
98 inputs.emplace_back(
"trigoffset",
"CTP",
"Trig_Offset", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Config/TriggerOffsets"));
101 "mid-entropy-decoder",
105 Options{{
"ctf-dict", VariantType::String,
"ccdb", {
"CTF dictionary: empty or ccdb=CCDB, none=no external dictionary otherwise: local filename"}},
106 {
"ans-version", VariantType::String, {
"version of ans entropy coder implementation to use"}}}};
Declarations for CTFCoderBase class (support of external dictionaries)
Convert CTF (EncodedBlocks) to MID ROFRecords/ColumnData stream.
Definition of the Names Generator class.
void updateTimeDependentParams(o2::framework::ProcessingContext &pc, bool askTree=false)
void setDictBinding(const std::string &s)
void init(o2::framework::InitContext &ic)
bool finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj)
static auto getImage(const void *newHead)
get const image of the container wrapper, with pointers in the image relocated to new head
void snapshot(const Output &spec, T const &object)
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 decode(const CTF::base &ec, std::array< VROF, NEvTypes > &rofVec, std::array< VCOL, NEvTypes > &colVec)
entropy decode data from buffer with CTF
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
void run(o2::framework::ProcessingContext &pc) final
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void init(o2::framework::InitContext &ic) final
EntropyDecoderSpec(int verbosity)
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
framework::DataProcessorSpec getEntropyDecoderSpec(int verbosity, unsigned int sspec)
create a processor spec
constexpr uint32_t NEvTypes
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string asString() const
wrapper for the Entropy-encoded clusters of the TF
Column data structure for MID.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"