Public Member Functions | |
virtual void | characters (const XMLCh *const chars, const unsigned int length) |
virtual void | characters (const XMLCh *const chars, const unsigned int length) |
ConfigurationDBHandler (std::list< ConfigurationDatabaseStandardXMLParser::Item > &items) | |
ConfigurationDBHandler (std::map< std::string, std::string > ¶meters, std::vector< std::string > &items, std::string &encoding) | |
virtual void | endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) |
virtual void | endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) |
virtual void | ignorableWhitespace (const XMLCh *chars, const unsigned int length) |
virtual void | ignorableWhitespace (const XMLCh *chars, const unsigned int length) |
virtual void | startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs) |
virtual void | startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs) |
virtual | ~ConfigurationDBHandler () |
virtual | ~ConfigurationDBHandler () |
Private Types | |
enum | { md_Idle, md_Parameter, md_Data } |
enum | { md_Idle, md_Parameter, md_Data } |
Private Member Functions | |
bool | cvt2String (const XMLCh *val, std::string &ou) |
bool | cvt2String (const XMLCh *val, std::string &ou) |
bool | isItemElement (const XMLCh *const localname) |
Private Attributes | |
std::string & | m_dataEncoding |
std::list < ConfigurationDatabaseStandardXMLParser::Item > & | m_items |
std::vector< std::string > & | m_items |
enum ConfigurationDBHandler:: { ... } | m_mode |
enum ConfigurationDBHandler:: { ... } | m_mode |
std::map< std::string, std::string > & | m_parameters |
std::string | m_pname |
std::string | m_ptype |
std::string | m_text |
char | m_workc [512] |
ConfigurationDatabaseStandardXMLParser::Item | m_workitem |
XMLCh | m_workx [256] |
int | n_elements |
XMLCh * | xc_Data |
XMLCh * | xc_elements |
XMLCh * | xc_encoding |
XMLCh * | xc_header [ITEMELEMENTNAMES] |
XMLCh * | xc_name |
XMLCh * | xc_Parameter |
XMLCh * | xc_type |
Static Private Attributes | |
static const int | ITEMELEMENTNAMES = 3 |
Definition at line 38 of file ConfigurationDatabaseStandardXMLParser.cc.
anonymous enum [private] |
Definition at line 46 of file HcalPatternXMLParser.cc.
{ md_Idle, md_Parameter, md_Data } m_mode;
anonymous enum [private] |
Definition at line 39 of file ConfigurationDatabaseStandardXMLParser.cc.
{ md_Idle, md_Parameter, md_Data } m_mode;
ConfigurationDBHandler::ConfigurationDBHandler | ( | std::list< ConfigurationDatabaseStandardXMLParser::Item > & | items | ) | [inline] |
Definition at line 41 of file ConfigurationDatabaseStandardXMLParser.cc.
References m_items, m_mode, md_Idle, xc_Data, xc_elements, xc_encoding, xc_header, xc_name, xc_Parameter, and xc_type.
: m_items(items) { m_mode=md_Idle; xc_Parameter=XMLString::transcode("Parameter"); xc_Data=XMLString::transcode("Data"); xc_name=XMLString::transcode("name"); xc_type=XMLString::transcode("type"); xc_elements=XMLString::transcode("elements"); xc_encoding=XMLString::transcode("encoding"); xc_header[0]=XMLString::transcode("CFGBrick"); xc_header[1]=XMLString::transcode("LUT"); xc_header[2]=XMLString::transcode("Pattern"); m_items.clear(); }
virtual ConfigurationDBHandler::~ConfigurationDBHandler | ( | ) | [inline, virtual] |
Definition at line 54 of file ConfigurationDatabaseStandardXMLParser.cc.
References i, ITEMELEMENTNAMES, cmsPerfSuiteHarvest::release, xc_Data, xc_elements, xc_encoding, xc_header, xc_name, xc_Parameter, and xc_type.
{ XMLString::release(&xc_Parameter); XMLString::release(&xc_Data); XMLString::release(&xc_name); XMLString::release(&xc_type); XMLString::release(&xc_elements); XMLString::release(&xc_encoding); for (int i=0; i<ITEMELEMENTNAMES; i++) XMLString::release(&xc_header[i]); }
ConfigurationDBHandler::ConfigurationDBHandler | ( | std::map< std::string, std::string > & | parameters, |
std::vector< std::string > & | items, | ||
std::string & | encoding | ||
) | [inline] |
Definition at line 48 of file HcalPatternXMLParser.cc.
References m_items, m_mode, m_parameters, md_Idle, xc_Data, xc_elements, xc_encoding, xc_name, xc_Parameter, and xc_type.
: m_dataEncoding(encoding), m_items(items), m_parameters(parameters) { m_mode=md_Idle; xc_Parameter=XMLString::transcode("Parameter"); xc_Data=XMLString::transcode("Data"); xc_name=XMLString::transcode("name"); xc_type=XMLString::transcode("type"); xc_elements=XMLString::transcode("elements"); xc_encoding=XMLString::transcode("encoding"); m_items.clear(); m_parameters.clear(); }
virtual ConfigurationDBHandler::~ConfigurationDBHandler | ( | ) | [inline, virtual] |
Definition at line 59 of file HcalPatternXMLParser.cc.
References cmsPerfSuiteHarvest::release, xc_Data, xc_elements, xc_encoding, xc_name, xc_Parameter, and xc_type.
void ConfigurationDBHandler::characters | ( | const XMLCh *const | chars, |
const unsigned int | length | ||
) | [virtual] |
Definition at line 162 of file ConfigurationDatabaseStandardXMLParser.cc.
References i, m_mode, m_text, m_workc, m_workx, md_Idle, and evf::evtn::offset().
virtual void ConfigurationDBHandler::characters | ( | const XMLCh *const | chars, |
const unsigned int | length | ||
) | [virtual] |
bool ConfigurationDBHandler::cvt2String | ( | const XMLCh * | val, |
std::string & | ou | ||
) | [inline, private] |
Definition at line 69 of file ConfigurationDatabaseStandardXMLParser.cc.
References cmsPerfSuiteHarvest::release.
Referenced by startElement().
{ if (val==0) return false; char* tool=XMLString::transcode(val); ou=tool; XMLString::release(&tool); return true; }
bool ConfigurationDBHandler::cvt2String | ( | const XMLCh * | val, |
std::string & | ou | ||
) | [inline, private] |
Definition at line 72 of file HcalPatternXMLParser.cc.
References cmsPerfSuiteHarvest::release.
{ if (val==0) return false; char* tool=XMLString::transcode(val); ou=tool; XMLString::release(&tool); return true; }
virtual void ConfigurationDBHandler::endElement | ( | const XMLCh *const | uri, |
const XMLCh *const | localname, | ||
const XMLCh *const | qname | ||
) | [virtual] |
void ConfigurationDBHandler::endElement | ( | const XMLCh *const | uri, |
const XMLCh *const | localname, | ||
const XMLCh *const | qname | ||
) | [virtual] |
Definition at line 136 of file ConfigurationDatabaseStandardXMLParser.cc.
References isItemElement(), m_items, m_mode, m_pname, m_text, m_workitem, md_Data, md_Idle, md_Parameter, and lumiQueryAPI::q.
{ if (m_mode==md_Idle) return; if (isItemElement(localname)) { } else if (m_mode==md_Parameter) { m_workitem.parameters[m_pname]=m_text; // ignore the type for now... } else if (m_mode==md_Data) { // parse the text std::string entry; for (std::string::iterator q=m_text.begin(); q!=m_text.end(); q++) { if (isspace(*q)) { if (entry.empty()) continue; m_workitem.items.push_back(entry); entry=""; } else entry+=*q; } if (!entry.empty()) m_workitem.items.push_back(entry); m_items.push_back(m_workitem); // save it } m_mode=md_Idle; }
void ConfigurationDBHandler::ignorableWhitespace | ( | const XMLCh * | chars, |
const unsigned int | length | ||
) | [virtual] |
virtual void ConfigurationDBHandler::ignorableWhitespace | ( | const XMLCh * | chars, |
const unsigned int | length | ||
) | [virtual] |
bool ConfigurationDBHandler::isItemElement | ( | const XMLCh *const | localname | ) | [inline, private] |
Definition at line 88 of file ConfigurationDatabaseStandardXMLParser.cc.
References i, ITEMELEMENTNAMES, and xc_header.
Referenced by endElement(), and startElement().
void ConfigurationDBHandler::startElement | ( | const XMLCh *const | uri, |
const XMLCh *const | localname, | ||
const XMLCh *const | qname, | ||
const Attributes & | attrs | ||
) | [virtual] |
Definition at line 95 of file ConfigurationDatabaseStandardXMLParser.cc.
References cvt2String(), isItemElement(), findQualityFiles::jj, m_mode, m_pname, m_ptype, m_text, m_workitem, md_Data, md_Idle, md_Parameter, n_elements, xc_Data, xc_elements, xc_encoding, xc_name, xc_Parameter, and xc_type.
{ if (m_mode!=md_Idle) return; std::string work; cvt2String(localname,work); if (isItemElement(localname)) { m_workitem.parameters.clear(); m_workitem.items.clear(); m_workitem.encoding.clear(); } else if (!XMLString::compareIString(localname,xc_Parameter)) { // parameter name if (!cvt2String(attrs.getValue(xc_name),m_pname)) return; // parameter type if (!cvt2String(attrs.getValue(xc_type),m_ptype)) return; // switch mode m_mode=md_Parameter; m_text=""; } else if (!XMLString::compareIString(localname,xc_Data)) { m_workitem.items.clear(); // elements std::string strElements; if (!cvt2String(attrs.getValue(xc_elements),strElements)) return; n_elements=atoi(strElements.c_str()); // encoding m_workitem.encoding=""; cvt2String(attrs.getValue(xc_encoding),m_workitem.encoding); // switch mode m_mode=md_Data; m_text=""; // other attributes for (unsigned int jj=0; jj<attrs.getLength(); jj++) { if (!XMLString::compareIString(xc_elements,attrs.getValue(jj)) || !XMLString::compareIString(xc_encoding,attrs.getValue(jj))) continue; // already handled these two std::string atkey,atvalue; cvt2String(attrs.getLocalName(jj),atkey); cvt2String(attrs.getValue(jj),atvalue); m_workitem.parameters[atkey]=atvalue; } } }
virtual void ConfigurationDBHandler::startElement | ( | const XMLCh *const | uri, |
const XMLCh *const | localname, | ||
const XMLCh *const | qname, | ||
const Attributes & | attrs | ||
) | [virtual] |
const int ConfigurationDBHandler::ITEMELEMENTNAMES = 3 [static, private] |
Definition at line 77 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by isItemElement(), and ~ConfigurationDBHandler().
std::string& ConfigurationDBHandler::m_dataEncoding [private] |
Definition at line 82 of file HcalPatternXMLParser.cc.
std::vector<std::string>& ConfigurationDBHandler::m_items [private] |
Definition at line 83 of file HcalPatternXMLParser.cc.
std::list<ConfigurationDatabaseStandardXMLParser::Item>& ConfigurationDBHandler::m_items [private] |
Definition at line 82 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by ConfigurationDBHandler(), and endElement().
enum { ... } ConfigurationDBHandler::m_mode [private] |
Referenced by characters(), ConfigurationDBHandler(), endElement(), ignorableWhitespace(), and startElement().
enum { ... } ConfigurationDBHandler::m_mode [private] |
std::map<std::string,std::string>& ConfigurationDBHandler::m_parameters [private] |
Definition at line 84 of file HcalPatternXMLParser.cc.
Referenced by ConfigurationDBHandler().
std::string ConfigurationDBHandler::m_pname [private] |
Definition at line 79 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by endElement(), and startElement().
std::string ConfigurationDBHandler::m_ptype [private] |
Definition at line 79 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by startElement().
std::string ConfigurationDBHandler::m_text [private] |
Definition at line 79 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by characters(), endElement(), ignorableWhitespace(), and startElement().
char ConfigurationDBHandler::m_workc [private] |
Definition at line 86 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by characters().
ConfigurationDatabaseStandardXMLParser::Item ConfigurationDBHandler::m_workitem [private] |
Definition at line 81 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by endElement(), and startElement().
XMLCh ConfigurationDBHandler::m_workx [private] |
Definition at line 87 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by characters().
int ConfigurationDBHandler::n_elements [private] |
Definition at line 80 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by startElement().
XMLCh * ConfigurationDBHandler::xc_Data [private] |
Definition at line 76 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by ConfigurationDBHandler(), startElement(), and ~ConfigurationDBHandler().
XMLCh * ConfigurationDBHandler::xc_elements [private] |
Definition at line 76 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by ConfigurationDBHandler(), startElement(), and ~ConfigurationDBHandler().
XMLCh * ConfigurationDBHandler::xc_encoding [private] |
Definition at line 76 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by ConfigurationDBHandler(), startElement(), and ~ConfigurationDBHandler().
XMLCh* ConfigurationDBHandler::xc_header[ITEMELEMENTNAMES] [private] |
Definition at line 78 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by ConfigurationDBHandler(), isItemElement(), and ~ConfigurationDBHandler().
XMLCh * ConfigurationDBHandler::xc_name [private] |
Definition at line 76 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by ConfigurationDBHandler(), startElement(), and ~ConfigurationDBHandler().
XMLCh * ConfigurationDBHandler::xc_Parameter [private] |
Definition at line 76 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by ConfigurationDBHandler(), startElement(), and ~ConfigurationDBHandler().
XMLCh * ConfigurationDBHandler::xc_type [private] |
Definition at line 76 of file ConfigurationDatabaseStandardXMLParser.cc.
Referenced by ConfigurationDBHandler(), startElement(), and ~ConfigurationDBHandler().