46 bool decodeinps = !ic.
options().
get<
bool>(
"ignore-ctpinputs-decoding-ctf");
48 LOG(info) <<
"Decode inputs:" << decodeinps;
53 auto cput = mTimer.CpuTime();
58 auto buff = pc.
inputs().
get<gsl::span<o2::ctf::BufferType>>(
"ctf_CTP");
69 LOG(info) <<
"Decoded " <<
digits.size() <<
" CTP digits, (" << iosize.
asString() <<
") in " << mTimer.CpuTime() - cput <<
" s";
74 LOGF(info,
"CTP Entropy Decoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
75 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
84 if (ctpcfg !=
nullptr) {
94 std::vector<OutputSpec> outputs{
95 OutputSpec{{
"digits"},
"CTP",
"DIGITS", 0, Lifetime::Timeframe},
96 OutputSpec{{
"CTPLumi"},
"CTP",
"LUMI", 0, Lifetime::Timeframe},
97 OutputSpec{{
"ctfrep"},
"CTP",
"CTFDECREP", 0, Lifetime::Timeframe}};
99 std::vector<InputSpec> inputs;
100 inputs.emplace_back(
"ctf_CTP",
"CTP",
"CTFDATA", sspec, Lifetime::Timeframe);
102 if (ctfdictOpt.empty() || ctfdictOpt ==
"ccdb") {
103 inputs.emplace_back(
"ctfdict_CTP",
"CTP",
"CTFDICT", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Calib/CTFDictionaryTree"));
105 inputs.emplace_back(
"trigoffset",
"CTP",
"Trig_Offset", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Config/TriggerOffsets"));
106 inputs.emplace_back(
"ctpconfig",
"CTP",
"CTPCONFIG", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Config/Config", 1));
108 "ctp-entropy-decoder",
112 Options{{
"ignore-ctpinputs-decoding-ctf", VariantType::Bool,
false, {
"Inputs alignment: false - CTF decoder - has to be compatible with reco: allowed options: 10,01,00"}},
113 {
"ans-version", VariantType::String, {
"version of ans entropy coder implementation to use"}}}};
Convert CTF (EncodedBlocks) to CTP digit stream.
void setSupportBCShifts(bool v=true)
void updateTimeDependentParams(o2::framework::ProcessingContext &pc, bool askTree=false)
void setDictBinding(const std::string &s)
void init(o2::framework::InitContext &ic)
static auto getImage(const void *newHead)
get const image of the container wrapper, with pointers in the image relocated to new head
CTPConfiguration & getCTPConfig()
void setCTPConfig(CTPConfiguration cfg)
bool finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj)
add CTP related shifts
void setDecodeInps(bool decodeinps)
o2::ctf::CTFIOSize decode(const CTF::base &ec, VTRG &data, LumiInfo &lumi)
entropy decode data from buffer with CTF
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
void updateTimeDependentParams(framework::ProcessingContext &pc)
void init(o2::framework::InitContext &ic) final
EntropyDecoderSpec(int verbosity, const std::string &ctfdictOpt="none")
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void run(o2::framework::ProcessingContext &pc) final
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
decltype(auto) make(const Output &spec, Args... args)
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
InputRecord & inputs()
The inputs associated with this processing context.
ServiceRegistryRef services()
The services registry associated with this processing context.
framework::DataProcessorSpec getEntropyDecoderSpec(int verbosity, unsigned int sspec, const std::string &ctfdictOpt)
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
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string asString() const
wrapper for the Entropy-encoded trigger inputs and classes of the TF
bool globalRunNumberChanged
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< Digit > digits