49 auto cput = mTimer.CpuTime();
54 const int maxDumRep = 5;
55 static int dumRep = 0;
61 if (dumRep < maxDumRep && lumiPrev.nHBFCounted == 0 && lumiPrev.nHBFCountedFV0 == 0) {
62 LOGP(alarm,
"Previous TF lumi used to substitute dummy input is empty, warning {} of {}", ++dumRep, maxDumRep);
71 LOG(info) << iosize.asString() <<
" in " << mTimer.CpuTime() - cput <<
" s";
76 LOGF(info,
"CTP Entropy Encoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
77 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
82 std::vector<InputSpec> inputs;
83 inputs.emplace_back(
"digits",
"CTP",
"DIGITS", 0, Lifetime::Timeframe);
85 inputs.emplace_back(
"CTPLumi",
"CTP",
"LUMI", 0, Lifetime::Timeframe);
87 inputs.emplace_back(
"ctfdict",
"CTP",
"CTFDICT", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Calib/CTFDictionaryTree"));
89 inputs.emplace_back(
"selIRFrames",
"CTF",
"SELIRFRAMES", 0, Lifetime::Timeframe);
92 "ctp-entropy-encoder",
94 Outputs{{
"CTP",
"CTFDATA", 0, Lifetime::Timeframe}, {{
"ctfrep"},
"CTP",
"CTFENCREP", 0, Lifetime::Timeframe}},
95 AlgorithmSpec{adaptFromTask<EntropyEncoderSpec>(selIR, nolumi)},
96 Options{{
"ctf-dict", VariantType::String,
"ccdb", {
"CTF dictionary: empty or ccdb=CCDB, none=no external dictionary otherwise: local filename"}},
97 {
"irframe-margin-bwd", VariantType::UInt32, 0u, {
"margin in BC to add to the IRFrame lower boundary when selection is requested"}},
98 {
"irframe-margin-fwd", VariantType::UInt32, 0u, {
"margin in BC to add to the IRFrame upper boundary when selection is requested"}},
99 {
"mem-factor", VariantType::Float, 1.f, {
"Memory allocation margin factor"}},
100 {
"ans-version", VariantType::String, {
"version of ans entropy coder implementation to use"}}}};
Convert CTP data to CTF (EncodedBlocks)
void updateTimeDependentParams(o2::framework::ProcessingContext &pc, bool askTree=false)
void init(o2::framework::InitContext &ic)
o2::ctf::CTFIOSize encode(VEC &buff, const gsl::span< const CTPDigit > &data, const LumiInfo &lumi)
entropy-encode data to buffer with CTF
bool finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj)
add CTP related shifts
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
EntropyEncoderSpec(bool selIR, bool noLumi)
void run(o2::framework::ProcessingContext &pc) final
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
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 getEntropyEncoderSpec(bool selIR=false, bool noLumiInput=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 trigger inputs and classes of the TF
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< Digit > digits