src
FWCore
Utilities
src
stemFromPath.cc
Go to the documentation of this file.
1
#include "
FWCore/Utilities/interface/stemFromPath.h
"
2
3
namespace
edm
{
4
std::string_view
stemFromPath
(std::string_view
path
) {
5
auto
begin =
path
.rfind(
'/'
);
6
if
(begin == std::string_view::npos) {
7
begin =
path
.rfind(
':'
);
8
if
(begin == std::string_view::npos) {
9
// shouldn't really happen?
10
begin = 0;
11
}
else
{
12
begin += 1;
13
}
14
}
else
{
15
begin += 1;
16
}
17
auto
end
=
path
.find(
'.'
, begin);
18
return
path
.substr(begin,
end
- begin);
19
}
20
}
// namespace edm
castor_dqm_sourceclient_file_cfg.path
path
Definition:
castor_dqm_sourceclient_file_cfg.py:37
edm::stemFromPath
std::string_view stemFromPath(std::string_view path)
Definition:
stemFromPath.cc:4
mps_fire.end
end
Definition:
mps_fire.py:242
edm
HLT enums.
Definition:
AlignableModifier.h:19
stemFromPath.h
Generated for CMSSW Reference Manual by
1.8.14