Skip to content

Commit eeb1c86

Browse files
committed
GPU TRD: Reduce headers included in interface class
1 parent ef05efa commit eeb1c86

9 files changed

Lines changed: 28 additions & 11 deletions

File tree

DataFormats/Detectors/TRD/include/DataFormatsTRD/TrackTRD.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define O2_DATAFORMATS_TRACK_TRD_H
1717

1818
#include "GPUTRDTrack.h"
19+
#include "ReconstructionDataFormats/GlobalTrackID.h"
1920

2021
namespace o2
2122
{

Detectors/TPC/dcs/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ o2_add_library(TPCdcs
1818
PUBLIC_LINK_LIBRARIES O2::Framework
1919
O2::DetectorsDCS
2020
O2::DataFormatsTPC
21-
O2::TPCBase)
21+
O2::TPCBase
22+
O2::TPCBaseRecSim)
2223

2324
o2_target_root_dictionary(TPCdcs
2425
HEADERS include/TPCdcs/DCSProcessor.h)

Detectors/TRD/calibration/src/TrackBasedCalib.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include "TRDBase/Geometry.h"
2323
#include "TRDBase/PadPlane.h"
2424
#include "CommonUtils/NameConf.h"
25+
#include "DataFormatsTPC/TrackTPC.h"
26+
#include "ReconstructionDataFormats/TrackTPCITS.h"
2527
#include <fairlogger/Logger.h>
2628

2729
using namespace o2::trd;

Detectors/TRD/pid/include/TRDPID/LQND.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#include "DetectorsBase/Propagator.h"
2828
#include "Framework/Logger.h"
2929
#include "ReconstructionDataFormats/TrackParametrization.h"
30+
#include "DataFormatsTPC/TrackTPC.h"
31+
#include "ReconstructionDataFormats/TrackTPCITS.h"
3032

3133
#include <memory>
3234
#include <vector>

Detectors/TRD/workflow/io/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ o2_add_library(TRDWorkflowIO
2323
src/TRDCalibWriterSpec.cxx
2424
src/TRDPHReaderSpec.cxx
2525
include/TRDWorkflowIO/KrClusterWriterSpec.h
26-
PUBLIC_LINK_LIBRARIES O2::DataFormatsTRD O2::SimulationDataFormat O2::DPLUtils O2::GPUDataTypes O2::DataFormatsTPC)
26+
PUBLIC_LINK_LIBRARIES O2::DataFormatsTRD O2::SimulationDataFormat O2::DPLUtils O2::GPUDataTypes O2::DataFormatsTPC O2::DetectorsRaw)
2727

2828

2929
o2_add_executable(digit-reader-workflow

GPU/GPUTracking/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ if(ALIGPU_BUILD_TYPE STREQUAL "O2")
354354
O2::ReconstructionDataFormats
355355
O2::TPCFastTransformation
356356
PRIVATE_LINK_LIBRARIES O2::DataFormatsTPC
357+
O2::TPCBase
357358
SOURCES ${SRCS_DATATYPES})
358359
target_compile_definitions(${targetName} PRIVATE GPUCA_O2_LIB)
359360

GPU/GPUTracking/DataTypes/GPUTRDInterfaceO2Track.h

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,24 @@ namespace o2::gpu
2121
{
2222
template <typename T>
2323
class trackInterface;
24+
template <typename T>
25+
class GPUTRDTrack_t;
2426
class GPUTPCGMMergedTrack;
2527
namespace gputpcgmmergertypes
2628
{
2729
struct GPUTPCOuterParam;
2830
} // namespace gputpcgmmergertypes
2931
} // namespace o2::gpu
32+
namespace o2::tpc
33+
{
34+
class TrackTPC;
35+
}
36+
namespace o2::dataformats
37+
{
38+
class TrackTPCITS;
39+
}
3040

3141
#include "ReconstructionDataFormats/Track.h"
32-
#include "ReconstructionDataFormats/TrackTPCITS.h"
33-
#include "DataFormatsTPC/TrackTPC.h"
34-
#include "ReconstructionDataFormats/GlobalTrackID.h"
3542
#include "ReconstructionDataFormats/TrackLTIntegral.h"
3643
#include "CommonConstants/LHCConstants.h"
3744

@@ -44,8 +51,11 @@ class trackInterface<o2::track::TrackParCov> : public o2::track::TrackParCov
4451
public:
4552
GPUdDefault() trackInterface() = default;
4653
trackInterface(const o2::track::TrackParCov& param) = delete;
47-
GPUd() trackInterface(const o2::dataformats::TrackTPCITS& trkItsTpc) : o2::track::TrackParCov(trkItsTpc.getParamOut()) {}
48-
GPUd() trackInterface(const o2::tpc::TrackTPC& trkTpc) : o2::track::TrackParCov(trkTpc.getParamOut()) {}
54+
trackInterface(const GPUTRDTrack_t<o2::gpu::trackInterface<o2::track::TrackParCov>>& param) = delete;
55+
template <class T>
56+
GPUd() trackInterface(const T& trkSrc) : o2::track::TrackParCov(trkSrc.getParamOut())
57+
{
58+
}
4959

5060
GPUd() void set(float x, float alpha, const float* param, const float* cov)
5161
{

GPU/GPUTracking/DataTypes/GPUTRDTrack.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ GPUd() void GPUTRDTrack_t<T>::initialize()
4343
#include "DataFormatsTPC/TrackTPC.h"
4444

4545
template <typename T>
46-
GPUd() GPUTRDTrack_t<T>::GPUTRDTrack_t(const o2::dataformats::TrackTPCITS& t) : T(t)
46+
GPUd() GPUTRDTrack_t<T>::GPUTRDTrack_t(const o2::dataformats::TrackTPCITS& t) : T(static_cast<const T&>(t))
4747
{
4848
initialize();
4949
}
5050

5151
template <typename T>
52-
GPUd() GPUTRDTrack_t<T>::GPUTRDTrack_t(const o2::tpc::TrackTPC& t) : T(t)
52+
GPUd() GPUTRDTrack_t<T>::GPUTRDTrack_t(const o2::tpc::TrackTPC& t) : T(static_cast<const T&>(t))
5353
{
5454
initialize();
5555
}
5656

5757
template <typename T>
5858
GPUd() GPUTRDTrack_t<T>::GPUTRDTrack_t(const GPUTRDTrack_t<T>& t)
59-
: T(t), mChi2(t.mChi2), mSignal(t.mSignal), mRefGlobalTrackId(t.mRefGlobalTrackId), mCollisionId(t.mCollisionId), mFlags(t.mFlags), mIsCrossingNeighbor(t.mIsCrossingNeighbor)
59+
: T(static_cast<const T&>(t)), mChi2(t.mChi2), mSignal(t.mSignal), mRefGlobalTrackId(t.mRefGlobalTrackId), mCollisionId(t.mCollisionId), mFlags(t.mFlags), mIsCrossingNeighbor(t.mIsCrossingNeighbor)
6060
{
6161
// copy constructor
6262
for (int32_t i = 0; i < kNLayers; ++i) {

Generators/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ o2_add_library(Generators
5252
$<$<BOOL:${HepMC3_FOUND}>:src/AODToHepMC.cxx>
5353
$<$<AND:$<BOOL:${pythia_FOUND}>,$<BOOL:${HepMC3_FOUND}>>:src/GeneratorHybrid.cxx>
5454
$<$<AND:$<BOOL:${pythia_FOUND}>,$<BOOL:${HepMC3_FOUND}>>:src/GeneratorHybridParam.cxx>
55-
PUBLIC_LINK_LIBRARIES FairRoot::Base O2::SimConfig O2::CommonUtils O2::DetectorsBase O2::ZDCBase
55+
PUBLIC_LINK_LIBRARIES FairRoot::Base O2::SimConfig O2::CommonUtils O2::DetectorsBase O2::ZDCBase O2::DetectorsRaw
5656
O2::SimulationDataFormat ${pythiaTarget} ${hepmcTarget}
5757
FairRoot::Gen
5858
onnxruntime::onnxruntime

0 commit comments

Comments
 (0)