Skip to content

Commit 7d0a7c8

Browse files
committed
ITS: cleanup Road
1 parent f5afa5a commit 7d0a7c8

File tree

3 files changed

+12
-69
lines changed

3 files changed

+12
-69
lines changed

Detectors/ITSMFT/ITS/tracking/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ o2_add_library(ITStracking
1919
src/TimeFrame.cxx
2020
src/IOUtils.cxx
2121
src/Label.cxx
22-
src/Road.cxx
2322
src/Tracker.cxx
2423
src/TrackerTraits.cxx
2524
src/TrackingConfigParam.cxx

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Road.h

Lines changed: 12 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,24 @@
1616
#ifndef TRACKINGCA_INCLUDE_ROAD_H
1717
#define TRACKINGCA_INCLUDE_ROAD_H
1818

19-
#ifndef GPUCA_GPUCODE_DEVICE
20-
#include <array>
21-
#endif
22-
2319
#include "ITStracking/Constants.h"
2420
#include "GPUCommonDef.h"
2521

26-
namespace o2
27-
{
28-
namespace its
22+
namespace o2::its
2923
{
3024

3125
template <unsigned char maxRoadSize = 5>
3226
class Road final
3327
{
3428
public:
35-
GPUhd() Road() : mCellIds{}, mRoadSize{}, mIsFakeRoad{} { resetRoad(); }
29+
GPUhd() Road() = default;
3630
GPUhd() Road(int cellLayer, int cellId) : Road() { addCell(cellLayer, cellId); }
3731

38-
GPUhd() int getRoadSize() const;
39-
int getLabel() const;
40-
void setLabel(const int);
41-
GPUhd() bool isFakeRoad() const;
42-
void setFakeRoad(const bool);
43-
GPUhd() int& operator[](const int&);
44-
GPUhd() int operator[](const int&) const;
32+
GPUhdi() int getRoadSize() const { return mRoadSize; }
33+
GPUhdi() bool isFakeRoad() const { return mIsFakeRoad; }
34+
GPUhdi() void setFakeRoad(const bool fake) { mIsFakeRoad = fake; }
35+
GPUhdi() int& operator[](const int& i) { return mCellIds[i]; }
36+
GPUhdi() int operator[](const int& i) const { return mCellIds[i]; }
4537

4638
GPUhd() void resetRoad()
4739
{
@@ -61,42 +53,12 @@ class Road final
6153
}
6254

6355
private:
64-
int mCellIds[maxRoadSize];
56+
int mCellIds[maxRoadSize]{constants::its::UnusedIndex};
6557
// int mLabel;
66-
unsigned char mRoadSize;
67-
bool mIsFakeRoad;
58+
unsigned char mRoadSize{0};
59+
bool mIsFakeRoad{false};
6860
};
6961

70-
template <unsigned char maxRoadSize>
71-
GPUhdi() int Road<maxRoadSize>::getRoadSize() const
72-
{
73-
return mRoadSize;
74-
}
62+
} // namespace o2::its
7563

76-
template <unsigned char maxRoadSize>
77-
GPUhdi() int& Road<maxRoadSize>::operator[](const int& i)
78-
{
79-
return mCellIds[i];
80-
}
81-
82-
template <unsigned char maxRoadSize>
83-
GPUhdi() int Road<maxRoadSize>::operator[](const int& i) const
84-
{
85-
return mCellIds[i];
86-
}
87-
88-
template <unsigned char maxRoadSize>
89-
GPUhdi() bool Road<maxRoadSize>::isFakeRoad() const
90-
{
91-
return mIsFakeRoad;
92-
}
93-
94-
template <unsigned char maxRoadSize>
95-
inline void Road<maxRoadSize>::setFakeRoad(const bool isFakeRoad)
96-
{
97-
mIsFakeRoad = isFakeRoad;
98-
}
99-
} // namespace its
100-
} // namespace o2
101-
102-
#endif
64+
#endif

Detectors/ITSMFT/ITS/tracking/src/Road.cxx

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)