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 165 of file L1MuGMTLUT.h.

Member Typedef Documentation

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

Definition at line 166 of file L1MuGMTLUT.h.

Constructor & Destructor Documentation

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

Definition at line 168 of file L1MuGMTLUT.h.

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

Definition at line 170 of file L1MuGMTLUT.h.

References i, and results_mgr::tok.

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

Member Function Documentation

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

Definition at line 181 of file L1MuGMTLUT.h.

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

Referenced by L1MuGMTLUT::Save().

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