27#include <TStopwatch.h>
54 std::vector<o2::ctp::CTPInputDigit> finputs;
58 LOG(info) <<
"CALLING CTP DIGITIZATION";
62 auto ft0inputs = pc.
inputs().
get<gsl::span<o2::ft0::DetTrigInput>>(
"ft0");
63 for (
const auto& inp : ft0inputs) {
69 auto fv0inputs = pc.
inputs().
get<gsl::span<o2::fv0::DetTrigInput>>(
"fv0");
70 for (
const auto& inp : fv0inputs) {
76 auto emcinputs = pc.
inputs().
get<gsl::span<o2::ctp::CTPInputDigit>>(
"emc");
77 for (
const auto& inp : emcinputs) {
78 finputs.emplace_back(inp);
81 gsl::span<CTPInputDigit> ginputs(finputs);
84 LOG(info) <<
"CTP DIGITS being sent.";
86 LOG(info) <<
"CTP PRESENT being sent.";
89 LOG(info) <<
"CTP Digitization took " << timer.CpuTime() <<
"s";
96 LOG(info) <<
"Loading CTP configuration" << std::endl;
108 std::vector<InputSpec> inputs;
109 std::vector<OutputSpec>
output;
112 inputs.emplace_back(
"ft0",
"FT0",
"TRIGGERINPUT", 0, Lifetime::Timeframe);
115 inputs.emplace_back(
"fv0",
"FV0",
"TRIGGERINPUT", 0, Lifetime::Timeframe);
118 inputs.emplace_back(
"emc",
"EMC",
"TRIGGERINPUT", 0, Lifetime::Timeframe);
120 inputs.emplace_back(
"ctpconfig",
"CTP",
"CTPCONFIG", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Config/Config",
true));
121 output.emplace_back(
"CTP",
"DIGITS", 0, Lifetime::Timeframe);
122 output.emplace_back(
"CTP",
"ROMode", 0, Lifetime::Timeframe);
128 Options{{
"pileup", VariantType::Int, 1, {
"whether to run in continuous time mode"}},
Definition of the base digitizer task class.
definition of CTPDigit, CTPInputDigit
BaseDPLDigitizer()=default
std::vector< o2::detectors::DetID > mDetList
void run(framework::ProcessingContext &pc)
CTPDPLDigitizerTask(const std::vector< o2::detectors::DetID > &detList)
void initDigitizerTask(framework::InitContext &ic) override
~CTPDPLDigitizerTask() override=default
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj)
o2::parameters::GRPObject::ROMode mROMode
o2::ctp::Digitizer mDigitizer
Digitizer.
std::vector< CTPDigit > process(const gsl::span< o2::ctp::CTPInputDigit > detinputs)
void setCTPConfiguration(o2::ctp::CTPConfiguration *config)
void snapshot(const Output &spec, T const &object)
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
InputRecord & inputs()
The inputs associated with this processing context.
o2::framework::DataProcessorSpec getCTPDigitizerSpec(int channel, std::vector< o2::detectors::DetID > &detList, bool mctruth)
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 ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< Digit > digits