51 auto cput = mTimer.CpuTime();
56 auto buff = pc.
inputs().
get<gsl::span<o2::ctf::BufferType>>(
"ctf_EMC");
58 auto& triggers = pc.
outputs().
make<std::vector<TriggerRecord>>(
OutputRef{
"triggers", mSSpecOut});
68 LOG(info) <<
"Decoded " <<
cells.size() <<
" EMCAL cells in " << triggers.size() <<
" triggers, (" << iosize.
asString() <<
") in " << mTimer.CpuTime() - cput <<
" s";
73 LOGF(info,
"EMCAL Entropy Decoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
74 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
79 std::vector<OutputSpec> outputs{
80 OutputSpec{{
"triggers"},
"EMC",
"CELLSTRGR", sspecOut, Lifetime::Timeframe},
81 OutputSpec{{
"cells"},
"EMC",
"CELLS", sspecOut, Lifetime::Timeframe},
82 OutputSpec{{
"ctfrep"},
"EMC",
"CTFDECREP", 0, Lifetime::Timeframe}};
84 std::vector<InputSpec> inputs;
85 inputs.emplace_back(
"ctf_EMC",
"EMC",
"CTFDATA", sspecInp, Lifetime::Timeframe);
86 inputs.emplace_back(
"ctfdict_EMC",
"EMC",
"CTFDICT", 0, Lifetime::Condition,
ccdbParamSpec(
"EMC/Calib/CTFDictionaryTree"));
87 inputs.emplace_back(
"trigoffset",
"CTP",
"Trig_Offset", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Config/TriggerOffsets"));
90 "emcal-entropy-decoder",
94 Options{{
"ctf-dict", VariantType::String,
"ccdb", {
"CTF dictionary: empty or ccdb=CCDB, none=no external dictionary otherwise: local filename"}},
95 {
"ans-version", VariantType::String, {
"version of ans entropy coder implementation to use"}}}};
Convert CTF (EncodedBlocks) to EMCAL digit/channels strean.
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
o2::ctf::CTFIOSize decode(const CTF::base &ec, VTRG &trigVec, VCELL &cellVec)
entropy decode data from buffer with CTF
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
EntropyDecoderSpec(int verbosity, unsigned int sspecOut)
void run(o2::framework::ProcessingContext &pc) final
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
void init(o2::framework::InitContext &ic) final
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.
framework::DataProcessorSpec getEntropyDecoderSpec(int verbosity, unsigned int sspecInp, unsigned int sspecOut=0)
create a processor spec
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
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< Cell > cells