Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
// the following code originates from HLTrigger/HLTcore/interface/defaultModuleLabel.h
11
// if the label is all uppercase, change it to all lowercase
12
// if the label starts with more than one uppercase letter, change n-1 to lowercase
13
// otherwise, change the first letter to lowercase
14
unsigned
int
ups = 0;
15
for
(
char
c
: label)
16
if
(std::isupper(
c
))
17
++ups;
18
else
19
break
;
20
if
(ups > 1 and ups != label.size())
21
--ups;
22
for
(
unsigned
int
i
= 0;
i
< ups; ++
i
)
23
label[
i
] = std::tolower(label[
i
]);
24
25
return
label
;
26
}
27
}
// namespace edm
c
const edm::EventSetup & c
Definition:
SiStripLAProfileBooker.cc:66
mps_fire.i
i
Definition:
mps_fire.py:428
MatrixUtil.remove
def remove
Definition:
MatrixUtil.py:223
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
Generated for CMSSW Reference Manual by
1.8.5