Skip to content

Commit ce3c49d

Browse files
committed
Minor modifications such that ITS geometry does not break GPU Standalone compilation when headers are included
1 parent 844c68d commit ce3c49d

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

Detectors/Base/include/DetectorsBase/GeometryManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <TObject.h> // for TObject
2323
#include <string_view>
2424
#include "DetectorsCommonDataFormats/DetID.h"
25-
#include "FairLogger.h" // for LOG
25+
#include "GPUCommonLogger.h" // for LOG
2626
#include "MathUtils/Cartesian.h"
2727
#include "DetectorsBase/MatCell.h"
2828
#include <mutex>

Detectors/ITSMFT/ITS/base/include/ITSBase/GeometryTGeo.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,14 @@ class GeometryTGeo : public o2::itsmft::GeometryTGeo
5353
static GeometryTGeo* Instance()
5454
{
5555
// get (create if needed) a unique instance of the object
56+
#ifdef GPUCA_STANDALONE
57+
return nullptr; // TODO: DR: Obviously wrong, but to make it compile for now
58+
#else
5659
if (!sInstance) {
5760
sInstance = std::unique_ptr<GeometryTGeo>(new GeometryTGeo(true, 0));
5861
}
5962
return sInstance.get();
63+
#endif
6064
}
6165

6266
// adopt the unique instance from external raw pointer (to be used only to read saved instance from file)
@@ -74,7 +78,7 @@ class GeometryTGeo : public o2::itsmft::GeometryTGeo
7478
);
7579

7680
/// Default destructor
77-
~GeometryTGeo() override = default;
81+
~GeometryTGeo() override;
7882

7983
GeometryTGeo(const GeometryTGeo& src) = delete;
8084
GeometryTGeo& operator=(const GeometryTGeo& geom) = delete;
@@ -345,7 +349,9 @@ class GeometryTGeo : public o2::itsmft::GeometryTGeo
345349
static std::string sWrapperVolumeName; ///< Wrapper volume name
346350

347351
private:
352+
#ifndef GPUCA_STANDALONE
348353
static std::unique_ptr<o2::its::GeometryTGeo> sInstance; ///< singletone instance
354+
#endif
349355

350356
ClassDefOverride(GeometryTGeo, 1); // ITS geometry based on TGeo
351357
};

Detectors/ITSMFT/ITS/base/src/GeometryTGeo.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ using Segmentation = o2::itsmft::SegmentationAlpide;
4949
ClassImp(o2::its::GeometryTGeo);
5050

5151
std::unique_ptr<o2::its::GeometryTGeo> GeometryTGeo::sInstance;
52+
o2::its::GeometryTGeo::~GeometryTGeo() = default;
5253

5354
std::string GeometryTGeo::sVolumeName = "ITSV"; ///< Mother volume name
5455
std::string GeometryTGeo::sLayerName = "ITSULayer"; ///< Layer name

0 commit comments

Comments
 (0)