21#include <TStopwatch.h>
68 auto cput = mTimer.CpuTime();
73 auto buff = pc.
inputs().
get<gsl::span<o2::ctf::BufferType>>(
"ctf_HMP");
85 LOG(info) <<
"Decoded " <<
digits.size() <<
" HMPID digits in " << triggers.size() <<
" triggers, (" << iosize.
asString() <<
") in " << mTimer.CpuTime() - cput <<
" s";
90 LOGF(info,
"HMPID Entropy Decoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
91 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
96 std::vector<OutputSpec> outputs{
97 OutputSpec{{
"triggers"},
"HMP",
"INTRECORDS", 0, Lifetime::Timeframe},
98 OutputSpec{{
"digits"},
"HMP",
"DIGITS", 0, Lifetime::Timeframe},
99 OutputSpec{{
"ctfrep"},
"HMP",
"CTFDECREP", 0, Lifetime::Timeframe}};
101 std::vector<InputSpec> inputs;
102 inputs.emplace_back(
"ctf_HMP",
"HMP",
"CTFDATA", sspec, Lifetime::Timeframe);
103 inputs.emplace_back(
"ctfdict_HMP",
"HMP",
"CTFDICT", 0, Lifetime::Condition,
ccdbParamSpec(
"HMP/Calib/CTFDictionaryTree"));
104 inputs.emplace_back(
"trigoffset",
"CTP",
"Trig_Offset", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Config/TriggerOffsets"));
107 "hmpid-entropy-decoder",
111 Options{{
"ctf-dict", VariantType::String,
"ccdb", {
"CTF dictionary: empty or ccdb=CCDB, none=no external dictionary otherwise: local filename"}},
112 {
"ans-version", VariantType::String, {
"version of ans entropy coder implementation to use"}}}};
class for entropy encoding/decoding of HMPID data
Convert CTF (EncodedBlocks) to HMP digit/tracklets stream.
void setSupportBCShifts(bool v=true)
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)
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 decode(const CTF::base &ec, VTRG &trigVec, VDIG &digVec)
entropy decode data from buffer with CTF
~EntropyDecoderSpec() override=default
void run(o2::framework::ProcessingContext &pc) final
void init(o2::framework::InitContext &ic) final
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
EntropyDecoderSpec(int verbosity)
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
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 triggers and cells of the TF
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< Digit > digits