|
| 1 | +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. |
| 2 | +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. |
| 3 | +// All rights not expressly granted are reserved. |
| 4 | +// |
| 5 | +// This software is distributed under the terms of the GNU General Public |
| 6 | +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". |
| 7 | +// |
| 8 | +// In applying this license CERN does not waive the privileges and immunities |
| 9 | +// granted to it by virtue of its status as an Intergovernmental Organization |
| 10 | +// or submit itself to any jurisdiction. |
| 11 | + |
| 12 | +#include <vector> |
| 13 | + |
| 14 | +#include "Framework/ControlService.h" |
| 15 | +#include "Framework/ConfigParamRegistry.h" |
| 16 | +#include "Framework/CCDBParamSpec.h" |
| 17 | +#include "TRKWorkflow/TrackerSpec.h" |
| 18 | + |
| 19 | +namespace o2 |
| 20 | +{ |
| 21 | +using namespace framework; |
| 22 | +namespace trk |
| 23 | +{ |
| 24 | +using Vertex = o2::dataformats::Vertex<o2::dataformats::TimeStamp<int>>; |
| 25 | + |
| 26 | +TrackerDPL::TrackerDPL(std::shared_ptr<o2::base::GRPGeomRequest> gr, |
| 27 | + bool isMC, |
| 28 | + o2::gpu::GPUDataTypes::DeviceType dType) |
| 29 | +{ |
| 30 | + // mITSTrackingInterface.setTrackingMode(trMode); |
| 31 | +} |
| 32 | + |
| 33 | +void TrackerDPL::init(InitContext& ic) |
| 34 | +{ |
| 35 | + // mTimer.Stop(); |
| 36 | + // mTimer.Reset(); |
| 37 | + // o2::base::GRPGeomHelper::instance().setRequest(mGGCCDBRequest); |
| 38 | + // mChainITS.reset(mRecChain->AddChain<o2::gpu::GPUChainITS>()); |
| 39 | + // mITSTrackingInterface.setTraitsFromProvider(mChainITS->GetITSVertexerTraits(), |
| 40 | + // mChainITS->GetITSTrackerTraits(), |
| 41 | + // mChainITS->GetITSTimeframe()); |
| 42 | +} |
| 43 | + |
| 44 | +void TrackerDPL::stop() |
| 45 | +{ |
| 46 | + LOGF(info, "CPU Reconstruction total timing: Cpu: %.3e Real: %.3e s in %d slots", mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1); |
| 47 | +} |
| 48 | + |
| 49 | +void TrackerDPL::run(ProcessingContext& pc) |
| 50 | +{ |
| 51 | + auto cput = mTimer.CpuTime(); |
| 52 | + auto realt = mTimer.RealTime(); |
| 53 | + mTimer.Start(false); |
| 54 | + // mITSTrackingInterface.updateTimeDependentParams(pc); |
| 55 | + // mITSTrackingInterface.run(pc); |
| 56 | + mTimer.Stop(); |
| 57 | + LOGP(info, "CPU Reconstruction time for this TF {} s (cpu), {} s (wall)", mTimer.CpuTime() - cput, mTimer.RealTime() - realt); |
| 58 | +} |
| 59 | + |
| 60 | +// void TrackerDPL::finaliseCCDB(ConcreteDataMatcher& matcher, void* obj) |
| 61 | +// { |
| 62 | +// // mITSTrackingInterface.finaliseCCDB(matcher, obj); |
| 63 | +// } |
| 64 | + |
| 65 | +void TrackerDPL::endOfStream(EndOfStreamContext& ec) |
| 66 | +{ |
| 67 | + LOGF(info, "TRK CA-Tracker total timing: Cpu: %.3e Real: %.3e s in %d slots", mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1); |
| 68 | +} |
| 69 | + |
| 70 | +DataProcessorSpec getTrackerSpec(bool useMC, o2::gpu::GPUDataTypes::DeviceType dType) |
| 71 | +{ |
| 72 | + std::vector<InputSpec> inputs; |
| 73 | + |
| 74 | + // inputs.emplace_back("compClusters", "TRK", "COMPCLUSTERS", 0, Lifetime::Timeframe); |
| 75 | + // inputs.emplace_back("patterns", "TRK", "PATTERNS", 0, Lifetime::Timeframe); |
| 76 | + // inputs.emplace_back("ROframes", "TRK", "CLUSTERSROF", 0, Lifetime::Timeframe); |
| 77 | + |
| 78 | + // inputs.emplace_back("itscldict", "TRK", "CLUSDICT", 0, Lifetime::Condition, ccdbParamSpec("ITS/Calib/ClusterDictionary")); |
| 79 | + // inputs.emplace_back("itsalppar", "TRK", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("ITS/Config/AlpideParam")); |
| 80 | + auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, // orbitResetTime |
| 81 | + false, // GRPECS=true |
| 82 | + false, // GRPLHCIF |
| 83 | + false, // GRPMagField |
| 84 | + false, // askMatLUT |
| 85 | + o2::base::GRPGeomRequest::None, // geometry, but ignored until it will be put in the CCDB |
| 86 | + inputs, |
| 87 | + true); |
| 88 | + std::vector<OutputSpec> outputs; |
| 89 | + outputs.emplace_back("TRK", "TRACKS", 0, Lifetime::Timeframe); |
| 90 | + // outputs.emplace_back("TRK", "TRACKCLSID", 0, Lifetime::Timeframe); |
| 91 | + // outputs.emplace_back("TRK", "TRKTrackROF", 0, Lifetime::Timeframe); |
| 92 | + // outputs.emplace_back("TRK", "VERTICES", 0, Lifetime::Timeframe); |
| 93 | + // outputs.emplace_back("TRK", "VERTICESROF", 0, Lifetime::Timeframe); |
| 94 | + // outputs.emplace_back("TRK", "IRFRAMES", 0, Lifetime::Timeframe); |
| 95 | + |
| 96 | + if (useMC) { |
| 97 | + // inputs.emplace_back("trkmclabels", "TRK", "CLUSTERSMCTR", 0, Lifetime::Timeframe); |
| 98 | + // inputs.emplace_back("TRKMC2ROframes", "TRK", "CLUSTERSMC2ROF", 0, Lifetime::Timeframe); |
| 99 | + // outputs.emplace_back("TRK", "VERTICESMCTR", 0, Lifetime::Timeframe); |
| 100 | + // outputs.emplace_back("TRK", "VERTICESMCPUR", 0, Lifetime::Timeframe); |
| 101 | + // outputs.emplace_back("TRK", "TRACKSMCTR", 0, Lifetime::Timeframe); |
| 102 | + // outputs.emplace_back("TRK", "TRKTrackMC2ROF", 0, Lifetime::Timeframe); |
| 103 | + } |
| 104 | + |
| 105 | + return DataProcessorSpec{ |
| 106 | + "trk-tracker", |
| 107 | + inputs, |
| 108 | + outputs, |
| 109 | + AlgorithmSpec{adaptFromTask<TrackerDPL>(ggRequest, |
| 110 | + useMC, |
| 111 | + dType)}, |
| 112 | + Options{}}; |
| 113 | +} |
| 114 | + |
| 115 | +} // namespace its |
| 116 | +} // namespace o2 |
0 commit comments