Project
Loading...
Searching...
No Matches
TPCFastTransformHelperO2.h
Go to the documentation of this file.
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
20
21#ifndef ALICEO2_TPC_TPCFASTTRANSFORMHELPERO2_H_
22#define ALICEO2_TPC_TPCFASTTRANSFORMHELPERO2_H_
23
24#include "TPCFastTransformPOD.h"
25#include "GPUCommonRtypes.h"
26
27namespace o2
28{
29namespace tpc
30{
31
32using namespace o2::gpu;
33
35{
36 public:
38
41
44
47
50
53
55
57 std::unique_ptr<TPCFastTransform> create(int64_t TimeStamp);
58
60 std::unique_ptr<TPCFastTransform> create(int64_t TimeStamp, const TPCFastSpaceChargeCorrection& correction);
61
63 int updateCalibration(TPCFastTransform& fastTransform, int64_t TimeStamp, float vDriftFactor = 1.f, float vDriftRef = 0.f, float driftTimeOffset = 0.f)
64 {
65 return updateCalibrationImpl(fastTransform, TimeStamp, vDriftFactor, vDriftRef, driftTimeOffset);
66 }
67
68 int updateCalibration(TPCFastTransformPOD& fastTransform, int64_t TimeStamp, float vDriftFactor = 1.f, float vDriftRef = 0.f, float driftTimeOffset = 0.f)
69 {
70 return updateCalibrationImpl(fastTransform, TimeStamp, vDriftFactor, vDriftRef, driftTimeOffset);
71 }
73
74 const TPCFastTransformGeo& getGeometry() { return mGeo; }
75
76 void testGeometry(const TPCFastTransformGeo& fastTransform) const;
77
78 private:
80 void init();
81
82 template <typename T>
83 int updateCalibrationImpl(T& transform, int64_t TimeStamp, float vDriftFactor, float vDriftRef, float driftTimeOffset);
84
85 static TPCFastTransformHelperO2* sInstance;
86 bool mIsInitialized = 0;
88
89 ClassDefNV(TPCFastTransformHelperO2, 3);
90};
91} // namespace tpc
92} // namespace o2
93#endif
POD correction map.
void testGeometry(const TPCFastTransformGeo &fastTransform) const
int updateCalibration(TPCFastTransformPOD &fastTransform, int64_t TimeStamp, float vDriftFactor=1.f, float vDriftRef=0.f, float driftTimeOffset=0.f)
~TPCFastTransformHelperO2()=default
Destructor.
const TPCFastTransformGeo & getGeometry()
_______________ Utilities ________________________
static TPCFastTransformHelperO2 * instance()
Singleton.
TPCFastTransformHelperO2(const TPCFastTransformHelperO2 &)=delete
Copy constructor: disabled.
std::unique_ptr< TPCFastTransform > create(int64_t TimeStamp)
_______________ Main functionality ________________________
int updateCalibration(TPCFastTransform &fastTransform, int64_t TimeStamp, float vDriftFactor=1.f, float vDriftRef=0.f, float driftTimeOffset=0.f)
Updates the transformation with the new time stamp.
TPCFastTransformHelperO2 & operator=(const TPCFastTransformHelperO2 &)=delete
Assignment operator: disabled.
TPCFastTransformHelperO2()=default
_____________ Constructors / destructors __________________________
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...