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::vector< port > &pt)
 
 PortDecoder (const std::string &input)
 
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.

◆ PortDecoder() [2/2]

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

Definition at line 178 of file L1MuGMTLUT.h.

References mps_fire::i, input, and push_back().

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  };
uint16_t size_type
static std::string const input
Definition: EdmProvDump.cc:47
std::pair< std::string, unsigned > port
Definition: L1MuGMTLUT.h:75
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
Log< level::Warning, false > LogWarning

Member Function Documentation

◆ str()

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

Definition at line 190 of file L1MuGMTLUT.h.

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

Referenced by L1MuGMTLUT::Save().

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  };
size
Write out results.
U second(std::pair< T, U > const &p)