#include <L1MuGMTLUT.h>
Public Member Functions | |
PortDecoder (const std::vector< port > &pt) | |
PortDecoder (const std::string &input) | |
std::string | str () |
Private Types | |
typedef std::vector< port > | base |
Definition at line 165 of file L1MuGMTLUT.h.
typedef std::vector<port> L1MuGMTLUT::PortDecoder::base [private] |
Definition at line 166 of file L1MuGMTLUT.h.
L1MuGMTLUT::PortDecoder::PortDecoder | ( | const std::vector< port > & | pt | ) | [inline] |
Definition at line 168 of file L1MuGMTLUT.h.
L1MuGMTLUT::PortDecoder::PortDecoder | ( | const std::string & | input | ) | [inline] |
Definition at line 170 of file L1MuGMTLUT.h.
References i.
{ // decode std::string of style "phi(2) eta(4)" L1MuGMTLUTHelpers::Tokenizer tok(" ", input); for (unsigned int i=0;i<tok.size(); i++) { size_type obrace=tok[i].find("("), cbrace=tok[i].find(")"); if (obrace != std::string::npos && cbrace != std::string::npos) push_back( port ( tok[i].substr(0,obrace), (unsigned) atoi (tok[i].substr(obrace+1,cbrace-obrace-1).c_str() ) ) ); else edm::LogWarning("LUTMismatch") << "L1MuGMTLUT::PortDecoder: error decoding port " << tok[i]; } };
std::string L1MuGMTLUT::PortDecoder::str | ( | ) | [inline] |
Definition at line 181 of file L1MuGMTLUT.h.
References i, edm::second(), findQualityFiles::size, and cond::rpcobtemp::temp.
Referenced by L1MuGMTLUT::Save().
{ std::string temp; for (unsigned int i=0; i<size();i++) { // ostd::stringstream os; os << (*this)[i].second << ends; // temp += (*this)[i].first + "(" + std::string( os.str() ) + ")"; char buf[100]; sprintf(buf,"(%d)",(*this)[i].second); temp += (*this)[i].first + std::string(buf); if (i!=size()-1) temp += " "; } return temp; };