Main Page
Namespaces
Classes
Package Documentation
L1Trigger
GlobalMuonTrigger
src
L1MuGMTLUTHelpers.cc
Go to the documentation of this file.
1
//-------------------------------------------------
2
//
3
// Class: L1MuGMTLUTHelpers
8
//
9
//
10
// Author :
11
// H. Sakulin HEPHY Vienna
12
//
13
// Migrated to CMSSW:
14
// I. Mikulec
15
//
16
//--------------------------------------------------
17
18
#include "
L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUTHelpers.h
"
19
//---------------
20
// C++ Headers --
21
//---------------
22
#include <ctype.h>
23
24
using namespace
std
;
25
26
//--------------------------------------------------------------------------------
27
// Replace substring in string
28
29
int
L1MuGMTLUTHelpers::replace
(
string
&
input
,
const
string
& gone,
const
string
& it,
bool
multiple) {
30
int
n
=0;
31
size_t
i
= input.find(gone,0);
32
while
(i!=string::npos) {
33
n++;
34
input.replace(i,gone.size(),it);
35
i = input.find(gone,i+(multiple ? 0 : it.size()));
36
}
37
return
n
;
38
}
mps_fire.i
i
Definition:
mps_fire.py:269
std
Definition:
JetResolutionObject.h:80
input
static std::string const input
Definition:
EdmProvDump.cc:44
L1MuGMTLUTHelpers.h
gen::n
int n
Definition:
Cascade2Hadronizer.cc:79
L1MuGMTLUTHelpers::replace
static int replace(std::string &input, const std::string &gone, const std::string &it, bool multiple)
Definition:
L1MuGMTLUTHelpers.cc:29
Generated for CMSSW Reference Manual by
1.8.11