47 bool decodeinps = !ic.
options().
get<
bool>(
"ignore-ctpinputs-decoding-ctf");
49 LOG(info) <<
"Decode inputs:" << decodeinps;
54 auto cput = mTimer.CpuTime();
59 auto buff = pc.
inputs().
get<gsl::span<o2::ctf::BufferType>>(
"ctf_CTP");
70 LOG(info) <<
"Decoded " <<
digits.size() <<
" CTP digits, (" << iosize.
asString() <<
") in " << mTimer.CpuTime() - cput <<
" s";
75 LOGF(info,
"CTP Entropy Decoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
76 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
85 if (ctpcfg !=
nullptr) {
95 std::vector<OutputSpec> outputs{
96 OutputSpec{{
"digits"},
"CTP",
"DIGITS", 0, Lifetime::Timeframe},
97 OutputSpec{{
"CTPLumi"},
"CTP",
"LUMI", 0, Lifetime::Timeframe},
98 OutputSpec{{
"ctfrep"},
"CTP",
"CTFDECREP", 0, Lifetime::Timeframe}};
100 std::vector<InputSpec> inputs;
101 inputs.emplace_back(
"ctf_CTP",
"CTP",
"CTFDATA", sspec, Lifetime::Timeframe);
102 inputs.emplace_back(
"ctfdict_CTP",
"CTP",
"CTFDICT", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Calib/CTFDictionaryTree"));
103 inputs.emplace_back(
"trigoffset",
"CTP",
"Trig_Offset", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Config/TriggerOffsets"));
104 inputs.emplace_back(
"ctpconfig",
"CTP",
"CTPCONFIG", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Config/Config", 1));
106 "ctp-entropy-decoder",
110 Options{{
"ctf-dict", VariantType::String,
"ccdb", {
"CTF dictionary: empty or ccdb=CCDB, none=no external dictionary otherwise: local filename"}},
111 {
"ignore-ctpinputs-decoding-ctf", VariantType::Bool,
false, {
"Inputs alignment: false - CTF decoder - has to be compatible with reco: allowed options: 10,01,00"}},
112 {
"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
EntropyDecoderSpec(int verbosity)
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
void updateTimeDependentParams(framework::ProcessingContext &pc)
void init(o2::framework::InitContext &ic) final
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)
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