48 auto cput = mTimer.CpuTime();
53 const int maxDumRep = 5;
54 static int dumRep = 0;
60 if (dumRep < maxDumRep && lumiPrev.nHBFCounted == 0 && lumiPrev.nHBFCountedFV0 == 0) {
61 LOGP(alarm,
"Previous TF lumi used to substitute dummy input is empty, warning {} of {}", ++dumRep, maxDumRep);
70 LOG(info) << iosize.asString() <<
" in " << mTimer.CpuTime() - cput <<
" s";
75 LOGF(info,
"CTP Entropy Encoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
76 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
81 std::vector<InputSpec> inputs;
82 inputs.emplace_back(
"digits",
"CTP",
"DIGITS", 0, Lifetime::Timeframe);
84 inputs.emplace_back(
"CTPLumi",
"CTP",
"LUMI", 0, Lifetime::Timeframe);
87 if (ctfdictOpt.empty() || ctfdictOpt ==
"ccdb") {
88 inputs.emplace_back(
"ctfdict",
"CTP",
"CTFDICT", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Calib/CTFDictionaryTree"));
91 inputs.emplace_back(
"selIRFrames",
"CTF",
"SELIRFRAMES", 0, Lifetime::Timeframe);
94 "ctp-entropy-encoder",
96 Outputs{{
"CTP",
"CTFDATA", 0, Lifetime::Timeframe}, {{
"ctfrep"},
"CTP",
"CTFENCREP", 0, Lifetime::Timeframe}},
97 AlgorithmSpec{adaptFromTask<EntropyEncoderSpec>(selIR, nolumi, ctfdictOpt)},
98 Options{{
"irframe-margin-bwd", VariantType::UInt32, 0u, {
"margin in BC to add to the IRFrame lower boundary when selection is requested"}},
99 {
"irframe-margin-fwd", VariantType::UInt32, 0u, {
"margin in BC to add to the IRFrame upper boundary when selection is requested"}},
100 {
"mem-factor", VariantType::Float, 1.f, {
"Memory allocation margin factor"}},
101 {
"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
EntropyEncoderSpec(bool selIR, bool noLumi, const std::string &ctfdictOpt="none")
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
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, 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
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