CMS 3D CMS Logo

Public Member Functions | Private Attributes

HcalConstantsXMLWriter Class Reference

#include <HcalConstantsXMLWriter.h>

List of all members.

Public Member Functions

 HcalConstantsXMLWriter ()
void newCellLine (xercesc::DOMElement *, int, int, int, int, float)
void writeXML (std::string &, std::vector< int >, std::vector< int >, std::vector< int >, std::vector< int >, std::vector< float >)
virtual ~HcalConstantsXMLWriter ()

Private Attributes

std::string hcalfileOut_
xercesc::DOMDocument * mDoc
xercesc::DOMImplementation * mDom

Detailed Description

Definition at line 19 of file HcalConstantsXMLWriter.h.


Constructor & Destructor Documentation

HcalConstantsXMLWriter::HcalConstantsXMLWriter ( )

Definition at line 22 of file HcalConstantsXMLWriter.cc.

{
}
HcalConstantsXMLWriter::~HcalConstantsXMLWriter ( ) [virtual]

Definition at line 25 of file HcalConstantsXMLWriter.cc.

{
}

Member Function Documentation

void HcalConstantsXMLWriter::newCellLine ( xercesc::DOMElement *  ,
int  ,
int  ,
int  ,
int  ,
float   
)

Definition at line 81 of file HcalConstantsXMLWriter.cc.

References eta(), and phi.

{
   XMLCh tempStr[100]; 
   XMLString::transcode("det_index", tempStr, 99);
   DOMAttr* attrdet = mDoc->createAttribute(tempStr);

   XMLString::transcode("eta_index", tempStr, 99);
   DOMAttr* attreta = mDoc->createAttribute(tempStr);
 
   XMLString::transcode("phi_index", tempStr, 99);
   DOMAttr* attrphi = mDoc->createAttribute(tempStr) ;
   
   XMLString::transcode("depth_index", tempStr, 99);
   DOMAttr* attrdepth =  mDoc->createAttribute(tempStr) ;

   XMLString::transcode("scale_factor", tempStr, 99);
   DOMAttr* attrscale =  mDoc->createAttribute(tempStr) ; 
 
   ostringstream ost;
   ost <<det;
   attrdet->setValue(XMLString::transcode(ost.str().c_str()));
   detelem->setAttributeNode(attrdet);

   ostringstream ost1;
   ost1 <<eta;
   attreta->setValue(XMLString::transcode(ost1.str().c_str()));
   //DOMAttr* attr3 = detelem->setAttributeNode(attreta);
   detelem->setAttributeNode(attreta);

   ostringstream ost2;
   ost2 <<phi;
   attrphi->setValue(XMLString::transcode(ost2.str().c_str()));
   //DOMAttr* attr4 = detelem->setAttributeNode(attrphi);
   detelem->setAttributeNode(attrphi);

   ostringstream ost3;
   ost3 <<depth;     
   attrdepth->setValue(XMLString::transcode(ost3.str().c_str()));
   //DOMAttr* attr5 = detelem->setAttributeNode(attrdepth);
   detelem->setAttributeNode(attrdepth);

   ostringstream ost4;
   ost4 << scale;
   attrscale->setValue(XMLString::transcode(ost4.str().c_str()));
   //DOMAttr* attr6 = detelem->setAttributeNode(attrscale);
   detelem->setAttributeNode(attrscale);

}
void HcalConstantsXMLWriter::writeXML ( std::string &  ,
std::vector< int >  ,
std::vector< int >  ,
std::vector< int >  ,
std::vector< int >  ,
std::vector< float >   
)

Member Data Documentation

std::string HcalConstantsXMLWriter::hcalfileOut_ [private]

Definition at line 29 of file HcalConstantsXMLWriter.h.

xercesc::DOMDocument* HcalConstantsXMLWriter::mDoc [private]

Definition at line 31 of file HcalConstantsXMLWriter.h.

xercesc::DOMImplementation* HcalConstantsXMLWriter::mDom [private]

Definition at line 30 of file HcalConstantsXMLWriter.h.