CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions
L1MuGMTLUTHelpers Class Reference

#include <L1MuGMTLUTHelpers.h>

Classes

class  Tokenizer
 Lookup Functions. More...
 

Public Member Functions

 L1MuGMTLUTHelpers ()
 constructor More...
 
virtual ~L1MuGMTLUTHelpers ()
 destructor More...
 

Static Public Member Functions

static int replace (std::string &input, const std::string &gone, const std::string &it, bool multiple)
 

Detailed Description

Description: Helper Functions for std::string handling in L1MuGMTLUT (could be found in Cobra but classes should be independet of COBRA/ORCA)

Definition at line 35 of file L1MuGMTLUTHelpers.h.

Constructor & Destructor Documentation

◆ L1MuGMTLUTHelpers()

L1MuGMTLUTHelpers::L1MuGMTLUTHelpers ( )
inline

constructor

Definition at line 38 of file L1MuGMTLUTHelpers.h.

38 {};

◆ ~L1MuGMTLUTHelpers()

virtual L1MuGMTLUTHelpers::~L1MuGMTLUTHelpers ( )
inlinevirtual

destructor

Definition at line 41 of file L1MuGMTLUTHelpers.h.

41 {};

Member Function Documentation

◆ replace()

int L1MuGMTLUTHelpers::replace ( std::string &  input,
const std::string &  gone,
const std::string &  it,
bool  multiple 
)
static

Definition at line 29 of file L1MuGMTLUTHelpers.cc.

References mps_fire::i, input, and dqmiodumpmetadata::n.

Referenced by L1MuGMTLUT::Load(), and L1MuGMTLUT::MakeSubClass().

29  {
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 }
static std::string const input
Definition: EdmProvDump.cc:47