50 auto cput = mTimer.CpuTime();
55 auto buff = pc.
inputs().
get<gsl::span<o2::ctf::BufferType>>(
"ctf_EMC");
57 auto& triggers = pc.
outputs().
make<std::vector<TriggerRecord>>(
OutputRef{
"triggers", mSSpecOut});
67 LOG(info) <<
"Decoded " <<
cells.size() <<
" EMCAL cells in " << triggers.size() <<
" triggers, (" << iosize.
asString() <<
") in " << mTimer.CpuTime() - cput <<
" s";
72 LOGF(info,
"EMCAL Entropy Decoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
73 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
78 std::vector<OutputSpec> outputs{
79 OutputSpec{{
"triggers"},
"EMC",
"CELLSTRGR", sspecOut, Lifetime::Timeframe},
80 OutputSpec{{
"cells"},
"EMC",
"CELLS", sspecOut, Lifetime::Timeframe},
81 OutputSpec{{
"ctfrep"},
"EMC",
"CTFDECREP", 0, Lifetime::Timeframe}};
83 std::vector<InputSpec> inputs;
84 inputs.emplace_back(
"ctf_EMC",
"EMC",
"CTFDATA", sspecInp, Lifetime::Timeframe);
86 if (ctfdictOpt.empty() || ctfdictOpt ==
"ccdb") {
87 inputs.emplace_back(
"ctfdict_EMC",
"EMC",
"CTFDICT", 0, Lifetime::Condition,
ccdbParamSpec(
"EMC/Calib/CTFDictionaryTree"));
89 inputs.emplace_back(
"trigoffset",
"CTP",
"Trig_Offset", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Config/TriggerOffsets"));
92 "emcal-entropy-decoder",
96 Options{{
"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, const std::string &ctfdictOpt="none")
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, const std::string &ctfdictOpt="none")
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