FWCore
ParameterSet
src
defaultModuleLabel.cc
Go to the documentation of this file.
1
#include "
FWCore/ParameterSet/interface/defaultModuleLabel.h
"
2
3
#include <algorithm>
4
5
namespace
edm
{
6
std::string
defaultModuleLabel
(
std::string
label
) {
7
// remove all colons (module type may contain namespace)
8
label
.erase(
std::remove
(
label
.begin(),
label
.end(),
':'
),
label
.end());
9
10
// remove everything after first '@' (used for module alternatives)
11
label
.erase(
std::find
(
label
.begin(),
label
.end(),
'@'
),
label
.end());
12
13
// the following code originates from HLTrigger/HLTcore/interface/defaultModuleLabel.h
14
// if the label is all uppercase, change it to all lowercase
15
// if the label starts with more than one uppercase letter, change n-1 to lowercase
16
// otherwise, change the first letter to lowercase
17
unsigned
int
ups = 0;
18
for
(
char
c
:
label
)
19
if
(std::isupper(
c
))
20
++ups;
21
else
22
break
;
23
if
(ups > 1 and ups !=
label
.size())
24
--ups;
25
for
(
unsigned
int
i
= 0;
i
< ups; ++
i
)
26
label
[
i
] = std::tolower(
label
[
i
]);
27
28
return
label
;
29
}
30
}
// namespace edm
mps_fire.i
i
Definition:
mps_fire.py:429
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition:
FindCaloHit.cc:19
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
defaultModuleLabel.h
label
char const * label
Definition:
PFTauDecayModeTools.cc:11
edm::defaultModuleLabel
std::string defaultModuleLabel(std::string label)
Definition:
defaultModuleLabel.cc:6
MatrixUtil.remove
def remove(d, key, TELL=False)
Definition:
MatrixUtil.py:223
edm
HLT enums.
Definition:
AlignableModifier.h:19
Generated for CMSSW Reference Manual by
1.8.14