#include <CondCore/Utilities/interface/CSVFieldMap.h>
Public Member Functions | |
CSVFieldMap () | |
std::string | fieldName (int idx) const |
const std::type_info & | fieldType (int idx) const |
std::string | fieldTypeName (int idx) const |
void | push_back (const std::string &fieldName, const std::string &fieldType) |
int | size () const |
~CSVFieldMap () | |
Private Attributes | |
std::vector< std::pair < std::string, std::string > > | m_fieldMap |
Definition at line 7 of file CSVFieldMap.h.
CSVFieldMap::CSVFieldMap | ( | ) | [inline] |
CSVFieldMap::~CSVFieldMap | ( | ) | [inline] |
std::string CSVFieldMap::fieldName | ( | int | idx | ) | const |
Definition at line 6 of file CSVFieldMap.cc.
References m_fieldMap.
Referenced by OptAlignDataConverter::endJob().
00006 { 00007 return m_fieldMap[idx].first; 00008 }
const std::type_info & CSVFieldMap::fieldType | ( | int | idx | ) | const |
Definition at line 9 of file CSVFieldMap.cc.
References Exception, int, m_fieldMap, and edm::second().
Referenced by OptAlignDataConverter::endJob().
00009 { 00010 if(m_fieldMap[idx].second=="CHAR"){ 00011 return typeid(std::string); 00012 } 00013 if(m_fieldMap[idx].second=="INT"){ 00014 return typeid(int); 00015 } 00016 if(m_fieldMap[idx].second=="UINT"){ 00017 return typeid(unsigned int); 00018 } 00019 if(m_fieldMap[idx].second=="FLOAT"){ 00020 return typeid(float); 00021 } 00022 if(m_fieldMap[idx].second=="DOUBLE"){ 00023 return typeid(double); 00024 } 00025 throw cond::Exception(std::string("unrecognised CSV type: ")+m_fieldMap[idx].second); 00026 }
std::string CSVFieldMap::fieldTypeName | ( | int | idx | ) | const |
Definition at line 27 of file CSVFieldMap.cc.
References m_fieldMap.
00027 { 00028 return m_fieldMap[idx].second; 00029 }
void CSVFieldMap::push_back | ( | const std::string & | fieldName, | |
const std::string & | fieldType | |||
) |
Definition at line 3 of file CSVFieldMap.cc.
References m_fieldMap.
Referenced by OptAlignDataConverter::endJob().
00003 { 00004 m_fieldMap.push_back(std::make_pair(fieldName, fieldType)); 00005 }
Definition at line 30 of file CSVFieldMap.cc.
References m_fieldMap.
00030 { 00031 return m_fieldMap.size(); 00032 }
std::vector< std::pair<std::string, std::string > > CSVFieldMap::m_fieldMap [private] |
Definition at line 17 of file CSVFieldMap.h.
Referenced by fieldName(), fieldType(), fieldTypeName(), push_back(), and size().