Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-17 23:36:00

0001 #include "CondFormats/SiPixelObjects/interface/SiPixelLorentzAngle.h"
0002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0003 
0004 bool SiPixelLorentzAngle::putLorentzAngle(const uint32_t& detid, float& value) {
0005   std::map<unsigned int, float>::const_iterator id = m_LA.find(detid);
0006   if (id != m_LA.end()) {
0007     edm::LogError("SiPixelLorentzAngle") << "SiPixelLorentzAngle for DetID " << detid
0008                                          << " is already stored. Skipping this put" << std::endl;
0009     return false;
0010   } else
0011     m_LA[detid] = value;
0012   return true;
0013 }
0014 float SiPixelLorentzAngle::getLorentzAngle(const uint32_t& detid) const {
0015   std::map<unsigned int, float>::const_iterator id = m_LA.find(detid);
0016   if (id != m_LA.end())
0017     return id->second;
0018   else {
0019     edm::LogError("SiPixelLorentzAngle") << "SiPixelLorentzAngle for DetID " << detid << " is not stored" << std::endl;
0020   }
0021   return 0;
0022 }