1 #include "xercesc/sax2/SAX2XMLReader.hpp" 2 #include <xercesc/sax2/XMLReaderFactory.hpp> 3 #include "xercesc/sax2/DefaultHandler.hpp" 4 #include "xercesc/sax2/Attributes.hpp" 6 #include <xercesc/framework/MemBufInputSource.hpp> 13 std::unique_ptr<SAX2XMLReader>
parser;
49 std::vector<std::string>&
items,
54 xc_Data = XMLString::transcode(
"Data");
55 xc_name = XMLString::transcode(
"name");
56 xc_type = XMLString::transcode(
"type");
71 const XMLCh*
const localname,
72 const XMLCh*
const qname,
73 const Attributes& attrs)
override;
74 void endElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname)
override;
75 void characters(
const XMLCh*
const chars,
const XMLSize_t length)
override;
82 char* tool = XMLString::transcode(
val);
98 const XMLCh*
const localname,
99 const XMLCh*
const qname,
100 const Attributes& attrs) {
103 if (!XMLString::compareIString(localname,
xc_Parameter)) {
113 }
else if (!XMLString::compareIString(localname,
xc_Data)) {
128 const XMLCh*
const localname,
129 const XMLCh*
const qname) {
138 for (std::string::iterator
q =
m_text.begin();
q !=
m_text.end();
q++) {
162 for (
i = 0;
i < length -
offset &&
i < 255;
i++)
172 std::map<std::string, std::string>&
parameters,
173 std::vector<std::string>&
items,
181 m_parser->
parser = std::unique_ptr<xercesc::SAX2XMLReader>(xercesc::XMLReaderFactory::createXMLReader());
184 MemBufInputSource
src((
const unsigned char*)xmlDocument.c_str(), xmlDocument.length(),
"hcal::PatternReader");
193 std::map<std::string, std::string>&
parameters,
194 std::vector<uint32_t>&
data) {
195 std::vector<std::string>
items;
200 if (encoding ==
"dec")
202 if (encoding ==
"hex")
206 for (std::vector<std::string>::const_iterator
i =
items.begin();
i !=
items.end();
i++)
207 data.push_back(strtol(
i->c_str(),
nullptr, formatting));
void parse(const std::string &xmlDocument, std::map< std::string, std::string > ¶meters, std::vector< std::string > &items, std::string &encoding)
bool cvt2String(const XMLCh *val, std::string &ou)
std::vector< std::string > & m_items
void characters(const XMLCh *const chars, const XMLSize_t length) override
std::string & m_dataEncoding
std::unique_ptr< SAX2XMLReader > parser
ROOT::VecOps::RVec< UChar_t > chars
ConfigurationDBHandler(std::map< std::string, std::string > ¶meters, std::vector< std::string > &items, std::string &encoding)
void ignorableWhitespace(const XMLCh *const chars, const XMLSize_t length) override
std::list< ConfigurationDatabaseStandardXMLParser::Item > & m_items
std::map< std::string, std::string > & m_parameters
void startElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs) override
char data[epos_bytes_allocation]
enum ConfigurationDBHandler::@71 m_mode
HcalPatternXMLParserImpl * m_parser
void endElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) override
~ConfigurationDBHandler() override