Skip to content

Commit edf5b1d

Browse files
authored
Add missing mem-factor option to MCH EntropyEncoder (#7440)
1 parent bd4f0cf commit edf5b1d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Detectors/MUON/MCH/Workflow/src/EntropyDecoderSpec.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ EntropyDecoderSpec::EntropyDecoderSpec()
5050
void EntropyDecoderSpec::init(o2::framework::InitContext& ic)
5151
{
5252
std::string dictPath = ic.options().get<std::string>("ctf-dict");
53+
mCTFCoder.setMemMarginFactor(ic.options().get<float>("mem-factor"));
5354
if (!dictPath.empty() && dictPath != "none") {
5455
mCTFCoder.createCoders(dictPath, o2::ctf::CTFCoderBase::OpType::Decoder);
5556
}
@@ -70,7 +71,7 @@ void EntropyDecoderSpec::run(ProcessingContext& pc)
7071
mCTFCoder.decode(ctfImage, rofs, digits);
7172

7273
mTimer.Stop();
73-
LOG(INFO) << "Decoded " << digits.size() << " MCH digits in " << rofs.size() << " ROFRecords in " << mTimer.CpuTime() - cput << " s";
74+
LOG(INFO) << "Decoded " << digits.size() << " MCH digits in " << rofs.size() << " ROFRecords in " << mTimer.CpuTime() - cput << " s.";
7475
}
7576

7677
void EntropyDecoderSpec::endOfStream(EndOfStreamContext& ec)
@@ -90,7 +91,8 @@ DataProcessorSpec getEntropyDecoderSpec(const char* specName)
9091
Inputs{InputSpec{"ctf", "MCH", "CTFDATA", 0, Lifetime::Timeframe}},
9192
outputs,
9293
AlgorithmSpec{adaptFromTask<EntropyDecoderSpec>()},
93-
Options{{"ctf-dict", VariantType::String, o2::base::NameConf::getCTFDictFileName(), {"File of CTF decoding dictionary"}}}};
94+
Options{{"ctf-dict", VariantType::String, o2::base::NameConf::getCTFDictFileName(), {"File of CTF decoding dictionary"}},
95+
{"mem-factor", VariantType::Float, 1.f, {"Memory allocation margin factor"}}}};
9496
}
9597

9698
} // namespace mch

0 commit comments

Comments
 (0)