00001 #include "CondFormats/SiStripObjects/interface/SiStripLorentzAngle.h" 00002 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00003 00004 bool SiStripLorentzAngle::putLorentzAngle(const uint32_t& detid, float& value){ 00005 std::map<unsigned int,float>::const_iterator id=m_LA.find(detid); 00006 if(id!=m_LA.end()){ 00007 edm::LogError("SiStripLorentzAngle") << "SiStripLorentzAngle for DetID " << detid << " is already stored. Skippig this put" << std::endl; 00008 return false; 00009 } 00010 else m_LA[detid]=value; 00011 return true; 00012 } 00013 const float& SiStripLorentzAngle::getLorentzAngle(const uint32_t& detid) const { 00014 std::map<unsigned int,float>::const_iterator id=m_LA.find(detid); 00015 if(id!=m_LA.end()) return id->second; 00016 else { 00017 edm::LogError("SiStripLorentzAngle") << "SiStripLorentzAngle for DetID " << detid << " is not stored" << std::endl; 00018 } 00019 static float temp = 0.; // added by R.B. 00020 return temp; 00021 }