49 auto cput = mTimer.CpuTime();
52 auto triggers = pc.
inputs().
get<gsl::span<TriggerRecord>>(
"triggers");
65 LOG(info) << iosize.asString() <<
" in " << mTimer.CpuTime() - cput <<
" s";
70 LOGF(info,
"EMCAL Entropy Encoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
71 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
76 std::vector<InputSpec> inputs;
77 inputs.emplace_back(
"triggers",
"EMC",
"CELLSTRGR", 0, Lifetime::Timeframe);
78 inputs.emplace_back(
"cells",
"EMC",
"CELLS", 0, Lifetime::Timeframe);
79 inputs.emplace_back(
"ctfdict",
"EMC",
"CTFDICT", 0, Lifetime::Condition,
ccdbParamSpec(
"EMC/Calib/CTFDictionaryTree"));
81 inputs.emplace_back(
"selIRFrames",
"CTF",
"SELIRFRAMES", 0, Lifetime::Timeframe);
84 "emcal-entropy-encoder",
86 Outputs{{
"EMC",
"CTFDATA", 0, Lifetime::Timeframe},
87 {{
"ctfrep"},
"EMC",
"CTFENCREP", 0, Lifetime::Timeframe}},
90 {
"ctf-dict", VariantType::String,
"ccdb", {
"CTF dictionary: empty or ccdb=CCDB, none=no external dictionary otherwise: local filename"}},
91 {
"irframe-margin-bwd", VariantType::UInt32, 0u, {
"margin in BC to add to the IRFrame lower boundary when selection is requested"}},
92 {
"irframe-margin-fwd", VariantType::UInt32, 0u, {
"margin in BC to add to the IRFrame upper boundary when selection is requested"}},
93 {
"mem-factor", VariantType::Float, 1.f, {
"Memory allocation margin factor"}},
94 {
"ans-version", VariantType::String, {
"version of ans entropy coder implementation to use"}}}};
Convert EMCAL 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)
o2::ctf::CTFIOSize encode(VEC &buff, const gsl::span< const TriggerRecord > &trigData, const gsl::span< const Cell > &cellData)
entropy-encode data to buffer with CTF
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
void init(o2::framework::InitContext &ic) final
void run(o2::framework::ProcessingContext &pc) final
EntropyEncoderSpec(bool selIR)
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 getEntropyEncoderSpec(bool selIR=false)
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
std::vector< OutputSpec > Outputs
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"
std::vector< Cell > cells