@@ -32,22 +32,22 @@ bool NameConf::pathIsDirectory(const std::string_view p)
3232std::string NameConf::getGeomFileName (const std::string_view prefix)
3333{
3434 // check if the prefix is an existing path
35- const bool prefixispath = pathIsDirectory (prefix);
36- if (prefixispath) {
35+ if (pathIsDirectory (prefix)) {
3736 return o2::utils::concat_string (prefix, " /" , STANDARDSIMPREFIX, " _" , GEOM_FILE_STRING, " .root" );
38- } else {
39- return o2::utils::concat_string (prefix. empty () ? STANDARDSIMPREFIX : prefix, " _ " , GEOM_FILE_STRING, " .root " );
37+ } else if ( pathExists (prefix)) {
38+ return std::string (prefix); // it is a full file
4039 }
40+ return o2::utils::concat_string (prefix.empty () ? STANDARDSIMPREFIX : prefix, " _" , GEOM_FILE_STRING, " .root" );
4141}
4242
4343// Filename to store geometry file
4444std::string NameConf::getDictionaryFileName (DId det, const std::string_view prefix, const std::string_view ext)
4545{
4646 // check if the prefix is an existing path
47- const bool prefixispath = pathIsDirectory (prefix);
48- if (prefixispath) {
47+ if (pathIsDirectory (prefix)) {
4948 return o2::utils::concat_string (prefix, " /" , det.getName (), DICTFILENAME, ext);
50- } else {
51- return o2::utils::concat_string (prefix, det. getName (), DICTFILENAME, ext);
49+ } else if ( pathExists (prefix)) {
50+ return std::string (prefix); // it is a full file
5251 }
52+ return o2::utils::concat_string (prefix, det.getName (), DICTFILENAME, ext);
5353}
0 commit comments