#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::auto_ptr< std::istream > &inputStream) |
void | openForWrite (const std::string &fileName) |
Private Attributes | |
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * | doc |
std::auto_ptr < XERCES_CPP_NAMESPACE_QUALIFIER HandlerBase > | errHandler |
std::string | fileName |
XERCES_CPP_NAMESPACE_QUALIFIER DOMImplementation * | impl |
std::auto_ptr < XERCES_CPP_NAMESPACE_QUALIFIER InputSource > | inputSource |
DOMDocument * | mDoc |
DOMImplementation * | mDom |
std::auto_ptr < XERCES_CPP_NAMESPACE_QUALIFIER XercesDOMParser > | parser |
std::auto_ptr< XercesPlatform > | platform |
XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | rootNode |
bool | write |
Definition at line 55 of file HcalDbXml.cc.
XMLDocument::XMLDocument | ( | ) |
Definition at line 98 of file HcalDbXml.cc.
References mDoc, mDom, and cms::concurrency::xercesInitialize().
XMLDocument::XMLDocument | ( | const std::string & | fileName, |
bool | write = false |
||
) |
Definition at line 143 of file XMLDocument.cc.
References openForRead(), and openForWrite().
XMLDocument::XMLDocument | ( | const std::string & | fileName, |
const std::string & | command | ||
) |
Definition at line 161 of file XMLDocument.cc.
References Exception, mergeVDriftHistosByStation::file, and openForRead().
XMLDocument::~XMLDocument | ( | ) |
Definition at line 184 of file XMLDocument.cc.
References assert(), doc, fileName, impl, python.multivaluedict::remove(), filterCSVwithJSON::target, and write.
void XMLDocument::addAttribute | ( | DOMElement * | fElement, |
const std::string & | fName, | ||
const T & | fValue | ||
) |
Definition at line 122 of file HcalDbXml.cc.
Referenced by makeElementDataset(), makeElementIOV(), makeElementTag(), makeMapDataset(), makeMapIOV(), and makeMapTag().
void XMLDocument::addData | ( | DOMElement * | fData, |
const HcalPedestal & | fItem | ||
) |
Definition at line 231 of file HcalDbXml.cc.
References HcalPedestal::getValue(), and newValue().
Referenced by dumpObject_().
void XMLDocument::addData | ( | DOMElement * | fData, |
const HcalPedestalWidth & | fItem | ||
) |
Definition at line 238 of file HcalDbXml.cc.
References HcalPedestalWidth::getSigma(), and newValue().
void XMLDocument::addData | ( | DOMElement * | fData, |
const HcalGain & | fItem | ||
) |
Definition at line 252 of file HcalDbXml.cc.
References HcalGain::getValue(), and newValue().
void XMLDocument::addData | ( | DOMElement * | fData, |
const HcalRawGain & | fItem | ||
) |
Definition at line 259 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 266 of file HcalDbXml.cc.
References HcalGainWidth::getValue(), and newValue().
DOMDocument * XMLDocument::createDocument | ( | const std::string & | root | ) |
Definition at line 266 of file XMLDocument.cc.
References doc, Exception, impl, and rootNode.
const DOMDocument * XMLDocument::document | ( | ) |
|
inline |
|
inline |
Definition at line 25 of file XMLDocument.h.
References rootNode.
|
static |
Definition at line 303 of file XMLDocument.cc.
DOMElement * XMLDocument::makeChId | ( | DOMElement * | fDataset, |
DetId | fId | ||
) |
Definition at line 155 of file HcalDbXml.cc.
References funct::abs(), 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 274 of file HcalDbXml.cc.
References data, HcalPedestalWidth::getSigma(), HcalPedestal::getValue(), newElement(), and newValue().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeData | ( | DOMElement * | fDataset | ) |
Definition at line 227 of file HcalDbXml.cc.
References newElement().
DOMElement * XMLDocument::makeDataset | ( | DOMElement * | fRoot, |
const std::string & | fVersion | ||
) |
Definition at line 149 of file HcalDbXml.cc.
References dataset::dataset, newElement(), and newValue().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeElement | ( | DOMElement * | fRoot | ) |
Definition at line 199 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 169 of file HcalDbXml.cc.
References addAttribute(), dataset::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 179 of file HcalDbXml.cc.
References addAttribute(), o2o::iov, 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 189 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 128 of file HcalDbXml.cc.
References makeRun(), makeType(), and newElement().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeMapDataset | ( | DOMElement * | fIov, |
int | fXMLId | ||
) |
Definition at line 221 of file HcalDbXml.cc.
References addAttribute(), and newElement().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeMapIOV | ( | DOMElement * | fTag | ) |
Definition at line 215 of file HcalDbXml.cc.
References addAttribute(), o2o::iov, and newElement().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeMaps | ( | DOMElement * | fRoot | ) |
Definition at line 204 of file HcalDbXml.cc.
References python.multivaluedict::map(), and newElement().
Referenced by dumpObject_().
DOMElement * XMLDocument::makeMapTag | ( | DOMElement * | fMap | ) |
Definition at line 209 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 142 of file HcalDbXml.cc.
References newElement(), newValue(), and DTTTrigCorrFirst::run.
Referenced by makeElementDataset(), and makeHeader().
DOMElement * XMLDocument::makeType | ( | DOMElement * | fHeader, |
const std::string & | fExtensionName | ||
) |
Definition at line 135 of file HcalDbXml.cc.
References newElement(), and newValue().
Referenced by makeHeader().
DOMElement * XMLDocument::newElement | ( | DOMElement * | fParent, |
const T & | fName | ||
) |
Definition at line 109 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 115 of file HcalDbXml.cc.
References mDoc, newElement(), and runonSM::text.
Referenced by addData(), makeChId(), makeData(), makeDataset(), makeElementDataset(), makeElementIOV(), makeElementTag(), makeRun(), and makeType().
|
private |
Definition at line 212 of file XMLDocument.cc.
References doc, alignCSCRings::e, errHandler, Exception, inputSource, python.Node::node, parser, and rootNode.
Referenced by XMLDocument().
|
private |
Definition at line 259 of file XMLDocument.cc.
References assert(), and impl.
Referenced by XMLDocument().
|
static |
|
static |
bool XMLDocument::readAttribute | ( | XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | elem, |
const char * | name | ||
) |
Definition at line 311 of file XMLDocument.cc.
References isBool().
bool XMLDocument::readAttribute | ( | XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | elem, |
const char * | name, | ||
const bool & | defValue | ||
) |
Definition at line 326 of file XMLDocument.cc.
References isBool().
|
static |
bool XMLDocument::readContent | ( | XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * | node | ) |
Definition at line 346 of file XMLDocument.cc.
References ws_sso_content_reader::content, and isBool().
DOMElement * XMLDocument::root | ( | ) |
Definition at line 126 of file HcalDbXml.cc.
References mDoc.
Referenced by dumpObject_(), and streamOut().
void XMLDocument::streamOut | ( | std::ostream & | fOut | ) |
Definition at line 298 of file HcalDbXml.cc.
References mDoc, mDom, and root().
Referenced by dumpObject_().
|
static |
void XMLDocument::writeAttribute | ( | XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | elem, |
const char * | name, | ||
const bool & | value | ||
) |
|
static |
void XMLDocument::writeContent | ( | XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * | node, |
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * | doc, | ||
const bool & | value | ||
) |
|
private |
Definition at line 76 of file XMLDocument.h.
Referenced by createDocument(), getDocument(), 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.
Referenced by createDocument(), openForWrite(), and ~XMLDocument().
|
private |
Definition at line 67 of file XMLDocument.h.
Referenced by openForRead().
|
private |
Definition at line 95 of file HcalDbXml.cc.
Referenced by document(), newElement(), newValue(), root(), streamOut(), and XMLDocument().
|
private |
Definition at line 94 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(), and ~XMLDocument().