CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types
L1MuGMTLUT::PortDecoder Class Reference

#include <L1MuGMTLUT.h>

Inheritance diagram for L1MuGMTLUT::PortDecoder:

Public Member Functions

 PortDecoder (const std::string &input)
 
 PortDecoder (const std::vector< port > &pt)
 
std::string str ()
 

Private Types

typedef std::vector< portbase
 

Detailed Description

Definition at line 172 of file L1MuGMTLUT.h.

Member Typedef Documentation

◆ base

typedef std::vector<port> L1MuGMTLUT::PortDecoder::base
private

Definition at line 173 of file L1MuGMTLUT.h.

Constructor & Destructor Documentation

◆ PortDecoder() [1/2]

L1MuGMTLUT::PortDecoder::PortDecoder ( const std::vector< port > &  pt)
inline

Definition at line 176 of file L1MuGMTLUT.h.

176 : base(pt){};

◆ PortDecoder() [2/2]

L1MuGMTLUT::PortDecoder::PortDecoder ( const std::string &  input)
inline

Definition at line 178 of file L1MuGMTLUT.h.

178  {
179  // decode std::string of style "phi(2) eta(4)"
181  for (unsigned int i = 0; i < tok.size(); i++) {
182  size_type obrace = tok[i].find("("), cbrace = tok[i].find(")");
183  if (obrace != std::string::npos && cbrace != std::string::npos)
184  push_back(
185  port(tok[i].substr(0, obrace), (unsigned)atoi(tok[i].substr(obrace + 1, cbrace - obrace - 1).c_str())));
186  else
187  edm::LogWarning("LUTMismatch") << "L1MuGMTLUT::PortDecoder: error decoding port " << tok[i];
188  }
189  };

References mps_fire::i, and input.

Member Function Documentation

◆ str()

std::string L1MuGMTLUT::PortDecoder::str ( )
inline

Definition at line 190 of file L1MuGMTLUT.h.

190  {
192  for (unsigned int i = 0; i < size(); i++) {
193  // ostd::stringstream os; os << (*this)[i].second << ends;
194  // temp += (*this)[i].first + "(" + std::string( os.str() ) + ")";
195 
196  char buf[100];
197  sprintf(buf, "(%d)", (*this)[i].second);
198  temp += (*this)[i].first + std::string(buf);
199 
200  if (i != size() - 1)
201  temp += " ";
202  }
203  return temp;
204  };

References visDQMUpload::buf, mps_fire::i, edm::second(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by L1MuGMTLUT::Save().

mps_fire.i
i
Definition: mps_fire.py:355
input
static const std::string input
Definition: EdmProvDump.cc:48
L1MuGMTLUT::PortDecoder::base
std::vector< port > base
Definition: L1MuGMTLUT.h:173
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
L1MuGMTLUTHelpers::Tokenizer
Lookup Functions.
Definition: L1MuGMTLUTHelpers.h:47
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
L1MuGMTLUT::port
std::pair< std::string, unsigned > port
Definition: L1MuGMTLUT.h:75
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443