CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 163 of file L1MuGMTLUT.h.

Member Typedef Documentation

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

Definition at line 164 of file L1MuGMTLUT.h.

Constructor & Destructor Documentation

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

Definition at line 166 of file L1MuGMTLUT.h.

166 : base(pt) {};
std::vector< port > base
Definition: L1MuGMTLUT.h:164
L1MuGMTLUT::PortDecoder::PortDecoder ( const std::string &  input)
inline

Definition at line 168 of file L1MuGMTLUT.h.

References i, and results_mgr::tok.

168  {
169  // decode std::string of style "phi(2) eta(4)"
171  for (unsigned int i=0;i<tok.size(); i++) {
172  size_type obrace=tok[i].find("("), cbrace=tok[i].find(")");
173  if (obrace != std::string::npos && cbrace != std::string::npos)
174  push_back( port ( tok[i].substr(0,obrace), (unsigned) atoi (tok[i].substr(obrace+1,cbrace-obrace-1).c_str() ) ) );
175  else
176  edm::LogWarning("LUTMismatch") << "L1MuGMTLUT::PortDecoder: error decoding port " << tok[i];
177  }
178  };
int i
Definition: DBlmapReader.cc:9
uint16_t size_type
static std::string const input
Definition: EdmProvDump.cc:44
std::pair< std::string, unsigned > port
Definition: L1MuGMTLUT.h:78

Member Function Documentation

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

Definition at line 179 of file L1MuGMTLUT.h.

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

Referenced by L1MuGMTLUT::Save().

179  {
181  for (unsigned int i=0; i<size();i++) {
182  // ostd::stringstream os; os << (*this)[i].second << ends;
183  // temp += (*this)[i].first + "(" + std::string( os.str() ) + ")";
184 
185  char buf[100]; sprintf(buf,"(%d)",(*this)[i].second);
186  temp += (*this)[i].first + std::string(buf);
187 
188  if (i!=size()-1) temp += " ";
189  }
190  return temp;
191  };
int i
Definition: DBlmapReader.cc:9
U second(std::pair< T, U > const &p)
tuple size
Write out results.