Skip to content

Commit f40968c

Browse files
committed
CommonUtils: Don't use ROOT TGrid if we build standalone benchmark
1 parent 6f78cf3 commit f40968c

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

Common/Utils/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ o2_add_library(CommonUtils
2626
src/DebugStreamer.cxx
2727
src/DLLoaderBase.cxx
2828
PUBLIC_LINK_LIBRARIES ROOT::Hist ROOT::Tree Boost::iostreams O2::CommonDataFormat O2::Headers
29-
FairLogger::FairLogger O2::MathUtils TBB::tbb)
29+
FairLogger::FairLogger O2::MathUtils TBB::tbb O2::GPUCommon)
3030

3131
o2_target_root_dictionary(CommonUtils
3232
HEADERS include/CommonUtils/TreeStream.h

Common/Utils/include/CommonUtils/StringUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <vector>
2222
#include <algorithm>
2323
#include <fmt/format.h>
24-
#include <Rtypes.h>
24+
#include "GPUCommonRtypes.h"
2525

2626
namespace o2
2727
{

Common/Utils/src/StringUtils.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
#include "CommonUtils/StringUtils.h"
1313
#include <cstdlib>
1414
#include <filesystem>
15+
#ifndef GPUCA_STANDALONE
1516
#include <TGrid.h>
17+
#endif
1618
#include <unistd.h>
1719

1820
using namespace o2::utils;
@@ -84,13 +86,15 @@ std::string Str::rectifyDirectory(const std::string_view p)
8486
dir = "";
8587
} else {
8688
if (p.compare(0, 8, "alien://") == 0) {
89+
#ifndef GPUCA_STANDALONE
8790
if (!gGrid && !TGrid::Connect("alien://")) {
8891
throw std::runtime_error(fmt::format("failed to initialize alien for {}", dir));
8992
}
9093
// for root or raw files do not treat as directory
9194
if (dir.back() != '/' && !(endsWith(dir, ".root") || endsWith(dir, ".raw") || endsWith(dir, ".tf"))) {
9295
dir += '/';
9396
}
97+
#endif
9498
} else {
9599
dir = getFullPath(dir);
96100
if (!pathIsDirectory(dir)) {

GPU/GPUTracking/DataTypes/CalibdEdxTrackTopologyPol.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// or submit itself to any jurisdiction.
1111

1212
#ifndef GPUCA_NO_VC
13-
#include "Rtypes.h"
13+
#include "GPUCommonRtypes.h"
1414
#endif
1515
#include "CalibdEdxTrackTopologyPol.h"
1616

0 commit comments

Comments
 (0)