#include <XMLDocument.h>
Classes | |
class | XercesPlatform |
Public Member Functions | |
template<class T > | |
void | addAttribute (DOMElement *fElement, const std::string &fName, const T &fValue) |
void | addData (DOMElement *fData, const HcalPedestal &fItem) |
void | addData (DOMElement *fData, const HcalPedestalWidth &fItem) |
void | addData (DOMElement *fData, const HcalGain &fItem) |
void | addData (DOMElement *fData, const HcalRawGain &fItem) |
void | addData (DOMElement *fData, const HcalGainWidth &fItem) |
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * | createDocument (const std::string &root) |
const DOMDocument * | document () |
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * | getDocument () const |
XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | getRootNode () const |
DOMElement * | makeChId (DOMElement *fDataset, DetId fId) |
DOMElement * | makeData (DOMElement *fDataset, const HcalPedestal &fPed, const HcalPedestalWidth &fWidth) |
DOMElement * | makeData (DOMElement *fDataset) |
DOMElement * | makeDataset (DOMElement *fRoot, const std::string &fVersion) |
DOMElement * | makeElement (DOMElement *fRoot) |
DOMElement * | makeElementDataset (DOMElement *fElement, int fXMLId, DetId fDetId, const std::string &fVersion, const std::string &fKind, unsigned long fRun) |
DOMElement * | makeElementIOV (DOMElement *fElement, unsigned long long fIovBegin, unsigned long long fIovEnd=0) |
DOMElement * | makeElementTag (DOMElement *fElement, const std::string &fTagName, const std::string &fDetectorName, const std::string &fComment="Automatically created by HcalDbXml") |
DOMElement * | makeHeader (DOMElement *fRoot, const std::string &fExtensionName, unsigned long fRun) |
DOMElement * | makeMapDataset (DOMElement *fIov, int fXMLId) |
DOMElement * | makeMapIOV (DOMElement *fTag) |
DOMElement * | makeMaps (DOMElement *fRoot) |
DOMElement * | makeMapTag (DOMElement *fMap) |
DOMElement * | makeRun (DOMElement *fHeader, unsigned long fRun) |
DOMElement * | makeType (DOMElement *fHeader, const std::string &fExtensionName) |
template<class T > | |
DOMElement * | newElement (DOMElement *fParent, const T &fName) |
template<class T > | |
DOMElement * | newValue (DOMElement *fParent, const std::string &fName, const T &fValue) |
template<> | |
bool | readAttribute (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *elem, const char *name) |
template<> | |
bool | readAttribute (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *elem, const char *name, const bool &defValue) |
template<> | |
bool | readContent (XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *node) |
DOMElement * | root () |
void | streamOut (std::ostream &fOut) |
template<> | |
void | writeAttribute (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *elem, const char *name, const bool &value) |
template<> | |
void | writeContent (XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *node, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, const bool &value) |
XMLDocument (const std::string &fileName, bool write=false) | |
XMLDocument (const std::string &fileName, const std::string &command) | |
XMLDocument () | |
~XMLDocument () | |
Static Public Member Functions | |
static bool | hasAttribute (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *elem, const char *name) |
template<typename T > | |
static T | readAttribute (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *elem, const char *name) |
template<typename T > | |
static T | readAttribute (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *elem, const char *name, const T &defValue) |
template<typename T > | |
static T | readContent (XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *node) |
template<typename T > | |
static void | writeAttribute (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *elem, const char *name, const T &value) |
template<typename T > | |
static void | writeContent (XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *node, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, const T &value) |
Private Member Functions | |
void | openForRead (std::unique_ptr< std::istream > &inputStream) |
void | openForWrite (const std::string &fileName) |
Private Attributes | |
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * | doc |
std::unique_ptr< XERCES_CPP_NAMESPACE_QUALIFIER HandlerBase > | errHandler |
std::string | fileName |
XERCES_CPP_NAMESPACE_QUALIFIER DOMImplementation * | impl |
std::unique_ptr< XERCES_CPP_NAMESPACE_QUALIFIER InputSource > | inputSource |
DOMDocument * | mDoc |
DOMImplementation * | mDom |
std::unique_ptr< XERCES_CPP_NAMESPACE_QUALIFIER XercesDOMParser > | parser |
std::unique_ptr< XercesPlatform > | platform |
XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | rootNode |
bool | write |
Definition at line 57 of file HcalDbXml.cc.
XMLDocument::XMLDocument | ( | ) |
Definition at line 100 of file HcalDbXml.cc.
References mDoc, mDom, and cms::concurrency::xercesInitialize().
XMLDocument::XMLDocument | ( | const std::string & | fileName, |
bool | write = false |
||
) |
Definition at line 145 of file XMLDocument.cc.
References openForRead(), and openForWrite().
XMLDocument::XMLDocument | ( | const std::string & | fileName, |
const std::string & | command | ||
) |
Definition at line 163 of file XMLDocument.cc.
References Exception, FrontierConditions_GlobalTag_cff::file, and openForRead().
XMLDocument::~XMLDocument | ( | ) |
Definition at line 186 of file XMLDocument.cc.
References doc, fileName, MatrixUtil::remove(), edmPickEvents::target, write, and cscNeutronWriter_cfi::writer.
void XMLDocument::addAttribute | ( | DOMElement * | fElement, |
const std::string & | fName, | ||
const T & | fValue | ||
) |
Definition at line 124 of file HcalDbXml.cc.
Referenced by makeElementDataset(), makeElementIOV(), makeElementTag(), makeMapDataset(), makeMapIOV(), and makeMapTag().
void XMLDocument::addData | ( | DOMElement * | fData, |
const HcalPedestal & | fItem | ||
) |
Definition at line 233 of file HcalDbXml.cc.
References HcalPedestal::getValue(), and newValue().
Referenced by dumpObject_().
void XMLDocument::addData | ( | DOMElement * | fData, |
const HcalPedestalWidth & | fItem | ||
) |
Definition at line 240 of file HcalDbXml.cc.
References HcalPedestalWidth::getSigma(), and newValue().
void XMLDocument::addData | ( | DOMElement * | fData, |
const HcalGain & | fItem | ||
) |
Definition at line 254 of file HcalDbXml.cc.
References HcalGain::getValue(), and newValue().
void XMLDocument::addData | ( | DOMElement * | fData, |
const HcalRawGain & | fItem | ||
) |
Definition at line 261 of file HcalDbXml.cc.
References HcalRawGain::getError(), HcalRawGain::getValue(), HcalRawGain::getVoltage(), newValue(), and HcalRawGain::strStatus().
void XMLDocument::addData | ( | DOMElement * | fData, |
const HcalGainWidth & | fItem | ||
) |
Definition at line 268 of file HcalDbXml.cc.
References HcalGainWidth::getValue(), and newValue().
DOMDocument * XMLDocument::createDocument | ( | const std::string & | root | ) |
Definition at line 268 of file XMLDocument.cc.
References doc, Exception, and rootNode.
Referenced by getRootNode().
const DOMDocument * XMLDocument::document | ( | ) |
|
inline |
|
inline |
Definition at line 25 of file XMLDocument.h.
References createDocument(), doc, HTMLExport::elem(), hasAttribute(), dataset::name, readAttribute(), readContent(), rootNode, AlCaHLTBitMon_QueryRunRegistry::string, writeAttribute(), writeContent(), and XERCES_CPP_NAMESPACE_QUALIFIER.
|
static |
Definition at line 305 of file XMLDocument.cc.
Referenced by getRootNode().
DOMElement * XMLDocument::makeChId | ( | DOMElement * | fDataset, |
DetId | fId | ||
) |
Definition at line 157 of file HcalDbXml.cc.
References funct::abs(), stringResolutionProvider_cfi::eta, HcalText2DetIdConverter::getField(), HcalText2DetIdConverter::getField2(), HcalText2DetIdConverter::getField3(), HcalText2DetIdConverter::getFlavor(), newElement(), newValue(), parser, and DetId::rawId().
Referenced by dumpObject_(), and makeElementDataset().
DOMElement * XMLDocument::makeData | ( | DOMElement * | fDataset, |
const HcalPedestal & | fPed, | ||
const HcalPedestalWidth & | fWidth | ||
) |
Definition at line 276 of file HcalDbXml.cc.
References data, HcalPedestalWidth::getSigma(), HcalPedestal::getValue(), newElement(), and newValue().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeData | ( | DOMElement * | fDataset | ) |
Definition at line 229 of file HcalDbXml.cc.
References newElement().
DOMElement * XMLDocument::makeDataset | ( | DOMElement * | fRoot, |
const std::string & | fVersion | ||
) |
Definition at line 151 of file HcalDbXml.cc.
References createfilelist::dataset, newElement(), and newValue().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeElement | ( | DOMElement * | fRoot | ) |
Definition at line 201 of file HcalDbXml.cc.
References newElement().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeElementDataset | ( | DOMElement * | fElement, |
int | fXMLId, | ||
DetId | fDetId, | ||
const std::string & | fVersion, | ||
const std::string & | fKind, | ||
unsigned long | fRun | ||
) |
Definition at line 171 of file HcalDbXml.cc.
References addAttribute(), createfilelist::dataset, makeChId(), makeRun(), newElement(), and newValue().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeElementIOV | ( | DOMElement * | fElement, |
unsigned long long | fIovBegin, | ||
unsigned long long | fIovEnd = 0 |
||
) |
Definition at line 181 of file HcalDbXml.cc.
References addAttribute(), newElement(), and newValue().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeElementTag | ( | DOMElement * | fElement, |
const std::string & | fTagName, | ||
const std::string & | fDetectorName, | ||
const std::string & | fComment = "Automatically created by HcalDbXml" |
||
) |
Definition at line 191 of file HcalDbXml.cc.
References addAttribute(), newElement(), newValue(), and GlobalPosition_Frontier_DevDB_cff::tag.
Referenced by dumpObject_().
DOMElement * XMLDocument::makeHeader | ( | DOMElement * | fRoot, |
const std::string & | fExtensionName, | ||
unsigned long | fRun | ||
) |
Definition at line 130 of file HcalDbXml.cc.
References RecoTauValidation_cfi::header, makeRun(), makeType(), and newElement().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeMapDataset | ( | DOMElement * | fIov, |
int | fXMLId | ||
) |
Definition at line 223 of file HcalDbXml.cc.
References addAttribute(), and newElement().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeMapIOV | ( | DOMElement * | fTag | ) |
Definition at line 217 of file HcalDbXml.cc.
References addAttribute(), and newElement().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeMaps | ( | DOMElement * | fRoot | ) |
Definition at line 206 of file HcalDbXml.cc.
References genParticles_cff::map, and newElement().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeMapTag | ( | DOMElement * | fMap | ) |
Definition at line 211 of file HcalDbXml.cc.
References addAttribute(), newElement(), and GlobalPosition_Frontier_DevDB_cff::tag.
Referenced by dumpObject_().
DOMElement * XMLDocument::makeRun | ( | DOMElement * | fHeader, |
unsigned long | fRun | ||
) |
Definition at line 144 of file HcalDbXml.cc.
References newElement(), newValue(), and findQualityFiles::run.
Referenced by makeElementDataset(), and makeHeader().
DOMElement * XMLDocument::makeType | ( | DOMElement * | fHeader, |
const std::string & | fExtensionName | ||
) |
Definition at line 137 of file HcalDbXml.cc.
References newElement(), and newValue().
Referenced by makeHeader().
DOMElement * XMLDocument::newElement | ( | DOMElement * | fParent, |
const T & | fName | ||
) |
Definition at line 111 of file HcalDbXml.cc.
References mDoc.
Referenced by makeChId(), makeData(), makeDataset(), makeElement(), makeElementDataset(), makeElementIOV(), makeElementTag(), makeHeader(), makeMapDataset(), makeMapIOV(), makeMaps(), makeMapTag(), makeRun(), makeType(), and newValue().
DOMElement * XMLDocument::newValue | ( | DOMElement * | fParent, |
const std::string & | fName, | ||
const T & | fValue | ||
) |
Definition at line 117 of file HcalDbXml.cc.
References mDoc, newElement(), and RecoTauValidation_cfi::text.
Referenced by addData(), makeChId(), makeData(), makeDataset(), makeElementDataset(), makeElementIOV(), makeElementTag(), makeRun(), and makeType().
|
private |
Definition at line 215 of file XMLDocument.cc.
References doc, MillePedeFileConverter_cfg::e, errHandler, Exception, inputSource, parser, and rootNode.
Referenced by XMLDocument().
|
private |
Definition at line 261 of file XMLDocument.cc.
Referenced by XMLDocument().
|
static |
Referenced by getRootNode().
|
static |
bool XMLDocument::readAttribute | ( | XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | elem, |
const char * | name | ||
) |
Definition at line 313 of file XMLDocument.cc.
References isBool().
bool XMLDocument::readAttribute | ( | XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | elem, |
const char * | name, | ||
const bool & | defValue | ||
) |
Definition at line 328 of file XMLDocument.cc.
References isBool().
|
static |
Referenced by getRootNode().
bool XMLDocument::readContent | ( | XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * | node | ) |
Definition at line 348 of file XMLDocument.cc.
References ws_sso_content_reader::content, and isBool().
DOMElement * XMLDocument::root | ( | ) |
Definition at line 128 of file HcalDbXml.cc.
References mDoc.
Referenced by dumpObject_(), and streamOut().
void XMLDocument::streamOut | ( | std::ostream & | fOut | ) |
Definition at line 300 of file HcalDbXml.cc.
References mDoc, mDom, and root().
Referenced by dumpObject_().
|
static |
Referenced by getRootNode().
void XMLDocument::writeAttribute | ( | XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | elem, |
const char * | name, | ||
const bool & | value | ||
) |
Definition at line 340 of file XMLDocument.cc.
References makeBool().
|
static |
Referenced by getRootNode().
void XMLDocument::writeContent | ( | XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * | node, |
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * | doc, | ||
const bool & | value | ||
) |
Definition at line 356 of file XMLDocument.cc.
References makeBool().
|
private |
Definition at line 76 of file XMLDocument.h.
Referenced by createDocument(), dumpObject_(), getDocument(), getRootNode(), openForRead(), and ~XMLDocument().
|
private |
Definition at line 73 of file XMLDocument.h.
Referenced by openForRead().
|
private |
Definition at line 69 of file XMLDocument.h.
Referenced by ~XMLDocument().
|
private |
Definition at line 74 of file XMLDocument.h.
|
private |
Definition at line 67 of file XMLDocument.h.
Referenced by openForRead().
|
private |
Definition at line 97 of file HcalDbXml.cc.
Referenced by document(), newElement(), newValue(), root(), streamOut(), and XMLDocument().
|
private |
Definition at line 96 of file HcalDbXml.cc.
Referenced by streamOut(), and XMLDocument().
|
private |
Definition at line 72 of file XMLDocument.h.
Referenced by makeChId(), and openForRead().
|
private |
Definition at line 66 of file XMLDocument.h.
|
private |
Definition at line 77 of file XMLDocument.h.
Referenced by createDocument(), getRootNode(), and openForRead().
|
private |
Definition at line 70 of file XMLDocument.h.
Referenced by pkg.AbstractPkg::generate(), querying.connection::write_and_commit(), and ~XMLDocument().