51 auto cput = mTimer.CpuTime();
54 auto bcdata = pc.
inputs().
get<gsl::span<o2::zdc::BCData>>(
"trig");
55 auto chans = pc.
inputs().
get<gsl::span<o2::zdc::ChannelData>>(
"chan");
56 auto peds = pc.
inputs().
get<gsl::span<o2::zdc::OrbitData>>(
"peds");
62 auto iosize = mCTFCoder.
encode(
buffer, bcdata, chans, peds);
68 LOG(info) << iosize.asString() <<
" in " << mTimer.CpuTime() - cput <<
" s";
73 LOGF(info,
"ZDC Entropy Encoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
74 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
79 std::vector<InputSpec> inputs;
80 inputs.emplace_back(
"trig",
"ZDC",
"DIGITSBC", 0, Lifetime::Timeframe);
81 inputs.emplace_back(
"chan",
"ZDC",
"DIGITSCH", 0, Lifetime::Timeframe);
82 inputs.emplace_back(
"peds",
"ZDC",
"DIGITSPD", 0, Lifetime::Timeframe);
83 inputs.emplace_back(
"ctfdict",
"ZDC",
"CTFDICT", 0, Lifetime::Condition,
ccdbParamSpec(
"ZDC/Calib/CTFDictionaryTree"));
85 inputs.emplace_back(
"selIRFrames",
"CTF",
"SELIRFRAMES", 0, Lifetime::Timeframe);
88 "zdc-entropy-encoder",
90 Outputs{{
"ZDC",
"CTFDATA", 0, Lifetime::Timeframe},
91 {{
"ctfrep"},
"ZDC",
"CTFENCREP", 0, Lifetime::Timeframe}},
93 Options{{
"ctf-dict", VariantType::String,
"ccdb", {
"CTF dictionary: empty or ccdb=CCDB, none=no external dictionary otherwise: local filename"}},
94 {
"irframe-margin-bwd", VariantType::UInt32, 0u, {
"margin in BC to add to the IRFrame lower boundary when selection is requested"}},
95 {
"irframe-margin-fwd", VariantType::UInt32, 0u, {
"margin in BC to add to the IRFrame upper boundary when selection is requested"}},
96 {
"mem-factor", VariantType::Float, 1.f, {
"Memory allocation margin factor"}},
97 {
"ans-version", VariantType::String, {
"version of ans entropy coder implementation to use"}}}};
Convert ZDC data to CTF (EncodedBlocks)
void updateTimeDependentParams(o2::framework::ProcessingContext &pc, bool askTree=false)
void init(o2::framework::InitContext &ic)
void setSelectedIRFrames(const SPAN &sp)
o2::utils::IRFrameSelector & getIRFramesSelector()
bool finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj)
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 encode(VEC &buff, const gsl::span< const BCData > &trgData, const gsl::span< const ChannelData > &chanData, const gsl::span< const OrbitData > &pedData)
entropy-encode data to buffer with CTF
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
EntropyEncoderSpec(bool selIR)
void run(o2::framework::ProcessingContext &pc) final
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
void init(o2::framework::InitContext &ic) final
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
std::vector< OutputSpec > Outputs
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
framework::DataProcessorSpec getEntropyEncoderSpec(bool selIR=false)
create a processor spec
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
wrapper for the Entropy-encoded triggers and cells of the TF
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"