CMS 3D CMS Logo

Functions
xuti Namespace Reference

Functions

const std::string ADCToGeVConstant_tag ("EcalADCToGeVConstant")
 
const std::string AlignmentConstant_tag ("EcalAlignmentConstant")
 
const std::string Barrel_tag ("BarrelValue")
 
const std::string Cell_tag ("cell")
 
const std::string ChannelStatus_tag ("EcalChannelStatus")
 
const std::string ChannelStatusCode_tag ("ChannelStatusCode")
 
const std::string DAQStatusCode_tag ("DAQStatusCode")
 
const std::string DAQTowerStatus_tag ("EcalDAQTowerStatus")
 
const std::string DCSStatusCode_tag ("DCSStatusCode")
 
const std::string DCSTowerStatus_tag ("EcalDCSTowerStatus")
 
const std::string EcalFloatCondObjectContainer_tag ("EcalFloatCondObjectContainer")
 
const std::string EcalTBWeight_tag ("EcalTBWeight")
 
const std::string EcalTBWeights_tag ("EcalTBWeights")
 
const std::string EcalTDCId_tag ("EcalTDCId")
 
const std::string EcalWeightSet_tag ("EcalWeightSet")
 
const std::string EcalXtalGroupId_tag ("EcalXtalGroupId")
 
const std::string Endcap_tag ("EndcapValue")
 
const std::string ESGain_tag ("ESGain")
 
const std::string Gain12Over6_tag ("Gain12Over6")
 
const std::string Gain6Over1_tag ("Gain6Over1")
 
const std::string GainRatios_tag ("EcalGainRatios")
 
xercesc::DOMNode * getChildNode (xercesc::DOMNode *node, const std::string &nodename)
 get the child of More...
 
template<class T >
void GetNodeData (xercesc::DOMNode *node, T &value)
 get the node data More...
 
void GetNodeStringData (xercesc::DOMNode *node, std::string &value)
 get the node data as string. Needs to be used to avoid splitting More...
 
const std::string Header_datasourcetag ("datasource")
 
const std::string Header_datetag ("date")
 
const std::string Header_methodtag ("method")
 
const std::string Header_sincetag ("since")
 
const std::string Header_tag ("EcalCondHeader")
 
const std::string Header_tagtag ("tag")
 
const std::string Header_versiontag ("version")
 
const std::string id_tag ("id")
 
const std::string iEta_tag ("iEta")
 
const std::string IntercalibConstant_tag ("IntercalibConstant")
 
const std::string IntercalibConstants_tag ("EcalIntercalibConstants")
 
const std::string IntercalibError_tag ("IntercalibError")
 
const std::string iPhi_tag ("iPhi")
 
const std::string ix_tag ("ix")
 
const std::string ixSC_tag ("ixSC")
 
const std::string iy_tag ("iy")
 
const std::string iySC_tag ("iySC")
 
const std::string Laser_p1_tag ("p1")
 
const std::string Laser_p2_tag ("p2")
 
const std::string Laser_p3_tag ("p3")
 
const std::string Laser_t1_tag ("t1")
 
const std::string Laser_t2_tag ("t2")
 
const std::string Laser_t3_tag ("t3")
 
const std::string Laser_tag ("EcalLaserAPDPNRatios")
 
const std::string LinearCorrections_tag ("EcalLinearCorrections")
 
const std::string Linearization_m12_tag ("mult12")
 
const std::string Linearization_m1_tag ("mult1")
 
const std::string Linearization_m6_tag ("mult6")
 
const std::string Linearization_s12_tag ("shift12")
 
const std::string Linearization_s1_tag ("shift1")
 
const std::string Linearization_s6_tag ("shift6")
 
const std::string Linearization_tag ("EcalTPGLinearizationConts")
 
const std::string mean12_tag ("mean_x12")
 
const std::string mean1_tag ("mean_x1")
 
const std::string mean6_tag ("mean_x6")
 
const std::string Pedestals_tag ("EcalPedestals")
 
const std::string Phi_tag ("Phi")
 
const std::string Psi_tag ("Psi")
 
const std::string PulseShapes_tag ("EcalPulseShapes")
 
const std::string PulseSymmCovariances_tag ("EcalPulseSymmCovariances")
 
const DetId readCellId (xercesc::DOMElement *node)
 Assuming. More...
 
void readHeader (xercesc::DOMNode *parentNode, EcalCondHeader &header)
 read header from More...
 
int readHeader (const std::string &filename, EcalCondHeader &header)
 read header from any xml file, return -1 in case of error More...
 
const std::string rms12_tag ("rms_x12")
 
const std::string rms1_tag ("rms_x1")
 
const std::string rms6_tag ("rms_x6")
 
const std::string row_tag ("row")
 
const std::string sample0_tag ("sample_0")
 
const std::string sample10_tag ("sample_10")
 
const std::string sample11_tag ("sample_11")
 
const std::string sample1_tag ("sample_1")
 
const std::string sample2_tag ("sample_2")
 
const std::string sample3_tag ("sample_3")
 
const std::string sample4_tag ("sample_4")
 
const std::string sample5_tag ("sample_5")
 
const std::string sample6_tag ("sample_6")
 
const std::string sample7_tag ("sample_7")
 
const std::string sample8_tag ("sample_8")
 
const std::string sample9_tag ("sample_9")
 
const std::string SimComponentShape_tag ("EcalSimComponentShape")
 
const std::string SimPulseShape_tag ("EcalSimPulseShape")
 
const std::string subdet_tag ("SubDet")
 
const std::string Theta_tag ("Theta")
 
const std::string TimeOffsetConstant_tag ("EcalTimeOffsetConstant")
 
const std::string TPGCrystalStatus_tag ("EcalTPGCrystalStatus")
 
const std::string TPGStripStatus_tag ("EcalTPGStripStatus")
 
const std::string TPGTowerStatus_tag ("EcalTPGTowerStatus")
 
const std::string Value_tag ("Value")
 
const std::string WeightGroup_tag ("EcalWeightGroup")
 
const std::string WeightGroups_tag ("EcalWeightGroups")
 
const std::string wgtAfterSwitch_tag ("WeightAfterSwitch")
 
const std::string wgtBeforeSwitch_tag ("WeightBeforeSwitch")
 
const std::string wgtChi2AfterSwitch_tag ("Chi2WeightAfterSwitch")
 
const std::string wgtChi2BeforeSwitch_tag ("Chi2WeightBeforeSwitch")
 
xercesc::DOMElement * writeCell (xercesc::DOMNode *node, const DetId &detid)
 Append a Cell node with attributes to. More...
 
void writeHeader (xercesc::DOMNode *parentNode, const EcalCondHeader &header)
 write More...
 
template<class T >
void WriteNodeWithValue (xercesc::DOMNode *parentNode, const std::string &tag, const T &value)
 write a node with More...
 
const std::string x_tag ("x")
 
const std::string y_tag ("y")
 
const std::string z_tag ("z")
 
const std::string zside_tag ("zside")
 

Detailed Description

Helper function for converting Ecal DB Objects to XML

Author
S. Argiro, F. Rubbo
Id
DOMHelperFunctions.h,v 1.1 2008/11/14 15:46:05 argiro Exp

Function Documentation

◆ ADCToGeVConstant_tag()

const std::string xuti::ADCToGeVConstant_tag ( "EcalADCToGeVConstant"  )

◆ AlignmentConstant_tag()

const std::string xuti::AlignmentConstant_tag ( "EcalAlignmentConstant"  )

◆ Barrel_tag()

const std::string xuti::Barrel_tag ( "BarrelValue"  )

◆ Cell_tag()

const std::string xuti::Cell_tag ( "cell"  )

◆ ChannelStatus_tag()

const std::string xuti::ChannelStatus_tag ( "EcalChannelStatus"  )

◆ ChannelStatusCode_tag()

const std::string xuti::ChannelStatusCode_tag ( "ChannelStatusCode"  )

◆ DAQStatusCode_tag()

const std::string xuti::DAQStatusCode_tag ( "DAQStatusCode"  )

◆ DAQTowerStatus_tag()

const std::string xuti::DAQTowerStatus_tag ( "EcalDAQTowerStatus"  )

◆ DCSStatusCode_tag()

const std::string xuti::DCSStatusCode_tag ( "DCSStatusCode"  )

◆ DCSTowerStatus_tag()

const std::string xuti::DCSTowerStatus_tag ( "EcalDCSTowerStatus"  )

◆ EcalFloatCondObjectContainer_tag()

const std::string xuti::EcalFloatCondObjectContainer_tag ( "EcalFloatCondObjectContainer"  )

◆ EcalTBWeight_tag()

const std::string xuti::EcalTBWeight_tag ( "EcalTBWeight"  )

◆ EcalTBWeights_tag()

const std::string xuti::EcalTBWeights_tag ( "EcalTBWeights"  )

◆ EcalTDCId_tag()

const std::string xuti::EcalTDCId_tag ( "EcalTDCId"  )

◆ EcalWeightSet_tag()

const std::string xuti::EcalWeightSet_tag ( "EcalWeightSet"  )

◆ EcalXtalGroupId_tag()

const std::string xuti::EcalXtalGroupId_tag ( "EcalXtalGroupId"  )

◆ Endcap_tag()

const std::string xuti::Endcap_tag ( "EndcapValue"  )

◆ ESGain_tag()

const std::string xuti::ESGain_tag ( "ESGain"  )

◆ Gain12Over6_tag()

const std::string xuti::Gain12Over6_tag ( "Gain12Over6"  )

◆ Gain6Over1_tag()

const std::string xuti::Gain6Over1_tag ( "Gain6Over1"  )

◆ GainRatios_tag()

const std::string xuti::GainRatios_tag ( "EcalGainRatios"  )

◆ getChildNode()

xercesc::DOMNode* xuti::getChildNode ( xercesc::DOMNode *  node,
const std::string &  nodename 
)

◆ GetNodeData()

template<class T >
void xuti::GetNodeData ( xercesc::DOMNode *  node,
T value 
)

◆ GetNodeStringData()

void xuti::GetNodeStringData ( xercesc::DOMNode *  node,
std::string &  value 
)

get the node data as string. Needs to be used to avoid splitting

Definition at line 213 of file DOMHelperFunctions.cc.

References cms::xerces::toString().

Referenced by readHeader().

213  {
214  value = cms::xerces::toString(node->getTextContent());
215 }
std::string toString(XMLCh const *toTranscode)
Definition: value.py:1

◆ Header_datasourcetag()

const std::string xuti::Header_datasourcetag ( "datasource"  )

Referenced by readHeader(), and writeHeader().

◆ Header_datetag()

const std::string xuti::Header_datetag ( "date"  )

Referenced by readHeader(), and writeHeader().

◆ Header_methodtag()

const std::string xuti::Header_methodtag ( "method"  )

Referenced by readHeader(), and writeHeader().

◆ Header_sincetag()

const std::string xuti::Header_sincetag ( "since"  )

Referenced by readHeader(), and writeHeader().

◆ Header_tag()

const std::string xuti::Header_tag ( "EcalCondHeader"  )

Referenced by readHeader(), and writeHeader().

◆ Header_tagtag()

const std::string xuti::Header_tagtag ( "tag"  )

Referenced by readHeader(), and writeHeader().

◆ Header_versiontag()

const std::string xuti::Header_versiontag ( "version"  )

Referenced by readHeader(), and writeHeader().

◆ id_tag()

const std::string xuti::id_tag ( "id"  )

◆ iEta_tag()

const std::string xuti::iEta_tag ( "iEta"  )

Referenced by readCellId(), and writeCell().

◆ IntercalibConstant_tag()

const std::string xuti::IntercalibConstant_tag ( "IntercalibConstant"  )

◆ IntercalibConstants_tag()

const std::string xuti::IntercalibConstants_tag ( "EcalIntercalibConstants"  )

◆ IntercalibError_tag()

const std::string xuti::IntercalibError_tag ( "IntercalibError"  )

◆ iPhi_tag()

const std::string xuti::iPhi_tag ( "iPhi"  )

Referenced by readCellId(), and writeCell().

◆ ix_tag()

const std::string xuti::ix_tag ( "ix"  )

Referenced by readCellId(), and writeCell().

◆ ixSC_tag()

const std::string xuti::ixSC_tag ( "ixSC"  )

Referenced by readCellId(), and writeCell().

◆ iy_tag()

const std::string xuti::iy_tag ( "iy"  )

Referenced by readCellId(), and writeCell().

◆ iySC_tag()

const std::string xuti::iySC_tag ( "iySC"  )

Referenced by readCellId(), and writeCell().

◆ Laser_p1_tag()

const std::string xuti::Laser_p1_tag ( "p1"  )

◆ Laser_p2_tag()

const std::string xuti::Laser_p2_tag ( "p2"  )

◆ Laser_p3_tag()

const std::string xuti::Laser_p3_tag ( "p3"  )

◆ Laser_t1_tag()

const std::string xuti::Laser_t1_tag ( "t1"  )

◆ Laser_t2_tag()

const std::string xuti::Laser_t2_tag ( "t2"  )

◆ Laser_t3_tag()

const std::string xuti::Laser_t3_tag ( "t3"  )

◆ Laser_tag()

const std::string xuti::Laser_tag ( "EcalLaserAPDPNRatios"  )

◆ LinearCorrections_tag()

const std::string xuti::LinearCorrections_tag ( "EcalLinearCorrections"  )

◆ Linearization_m12_tag()

const std::string xuti::Linearization_m12_tag ( "mult12"  )

◆ Linearization_m1_tag()

const std::string xuti::Linearization_m1_tag ( "mult1"  )

◆ Linearization_m6_tag()

const std::string xuti::Linearization_m6_tag ( "mult6"  )

◆ Linearization_s12_tag()

const std::string xuti::Linearization_s12_tag ( "shift12"  )

◆ Linearization_s1_tag()

const std::string xuti::Linearization_s1_tag ( "shift1"  )

◆ Linearization_s6_tag()

const std::string xuti::Linearization_s6_tag ( "shift6"  )

◆ Linearization_tag()

const std::string xuti::Linearization_tag ( "EcalTPGLinearizationConts"  )

◆ mean12_tag()

const std::string xuti::mean12_tag ( "mean_x12"  )

◆ mean1_tag()

const std::string xuti::mean1_tag ( "mean_x1"  )

◆ mean6_tag()

const std::string xuti::mean6_tag ( "mean_x6"  )

◆ Pedestals_tag()

const std::string xuti::Pedestals_tag ( "EcalPedestals"  )

◆ Phi_tag()

const std::string xuti::Phi_tag ( "Phi"  )

◆ Psi_tag()

const std::string xuti::Psi_tag ( "Psi"  )

◆ PulseShapes_tag()

const std::string xuti::PulseShapes_tag ( "EcalPulseShapes"  )

◆ PulseSymmCovariances_tag()

const std::string xuti::PulseSymmCovariances_tag ( "EcalPulseSymmCovariances"  )

◆ readCellId()

const DetId xuti::readCellId ( xercesc::DOMElement *  node)

Assuming.

Parameters
nodeis a <cell> node, read the id

Definition at line 24 of file DOMHelperFunctions.cc.

References DMR_cfg::cerr, hcalRecHitTable_cff::ieta, iEta_tag(), hcalRecHitTable_cff::iphi, iPhi_tag(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::ix(), ix_tag(), ixSC_tag(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::iy(), iy_tag(), iySC_tag(), cms::xerces::toString(), cms::xerces::uStr(), ecaldqm::zside(), and zside_tag().

Referenced by EcalDAQTowerStatusXMLTranslator::readXML(), EcalPulseShapesXMLTranslator::readXML(), EcalPulseSymmCovariancesXMLTranslator::readXML(), EcalDCSTowerStatusXMLTranslator::readXML(), EcalPedestalsXMLTranslator::readXML(), EcalChannelStatusXMLTranslator::readXML(), EcalLaserAPDPNRatiosXMLTranslator::readXML(), EcalGainRatiosXMLTranslator::readXML(), EcalLinearCorrectionsXMLTranslator::readXML(), and EcalWeightGroupXMLTranslator::readXML().

24  {
25  int ieta = 0;
26  int iphi = 0;
27  int ix = 0;
28  int iy = 0;
29  int ixSC = 0;
30  int iySC = 0;
31  int zside = 0;
32 
33  stringstream ieta_str;
34  stringstream iphi_str;
35  stringstream ix_str;
36  stringstream iy_str;
37  stringstream ixSC_str;
38  stringstream iySC_str;
39  stringstream zside_str;
40 
41  ieta_str << cms::xerces::toString(node->getAttribute(cms::xerces::uStr(iEta_tag.c_str()).ptr()));
42  iphi_str << cms::xerces::toString(node->getAttribute(cms::xerces::uStr(iPhi_tag.c_str()).ptr()));
43  ix_str << cms::xerces::toString(node->getAttribute(cms::xerces::uStr(ix_tag.c_str()).ptr()));
44  iy_str << cms::xerces::toString(node->getAttribute(cms::xerces::uStr(iy_tag.c_str()).ptr()));
45  ixSC_str << cms::xerces::toString(node->getAttribute(cms::xerces::uStr(ixSC_tag.c_str()).ptr()));
46  iySC_str << cms::xerces::toString(node->getAttribute(cms::xerces::uStr(iySC_tag.c_str()).ptr()));
47  zside_str << cms::xerces::toString(node->getAttribute(cms::xerces::uStr(zside_tag.c_str()).ptr()));
48 
49  ieta_str >> ieta;
50  iphi_str >> iphi;
51  ix_str >> ix;
52  iy_str >> iy;
53  ixSC_str >> ixSC;
54  iySC_str >> iySC;
55  zside_str >> zside;
56 
57  if (ieta && iphi) {
58  return EBDetId(ieta, iphi);
59  }
60  if (ix && iy && zside) {
61  return EEDetId(ix, iy, zside);
62  }
63  if (ixSC && iySC && zside) {
64  return EcalScDetId(ixSC, iySC, zside);
65  }
66 
67  cerr << "XMLCell: error reading cell, missing field ?" << std::endl;
68  return 0;
69 }
const std::string iySC_tag("iySC")
const std::string iEta_tag("iEta")
int zside(DetId const &)
std::string toString(XMLCh const *toTranscode)
const std::string ix_tag("ix")
ZStr< XMLCh > uStr(char const *str)
const std::string iy_tag("iy")
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
const std::string zside_tag("zside")
const std::string ixSC_tag("ixSC")
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
const std::string iPhi_tag("iPhi")

◆ readHeader() [1/2]

void xuti::readHeader ( xercesc::DOMNode *  parentNode,
EcalCondHeader header 
)

read header from

Parameters
parentNode

Definition at line 164 of file DOMHelperFunctions.cc.

References getChildNode(), GetNodeData(), GetNodeStringData(), RecoTauValidation_cfi::header, Header_datasourcetag(), Header_datetag(), Header_methodtag(), Header_sincetag(), Header_tag(), Header_tagtag(), and Header_versiontag().

Referenced by EcalFloatCondObjectContainerHandler::id(), readHeader(), EcalClusterLocalContCorrXMLTranslator::readXML(), EcalTimeBiasCorrectionsXMLTranslator::readXML(), EcalTPGStripStatusXMLTranslator::readXML(), EcalTPGTowerStatusXMLTranslator::readXML(), EcalPulseSymmCovariancesXMLTranslator::readXML(), EcalDAQTowerStatusXMLTranslator::readXML(), EcalDCSTowerStatusXMLTranslator::readXML(), EcalPedestalsXMLTranslator::readXML(), EcalPulseShapesXMLTranslator::readXML(), EcalChannelStatusXMLTranslator::readXML(), EcalClusterCrackCorrXMLTranslator::readXML(), EcalGainRatiosXMLTranslator::readXML(), EcalLinearCorrectionsXMLTranslator::readXML(), EcalLaserAPDPNRatiosXMLTranslator::readXML(), EcalWeightGroupXMLTranslator::readXML(), EcalClusterEnergyCorrectionObjectSpecificXMLTranslator::readXML(), EcalClusterEnergyCorrectionXMLTranslator::readXML(), EcalADCToGeVXMLTranslator::readXML(), EcalTimeOffsetXMLTranslator::readXML(), EcalTBWeightsXMLTranslator::readXML(), and EcalWeightSetXMLTranslator::readXML().

164  {
165  DOMNode* hnode = getChildNode(parentNode, Header_tag);
166 
167  DOMNode* node = getChildNode(hnode, Header_methodtag);
168  GetNodeStringData(node, header.method_);
169 
170  node = getChildNode(hnode, Header_versiontag);
171  GetNodeStringData(node, header.version_);
172 
173  node = getChildNode(hnode, Header_datasourcetag);
174  GetNodeStringData(node, header.datasource_);
175 
176  node = getChildNode(hnode, Header_sincetag);
177  GetNodeData(node, header.since_);
178 
179  node = getChildNode(hnode, Header_tagtag);
180  GetNodeStringData(node, header.tag_);
181 
182  node = getChildNode(hnode, Header_datetag);
183  GetNodeStringData(node, header.date_);
184 }
void GetNodeStringData(xercesc::DOMNode *node, std::string &value)
get the node data as string. Needs to be used to avoid splitting
const std::string Header_sincetag("since")
const std::string Header_methodtag("method")
const std::string Header_datetag("date")
const std::string Header_tagtag("tag")
const std::string Header_versiontag("version")
const std::string Header_tag("EcalCondHeader")
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 Header_datasourcetag("datasource")

◆ readHeader() [2/2]

int xuti::readHeader ( const std::string &  filename,
EcalCondHeader header 
)

read header from any xml file, return -1 in case of error

Definition at line 186 of file DOMHelperFunctions.cc.

References gather_cfg::cout, corrVsCorr::filename, RecoTauValidation_cfi::header, writedatasetfile::parser, readHeader(), cms::concurrency::xercesInitialize(), and cms::concurrency::xercesTerminate().

186  {
188 
189  XercesDOMParser* parser = new XercesDOMParser;
190  parser->setValidationScheme(XercesDOMParser::Val_Never);
191  parser->setDoNamespaces(false);
192  parser->setDoSchema(false);
193 
194  parser->parse(filename.c_str());
195 
196  DOMDocument* xmlDoc = parser->getDocument();
197 
198  if (!xmlDoc) {
199  std::cout << "Error parsing document" << std::endl;
200  return -1;
201  }
202 
203  DOMElement* elementRoot = xmlDoc->getDocumentElement();
204 
205  xuti::readHeader(elementRoot, header);
206 
207  delete parser;
209 
210  return 0;
211 }
void xercesTerminate()
Definition: Xerces.cc:23
void xercesInitialize()
Definition: Xerces.cc:18
void readHeader(xercesc::DOMNode *parentNode, EcalCondHeader &header)
read header from

◆ rms12_tag()

const std::string xuti::rms12_tag ( "rms_x12"  )

◆ rms1_tag()

const std::string xuti::rms1_tag ( "rms_x1"  )

◆ rms6_tag()

const std::string xuti::rms6_tag ( "rms_x6"  )

◆ row_tag()

const std::string xuti::row_tag ( "row"  )

◆ sample0_tag()

const std::string xuti::sample0_tag ( "sample_0"  )

◆ sample10_tag()

const std::string xuti::sample10_tag ( "sample_10"  )

◆ sample11_tag()

const std::string xuti::sample11_tag ( "sample_11"  )

◆ sample1_tag()

const std::string xuti::sample1_tag ( "sample_1"  )

◆ sample2_tag()

const std::string xuti::sample2_tag ( "sample_2"  )

◆ sample3_tag()

const std::string xuti::sample3_tag ( "sample_3"  )

◆ sample4_tag()

const std::string xuti::sample4_tag ( "sample_4"  )

◆ sample5_tag()

const std::string xuti::sample5_tag ( "sample_5"  )

◆ sample6_tag()

const std::string xuti::sample6_tag ( "sample_6"  )

◆ sample7_tag()

const std::string xuti::sample7_tag ( "sample_7"  )

◆ sample8_tag()

const std::string xuti::sample8_tag ( "sample_8"  )

◆ sample9_tag()

const std::string xuti::sample9_tag ( "sample_9"  )

◆ SimComponentShape_tag()

const std::string xuti::SimComponentShape_tag ( "EcalSimComponentShape"  )

◆ SimPulseShape_tag()

const std::string xuti::SimPulseShape_tag ( "EcalSimPulseShape"  )

◆ subdet_tag()

const std::string xuti::subdet_tag ( "SubDet"  )

◆ Theta_tag()

const std::string xuti::Theta_tag ( "Theta"  )

◆ TimeOffsetConstant_tag()

const std::string xuti::TimeOffsetConstant_tag ( "EcalTimeOffsetConstant"  )

◆ TPGCrystalStatus_tag()

const std::string xuti::TPGCrystalStatus_tag ( "EcalTPGCrystalStatus"  )

◆ TPGStripStatus_tag()

const std::string xuti::TPGStripStatus_tag ( "EcalTPGStripStatus"  )

◆ TPGTowerStatus_tag()

const std::string xuti::TPGTowerStatus_tag ( "EcalTPGTowerStatus"  )

◆ Value_tag()

const std::string xuti::Value_tag ( "Value"  )

◆ WeightGroup_tag()

const std::string xuti::WeightGroup_tag ( "EcalWeightGroup"  )

◆ WeightGroups_tag()

const std::string xuti::WeightGroups_tag ( "EcalWeightGroups"  )

◆ wgtAfterSwitch_tag()

const std::string xuti::wgtAfterSwitch_tag ( "WeightAfterSwitch"  )

◆ wgtBeforeSwitch_tag()

const std::string xuti::wgtBeforeSwitch_tag ( "WeightBeforeSwitch"  )

◆ wgtChi2AfterSwitch_tag()

const std::string xuti::wgtChi2AfterSwitch_tag ( "Chi2WeightAfterSwitch"  )

◆ wgtChi2BeforeSwitch_tag()

const std::string xuti::wgtChi2BeforeSwitch_tag ( "Chi2WeightBeforeSwitch"  )

◆ writeCell()

DOMElement * xuti::writeCell ( xercesc::DOMNode *  node,
const DetId detid 
)

Append a Cell node with attributes to.

Parameters
node

Definition at line 71 of file DOMHelperFunctions.cc.

References Cell_tag(), EcalBarrel, EcalEndcap, EcalTriggerTower, EcalTrigTowerDetId::ieta(), EBDetId::ieta(), iEta_tag(), EBDetId::iphi(), EcalTrigTowerDetId::iphi(), iPhi_tag(), EcalScDetId::ix(), EEDetId::ix(), ix_tag(), ixSC_tag(), EcalScDetId::iy(), EEDetId::iy(), iy_tag(), iySC_tag(), DetId::rawId(), DetId::subdetId(), cms::xerces::uStr(), EcalScDetId::zside(), EEDetId::zside(), and zside_tag().

Referenced by EcalTPGCrystalStatusXMLTranslator::dumpXML(), EcalTPGLinearizationConstXMLTranslator::dumpXML(), EcalTPGTowerStatusXMLTranslator::dumpXML(), EcalDAQTowerStatusXMLTranslator::dumpXML(), EcalPulseShapesXMLTranslator::dumpXML(), EcalPedestalsXMLTranslator::dumpXML(), EcalDCSTowerStatusXMLTranslator::dumpXML(), EcalChannelStatusXMLTranslator::dumpXML(), EcalLinearCorrectionsXMLTranslator::dumpXML(), EcalGainRatiosXMLTranslator::dumpXML(), EcalLaserAPDPNRatiosXMLTranslator::dumpXML(), EcalPulseSymmCovariancesXMLTranslator::dumpXML(), EcalWeightGroupXMLTranslator::dumpXML(), and EcalFloatCondObjectContainerXMLTranslator::dumpXML().

71  {
72  DOMElement* cell_node = node->getOwnerDocument()->createElement(cms::xerces::uStr(Cell_tag.c_str()).ptr());
73 
74  node->appendChild(cell_node);
75 
76  if (detid.subdetId() == EcalBarrel) {
77  stringstream value_s;
78  value_s << EBDetId(detid).ieta();
79 
80  cell_node->setAttribute(cms::xerces::uStr(iEta_tag.c_str()).ptr(), cms::xerces::uStr(value_s.str().c_str()).ptr());
81  value_s.str("");
82  value_s << EBDetId(detid).iphi();
83 
84  cell_node->setAttribute(cms::xerces::uStr(iPhi_tag.c_str()).ptr(), cms::xerces::uStr(value_s.str().c_str()).ptr());
85 
86  } else if (detid.subdetId() == EcalEndcap) {
87  // is it a EcalScDetId ?
88  unsigned int ScIdCheck = detid.rawId() & 0x00008000;
89  if (ScIdCheck == 0) {
90  stringstream value_s;
91  value_s << EEDetId(detid).ix();
92 
93  cell_node->setAttribute(cms::xerces::uStr(ix_tag.c_str()).ptr(), cms::xerces::uStr(value_s.str().c_str()).ptr());
94  value_s.str("");
95  value_s << EEDetId(detid).iy();
96 
97  cell_node->setAttribute(cms::xerces::uStr(iy_tag.c_str()).ptr(), cms::xerces::uStr(value_s.str().c_str()).ptr());
98  value_s.str("");
99  value_s << EEDetId(detid).zside();
100 
101  cell_node->setAttribute(cms::xerces::uStr(zside_tag.c_str()).ptr(),
102  cms::xerces::uStr(value_s.str().c_str()).ptr());
103  } else {
104  stringstream value_s;
105  value_s << EcalScDetId(detid).ix();
106 
107  cell_node->setAttribute(cms::xerces::uStr(ixSC_tag.c_str()).ptr(),
108  cms::xerces::uStr(value_s.str().c_str()).ptr());
109  value_s.str("");
110  value_s << EcalScDetId(detid).iy();
111 
112  cell_node->setAttribute(cms::xerces::uStr(iySC_tag.c_str()).ptr(),
113  cms::xerces::uStr(value_s.str().c_str()).ptr());
114  value_s.str("");
115  value_s << EcalScDetId(detid).zside();
116 
117  cell_node->setAttribute(cms::xerces::uStr(zside_tag.c_str()).ptr(),
118  cms::xerces::uStr(value_s.str().c_str()).ptr());
119  }
120 
121  } else if (detid.subdetId() == EcalTriggerTower) {
122  stringstream value_s;
123  value_s << EcalTrigTowerDetId(detid).ieta();
124 
125  cell_node->setAttribute(cms::xerces::uStr(iEta_tag.c_str()).ptr(), cms::xerces::uStr(value_s.str().c_str()).ptr());
126  value_s.str("");
127  value_s << EcalTrigTowerDetId(detid).iphi();
128 
129  cell_node->setAttribute(cms::xerces::uStr(iPhi_tag.c_str()).ptr(), cms::xerces::uStr(value_s.str().c_str()).ptr());
130  }
131  return cell_node;
132 }
int zside() const
Definition: EcalScDetId.h:64
int ieta() const
get the tower ieta
const std::string iySC_tag("iySC")
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
int ix() const
Definition: EEDetId.h:77
const std::string iEta_tag("iEta")
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
const std::string Cell_tag("cell")
const std::string ix_tag("ix")
ZStr< XMLCh > uStr(char const *str)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
int iy() const
Definition: EcalScDetId.h:76
const std::string iy_tag("iy")
int zside() const
Definition: EEDetId.h:71
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
const std::string zside_tag("zside")
const std::string ixSC_tag("ixSC")
int iphi() const
get the tower iphi
const std::string iPhi_tag("iPhi")
int iy() const
Definition: EEDetId.h:83
int ix() const
Definition: EcalScDetId.h:70

◆ writeHeader()

void xuti::writeHeader ( xercesc::DOMNode *  parentNode,
const EcalCondHeader header 
)

write

Parameters
headerunder
parentNode

Definition at line 151 of file DOMHelperFunctions.cc.

References RecoTauValidation_cfi::header, Header_datasourcetag(), Header_datetag(), Header_methodtag(), Header_sincetag(), Header_tag(), Header_tagtag(), Header_versiontag(), cms::xerces::uStr(), and WriteNodeWithValue().

Referenced by EcalTPGCrystalStatusXMLTranslator::dumpXML(), EcalTimeBiasCorrectionsXMLTranslator::dumpXML(), EcalClusterLocalContCorrXMLTranslator::dumpXML(), EcalTPGLinearizationConstXMLTranslator::dumpXML(), EcalTPGStripStatusXMLTranslator::dumpXML(), EcalTPGTowerStatusXMLTranslator::dumpXML(), ESGainXMLTranslator::dumpXML(), EcalDAQTowerStatusXMLTranslator::dumpXML(), EcalDCSTowerStatusXMLTranslator::dumpXML(), EcalPedestalsXMLTranslator::dumpXML(), EcalPulseShapesXMLTranslator::dumpXML(), EcalLinearCorrectionsXMLTranslator::dumpXML(), EcalAlignmentXMLTranslator::dumpXML(), EcalGainRatiosXMLTranslator::dumpXML(), EcalLaserAPDPNRatiosXMLTranslator::dumpXML(), EcalChannelStatusXMLTranslator::dumpXML(), EcalPulseSymmCovariancesXMLTranslator::dumpXML(), EcalClusterCrackCorrXMLTranslator::dumpXML(), EcalWeightGroupXMLTranslator::dumpXML(), EcalClusterEnergyCorrectionXMLTranslator::dumpXML(), EcalADCToGeVXMLTranslator::dumpXML(), EcalTimeOffsetXMLTranslator::dumpXML(), EcalClusterEnergyCorrectionObjectSpecificXMLTranslator::dumpXML(), EcalTBWeightsXMLTranslator::dumpXML(), EcalWeightSetXMLTranslator::dumpXML(), and EcalFloatCondObjectContainerXMLTranslator::dumpXML().

151  {
152  DOMElement* headernode = parentNode->getOwnerDocument()->createElement(cms::xerces::uStr(Header_tag.c_str()).ptr());
153  parentNode->appendChild(headernode);
154 
155  // write the actual header
156  WriteNodeWithValue(headernode, Header_methodtag, header.method_);
157  WriteNodeWithValue(headernode, Header_versiontag, header.version_);
158  WriteNodeWithValue(headernode, Header_datasourcetag, header.datasource_);
159  WriteNodeWithValue(headernode, Header_sincetag, header.since_);
160  WriteNodeWithValue(headernode, Header_tagtag, header.tag_);
161  WriteNodeWithValue(headernode, Header_datetag, header.date_);
162 }
const std::string Header_sincetag("since")
void WriteNodeWithValue(xercesc::DOMNode *parentNode, const std::string &tag, const T &value)
write a node with
const std::string Header_methodtag("method")
const std::string Header_datetag("date")
ZStr< XMLCh > uStr(char const *str)
const std::string Header_tagtag("tag")
const std::string Header_versiontag("version")
const std::string Header_tag("EcalCondHeader")
const std::string Header_datasourcetag("datasource")

◆ WriteNodeWithValue()

template<class T >
void xuti::WriteNodeWithValue ( xercesc::DOMNode *  parentNode,
const std::string &  tag,
const T value 
)

write a node with

Parameters
tagand
valueunder
parentNode

Definition at line 46 of file DOMHelperFunctions.h.

References hcalRecHitTable_cff::doc, makeGlobalPositionRcd_cfg::tag, cms::xerces::uStr(), and relativeConstraints::value.

Referenced by EcalTPGCrystalStatusXMLTranslator::dumpXML(), EcalTimeBiasCorrectionsXMLTranslator::dumpXML(), EcalClusterLocalContCorrXMLTranslator::dumpXML(), EcalTPGLinearizationConstXMLTranslator::dumpXML(), EcalTPGStripStatusXMLTranslator::dumpXML(), EcalTPGTowerStatusXMLTranslator::dumpXML(), ESGainXMLTranslator::dumpXML(), EcalDAQTowerStatusXMLTranslator::dumpXML(), EcalPulseShapesXMLTranslator::dumpXML(), EcalDCSTowerStatusXMLTranslator::dumpXML(), EcalPedestalsXMLTranslator::dumpXML(), EcalAlignmentXMLTranslator::dumpXML(), EcalLinearCorrectionsXMLTranslator::dumpXML(), EcalChannelStatusXMLTranslator::dumpXML(), EcalLaserAPDPNRatiosXMLTranslator::dumpXML(), EcalGainRatiosXMLTranslator::dumpXML(), EcalWeightGroupXMLTranslator::dumpXML(), EcalPulseSymmCovariancesXMLTranslator::dumpXML(), EcalClusterCrackCorrXMLTranslator::dumpXML(), EcalClusterEnergyCorrectionXMLTranslator::dumpXML(), EcalADCToGeVXMLTranslator::dumpXML(), EcalTimeOffsetXMLTranslator::dumpXML(), EcalClusterEnergyCorrectionObjectSpecificXMLTranslator::dumpXML(), EcalTBWeightsXMLTranslator::dumpXML(), EcalFloatCondObjectContainerXMLTranslator::dumpXML(), and writeHeader().

46  {
47  xercesc::DOMDocument* doc = parentNode->getOwnerDocument();
48  xercesc::DOMElement* new_node = doc->createElement(cms::xerces::uStr(tag.c_str()).ptr());
49  parentNode->appendChild(new_node);
50 
51  std::stringstream value_ss;
52  value_ss << value;
53 
54  xercesc::DOMText* tvalue = doc->createTextNode(cms::xerces::uStr(value_ss.str().c_str()).ptr());
55  new_node->appendChild(tvalue);
56  }
ZStr< XMLCh > uStr(char const *str)

◆ x_tag()

const std::string xuti::x_tag ( "x"  )

◆ y_tag()

const std::string xuti::y_tag ( "y"  )

◆ z_tag()

const std::string xuti::z_tag ( "z"  )

◆ zside_tag()

const std::string xuti::zside_tag ( "zside"  )

Referenced by readCellId(), and writeCell().