Skip to content

Commit 6c466f1

Browse files
authored
Merge pull request #36 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_LSTCore_realfiles_runStandaloneWithinCMSSW
Changes to make standalone run also from within a CMSSW area
2 parents 8148d66 + 3b0dbda commit 6c466f1

File tree

4 files changed

+151
-214
lines changed

4 files changed

+151
-214
lines changed

RecoTracker/LSTCore/src/alpaka/LSTESData.dev.cc

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,24 @@
1212

1313
namespace {
1414
std::string trackLooperDir() {
15-
const char* path_lst_base = std::getenv("LST_BASE");
15+
std::string path_str, path;
1616
const char* path_tracklooperdir = std::getenv("TRACKLOOPERDIR");
17-
std::string path_str;
18-
if (path_lst_base != nullptr) {
19-
path_str = path_lst_base;
20-
} else if (path_tracklooperdir != nullptr) {
17+
std::stringstream search_path(std::getenv("CMSSW_SEARCH_PATH"));
18+
19+
while (std::getline(search_path, path, ':')) {
20+
if (std::filesystem::exists(path + "/RecoTracker/LSTCore/data")) {
21+
path_str = path;
22+
break;
23+
}
24+
}
25+
26+
if (path_str.empty()) {
2127
path_str = path_tracklooperdir;
22-
path_str += "/../";
28+
path_str += "/..";
2329
} else {
24-
std::stringstream search_path(std::getenv("CMSSW_SEARCH_PATH"));
25-
std::string path;
26-
while (std::getline(search_path, path, ':')) {
27-
if (std::filesystem::exists(path + "/RecoTracker/LSTCore/data")) {
28-
path_str = path;
29-
break;
30-
}
31-
}
3230
path_str += "/RecoTracker/LSTCore";
3331
}
32+
3433
return path_str;
3534
}
3635

0 commit comments

Comments
 (0)