1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "CondFormats/SiPixelObjects/interface/SiPixelLorentzAngle.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
bool SiPixelLorentzAngle::putLorentzAngle(const uint32_t& detid, float& value) {
std::map<unsigned int, float>::const_iterator id = m_LA.find(detid);
if (id != m_LA.end()) {
edm::LogError("SiPixelLorentzAngle") << "SiPixelLorentzAngle for DetID " << detid
<< " is already stored. Skipping this put" << std::endl;
return false;
} else
m_LA[detid] = value;
return true;
}
float SiPixelLorentzAngle::getLorentzAngle(const uint32_t& detid) const {
std::map<unsigned int, float>::const_iterator id = m_LA.find(detid);
if (id != m_LA.end())
return id->second;
else {
edm::LogError("SiPixelLorentzAngle") << "SiPixelLorentzAngle for DetID " << detid << " is not stored" << std::endl;
}
return 0;
}
|