CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/CalibCalorimetry/CaloMiscalibTools/src/MiscalibReaderXMLHcal.cc

Go to the documentation of this file.
00001 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00002 #include "CalibCalorimetry/CaloMiscalibTools/interface/MiscalibReaderFromXMLHcal.h"
00003 
00004 
00005 
00006 DetId MiscalibReaderFromXMLHcal::parseCellEntry(XERCES_CPP_NAMESPACE::DOMNamedNodeMap *attribute)
00007 {
00008 
00009 HcalDetId cell= MiscalibReaderFromXMLHcal::getCellFromAttributes(
00010                                             getIntAttribute(attribute,"det_index"),
00011                                             getIntAttribute(attribute,"eta_index"),
00012                                             getIntAttribute(attribute,"phi_index"),
00013                                             getIntAttribute(attribute,"depth_index")
00014                                             );
00015 return cell;
00016 }
00017 
00018 HcalDetId MiscalibReaderFromXMLHcal::getCellFromAttributes(int idet, int ieta, int iphi, int idepth)
00019 {
00020   try
00021     {
00022       HcalDetId cell((HcalSubdetector) idet, ieta, iphi, idepth);
00023       return cell;
00024     }
00025   catch (...)
00026     {
00027       std::cout << "Null coordinates = "<< idet << "," << ieta << "," << iphi << "," << idepth << std::endl;
00028       return HcalDetId(0);
00029     }
00030 }
00031