Skip to content

Commit 1845d93

Browse files
committed
GPU: Simplify setting calib objects
1 parent 6c5522b commit 1845d93

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

GPU/GPUTracking/Base/GPUDataTypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ struct GPUCalibObjectsTemplate {
179179
typename S<TPCPadGainCalib>::type* tpcPadGain = nullptr;
180180
typename S<o2::base::Propagator>::type* o2Propagator = nullptr;
181181
};
182-
typedef GPUCalibObjectsTemplate<DefaultPtr> GPUCalibObjects;
182+
typedef GPUCalibObjectsTemplate<DefaultPtr> GPUCalibObjects; // NOTE: These 2 must have identical layout since they are memcopied
183183
typedef GPUCalibObjectsTemplate<ConstPtr> GPUCalibObjectsConst;
184184

185185
struct GPUTrackingInOutZS {

GPU/GPUTracking/Global/GPUChainTracking.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ class GPUChainTracking : public GPUChain, GPUReconstructionHelpers::helperDelega
167167
void SetMatLUT(const o2::base::MatLayerCylSet* lut) { processors()->calibObjects.matLUT = lut; }
168168
void SetTRDGeometry(const o2::trd::GeometryFlat* geo) { processors()->calibObjects.trdGeometry = geo; }
169169
void SetO2Propagator(const o2::base::Propagator* prop) { processors()->calibObjects.o2Propagator = prop; }
170+
void SetCalibObjects(const GPUCalibObjectsConst& obj) { processors()->calibObjects = obj; }
171+
void SetCalibObjects(const GPUCalibObjects& obj) { memcpy((void*)&processors()->calibObjects, (const void*)&obj, sizeof(obj)); }
170172
void SetDefaultO2PropagatorForGPU();
171173
void LoadClusterErrors();
172174
void SetOutputControlCompressedClusters(GPUOutputControl* v) { mOutputCompressedClusters = v; }

GPU/GPUTracking/Interface/GPUO2Interface.cxx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,7 @@ int GPUTPCO2Interface::Initialize(const GPUO2InterfaceConfiguration& config)
5252
mConfig->configEvent.needsClusterer = 1;
5353
}
5454
mRec->SetSettings(&mConfig->configEvent, &mConfig->configReconstruction, &mConfig->configProcessing, &mConfig->configWorkflow);
55-
mChain->SetTPCFastTransform(mConfig->configCalib.fastTransform);
56-
mChain->SetTPCPadGainCalib(mConfig->configCalib.tpcPadGain);
57-
mChain->SetdEdxSplines(mConfig->configCalib.dEdxSplines);
58-
mChain->SetMatLUT(mConfig->configCalib.matLUT);
59-
mChain->SetTRDGeometry(mConfig->configCalib.trdGeometry);
60-
mChain->SetO2Propagator(mConfig->configCalib.o2Propagator);
55+
mChain->SetCalibObjects(mConfig->configCalib);
6156
if (mConfig->configInterface.outputToExternalBuffers) {
6257
mOutputCompressedClusters.reset(new GPUOutputControl);
6358
mChain->SetOutputControlCompressedClusters(mOutputCompressedClusters.get());

0 commit comments

Comments
 (0)