File tree Expand file tree Collapse file tree 4 files changed +151
-214
lines changed
Expand file tree Collapse file tree 4 files changed +151
-214
lines changed Original file line number Diff line number Diff line change 1212
1313namespace {
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
You can’t perform that action at this time.
0 commit comments