29#include <TStopwatch.h>
56 std::vector<o2::ctp::CTPInputDigit> finputs;
60 LOG(info) <<
"CALLING CTP DIGITIZATION";
64 auto ft0inputs = pc.
inputs().
get<gsl::span<o2::ft0::DetTrigInput>>(
"ft0");
65 for (
const auto& inp : ft0inputs) {
71 auto fv0inputs = pc.
inputs().
get<gsl::span<o2::fv0::DetTrigInput>>(
"fv0");
72 for (
const auto& inp : fv0inputs) {
78 auto emcinputs = pc.
inputs().
get<gsl::span<o2::ctp::CTPInputDigit>>(
"emc");
79 for (
const auto& inp : emcinputs) {
80 finputs.emplace_back(inp);
83 gsl::span<CTPInputDigit> ginputs(finputs);
86 LOG(info) <<
"CTP DIGITS being sent.";
88 LOG(info) <<
"CTP PRESENT being sent.";
93 LOG(info) <<
"CTP Lumi scaler " << lminfo.counts <<
" for integration time of " << lminfo.nHBFCounted <<
" being sent";
97 LOG(info) <<
"CTP Digitization took " << timer.CpuTime() <<
"s";
104 LOG(info) <<
"Loading CTP configuration" << std::endl;
118 std::vector<InputSpec> inputs;
119 std::vector<OutputSpec>
output;
122 inputs.emplace_back(
"ft0",
"FT0",
"TRIGGERINPUT", 0, Lifetime::Timeframe);
125 inputs.emplace_back(
"fv0",
"FV0",
"TRIGGERINPUT", 0, Lifetime::Timeframe);
128 inputs.emplace_back(
"emc",
"EMC",
"TRIGGERINPUT", 0, Lifetime::Timeframe);
130 inputs.emplace_back(
"ctpconfig",
"CTP",
"CTPCONFIG", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Config/Config",
true));
131 output.emplace_back(
"CTP",
"DIGITS", 0, Lifetime::Timeframe);
132 if (ctpLumiScaler >= 0.f) {
133 output.emplace_back(
"CTP",
"LUMI", 0, Lifetime::Timeframe);
135 output.emplace_back(
"CTP",
"ROMode", 0, Lifetime::Timeframe);
140 AlgorithmSpec{adaptFromTask<CTPDPLDigitizerTask>(detList, ctpLumiScaler)},
141 Options{{
"pileup", VariantType::Int, 1, {
"whether to run in continuous time mode"}},
Definition of the base digitizer task class.
definition of CTPDigit, CTPInputDigit
Header to collect LHC related constants.
BaseDPLDigitizer()=default
std::vector< o2::detectors::DetID > mDetList
CTPDPLDigitizerTask(const std::vector< o2::detectors::DetID > &detList, float ctpLumiScaler)
void run(framework::ProcessingContext &pc)
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.
ServiceRegistryRef services()
The services registry associated with this processing context.
constexpr double LHCRevFreq
o2::framework::DataProcessorSpec getCTPDigitizerSpec(int channel, std::vector< o2::detectors::DetID > &detList, float ctpLumiScaler, 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