Skip to content

Commit

Permalink
Merge pull request #36 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_LS…
Browse files Browse the repository at this point in the history
…TCore_realfiles_runStandaloneWithinCMSSW

Changes to make standalone run also from within a CMSSW area
  • Loading branch information
slava77 authored Jun 14, 2024
2 parents 8148d66 + 3b0dbda commit 6c466f1
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 214 deletions.
27 changes: 13 additions & 14 deletions RecoTracker/LSTCore/src/alpaka/LSTESData.dev.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,24 @@

namespace {
std::string trackLooperDir() {
const char* path_lst_base = std::getenv("LST_BASE");
std::string path_str, path;
const char* path_tracklooperdir = std::getenv("TRACKLOOPERDIR");
std::string path_str;
if (path_lst_base != nullptr) {
path_str = path_lst_base;
} else if (path_tracklooperdir != nullptr) {
std::stringstream search_path(std::getenv("CMSSW_SEARCH_PATH"));

while (std::getline(search_path, path, ':')) {
if (std::filesystem::exists(path + "/RecoTracker/LSTCore/data")) {
path_str = path;
break;
}
}

if (path_str.empty()) {
path_str = path_tracklooperdir;
path_str += "/../";
path_str += "/..";
} else {
std::stringstream search_path(std::getenv("CMSSW_SEARCH_PATH"));
std::string path;
while (std::getline(search_path, path, ':')) {
if (std::filesystem::exists(path + "/RecoTracker/LSTCore/data")) {
path_str = path;
break;
}
}
path_str += "/RecoTracker/LSTCore";
}

return path_str;
}

Expand Down
Loading

0 comments on commit 6c466f1

Please sign in to comment.