#include <EcalADCToGeVXMLTranslator.h>
Definition at line 25 of file EcalADCToGeVXMLTranslator.h.
Definition at line 81 of file EcalADCToGeVXMLTranslator.cc.
References xuti::ADCToGeVConstant_tag(), xuti::Barrel_tag(), asciidump::doc, hcal_timing_source_file_cfg::dump, xuti::Endcap_tag(), xuti::fromNative(), EcalADCToGeVConstant::getEBValue(), EcalADCToGeVConstant::getEEValue(), dbtoconf::root, xuti::toNative(), xuti::writeHeader(), and xuti::WriteNodeWithValue().
Referenced by cond::PayLoadInspector< DataT >::dump().
84 XMLPlatformUtils::Initialize();
86 DOMImplementation* impl =
87 DOMImplementationRegistry::getDOMImplementation(
fromNative(
"LS").c_str());
89 DOMWriter* writer =
static_cast<DOMImplementationLS*
>(impl)->createDOMWriter( );
90 writer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint,
true);
92 DOMDocumentType* doctype = impl->createDocumentType(
fromNative(
"XML").c_str(), 0, 0 );
97 doc->setEncoding(
fromNative(
"UTF-8").c_str() );
98 doc->setStandalone(
true);
101 DOMElement*
root = doc->getDocumentElement();
108 std::string
dump=
toNative(writer->writeToString(*root));
void WriteNodeWithValue(xercesc::DOMNode *parentNode, const std::string &tag, const T &value)
write a node with
const std::string ADCToGeVConstant_tag("EcalADCToGeVConstant")
void writeHeader(xercesc::DOMNode *parentNode, const EcalCondHeader &header)
write
XercesString fromNative(const char *str)
const std::string Endcap_tag("EndcapValue")
const std::string Barrel_tag("BarrelValue")
std::string toNative(const XMLCh *str)
string root
initialization
Definition at line 23 of file EcalADCToGeVXMLTranslator.cc.
References xuti::Barrel_tag(), gather_cfg::cout, xuti::Endcap_tag(), xuti::getChildNode(), xuti::GetNodeData(), geometryXMLtoCSV::parser, xuti::readHeader(), EcalADCToGeVConstant::setEBValue(), and EcalADCToGeVConstant::setEEValue().
28 XMLPlatformUtils::Initialize();
30 XercesDOMParser*
parser =
new XercesDOMParser;
31 parser->setValidationScheme( XercesDOMParser::Val_Never );
32 parser->setDoNamespaces(
false );
33 parser->setDoSchema(
false );
37 DOMDocument* xmlDoc = parser->getDocument();
39 std::cout <<
"EcalADCToGeVXMLTranslator::Error parsing document" << std::endl;
44 DOMElement* elementRoot = xmlDoc->getDocumentElement();
63 XMLPlatformUtils::Terminate();
void setEEValue(const float &value)
void readHeader(xercesc::DOMNode *parentNode, EcalCondHeader &header)
read header from
void setEBValue(const float &value)
void GetNodeData(xercesc::DOMNode *node, T &value)
get the node data
xercesc::DOMNode * getChildNode(xercesc::DOMNode *node, const std::string &nodename)
get the child of
const std::string Endcap_tag("EndcapValue")
const std::string Barrel_tag("BarrelValue")