51 auto cput = mTimer.CpuTime();
56 auto buff = pc.
inputs().
get<gsl::span<o2::ctf::BufferType>>(
"ctf_MID");
58 std::array<std::vector<o2::mid::ROFRecord>,
NEvTypes> rofs{};
59 std::array<std::vector<o2::mid::ColumnData>,
NEvTypes>
cols{};
66 for (uint32_t it = 0; it <
NEvTypes; it++) {
72 iosize.
rawIn = insize;
75 LOG(info) <<
"Decoded {" <<
cols[0].size() <<
',' <<
cols[1].size() <<
',' <<
cols[2].size()
76 <<
"} MID columns for {" << rofs[0].size() <<
',' << rofs[1].size() <<
',' << rofs[2].size()
77 <<
"} ROFRecords, (" << iosize.
asString() <<
") in " << mTimer.CpuTime() - cput <<
" s";
82 LOGF(info,
"MID Entropy Decoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
83 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
88 std::vector<OutputSpec> outputs;
93 outputs.emplace_back(
OutputSpec{{
"ctfrep"},
"MID",
"CTFDECREP", 0, Lifetime::Timeframe});
94 std::vector<InputSpec> inputs;
95 inputs.emplace_back(
"ctf_MID",
"MID",
"CTFDATA", sspec, Lifetime::Timeframe);
97 if (ctfdictOpt.empty() || ctfdictOpt ==
"ccdb") {
98 inputs.emplace_back(
"ctfdict_MID",
"MID",
"CTFDICT", 0, Lifetime::Condition,
ccdbParamSpec(
"MID/Calib/CTFDictionaryTree"));
100 inputs.emplace_back(
"trigoffset",
"CTP",
"Trig_Offset", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Config/TriggerOffsets"));
103 "mid-entropy-decoder",
107 Options{{
"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
EntropyDecoderSpec(int verbosity, const std::string &ctfdictOpt="none")
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
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, const std::string &ctfdictOpt)
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"