27#include "TStopwatch.h"
42 VertexTrackMatcherSpec(std::shared_ptr<DataRequest> dr, std::shared_ptr<o2::base::GRPGeomRequest> gr) : mDataRequest(dr), mGGCCDBRequest(gr){};
51 std::shared_ptr<DataRequest> mDataRequest;
52 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
69 double timeCPU0 = mTimer.CpuTime(), timeReal0 = mTimer.RealTime();
74 updateTimeDependentParams(pc);
76 std::vector<o2::dataformats::VtxTrackIndex> trackIndex;
77 std::vector<o2::dataformats::VtxTrackRef> vtxRefs;
79 mMatcher.
process(recoData, trackIndex, vtxRefs);
85 LOG(info) <<
"Made " << trackIndex.size() <<
" track associations for " << recoData.
getPrimaryVertices().size()
86 <<
" vertices, timing: CPU: " << mTimer.CpuTime() - timeCPU0 <<
" Real: " << mTimer.RealTime() - timeReal0 <<
" s";
93 static bool initOnceDone =
false;
112 LOGP(info,
"Updating TPC fast transform map with new VDrift factor of {} wrt reference {} and DriftTimeOffset correction {} wrt {} from source {}",
113 vd.corrFact, vd.refVDrift, vd.timeOffsetCorr, vd.refTimeOffset, mTPCVDriftHelper.
getSourceName());
127 LOG(info) <<
"ITS Alpide param updated";
129 par.printKeyValues();
133 LOG(info) <<
"MFT Alpide param updated";
135 par.printKeyValues();
142 LOGF(info,
"Primary vertex - track matching total timing: Cpu: %.3e Real: %.3e s in %d slots",
143 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
148 std::vector<OutputSpec> outputs;
149 auto dataRequest = std::make_shared<DataRequest>();
151 dataRequest->requestTracks(
src,
false);
153 dataRequest->requestPrimaryVerticesTMP(
false);
155 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(
false,
165 outputs.emplace_back(
"GLO",
"PVTX_TRMTC", 0, Lifetime::Timeframe);
166 outputs.emplace_back(
"GLO",
"PVTX_TRMTCREFS", 0, Lifetime::Timeframe);
169 "pvertex-track-matching",
172 AlgorithmSpec{adaptFromTask<VertexTrackMatcherSpec>(dataRequest, ggRequest)},
173 Options{{
"prescale-logs", VariantType::Int, 50, {
"print vertex logs for each n-th TF"}}}};
Helper for geometry and GRP related CCDB requests.
Definition of the Names Generator class.
Definition of the parameter class for the detector.
Definition of the parameter class for the detector electronics.
Helper class to extract VDrift from different sources.
void checkUpdates(o2::framework::ProcessingContext &pc)
static GRPGeomHelper & instance()
void setRequest(std::shared_ptr< GRPGeomRequest > req)
static const DPLAlpideParam< N > & Instance()
Static class with identifiers, bitmasks and names for ALICE detectors.
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
static void requestCCDBInputs(std::vector< o2::framework::InputSpec > &inputs, bool laser=true, bool itstpcTgl=true)
void extractCCDBInputs(o2::framework::ProcessingContext &pc, bool laser=true, bool itstpcTgl=true)
const VDriftCorrFact & getVDriftObject() const
bool accountCCDBInputs(const o2::framework::ConcreteDataMatcher &matcher, void *obj)
static std::string_view getSourceName(Source s)
constexpr double LHCBunchSpacingMUS
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
o2::framework::DataProcessorSpec getVertexTrackMatcherSpec(o2::dataformats::GlobalTrackID::mask_t src)
create a processor spec
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
auto getPrimaryVertices() const
void collectData(o2::framework::ProcessingContext &pc, const DataRequest &request)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"