File indexing completed on 2024-04-06 11:58:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "CalibFormats/SiStripObjects/interface/SiStripDetInfo.h"
0017 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0018
0019 const std::pair<unsigned short, double> SiStripDetInfo::getNumberOfApvsAndStripLength(uint32_t detId) const {
0020 std::map<uint32_t, DetInfo>::const_iterator it = detData_.find(detId);
0021
0022 if (it != detData_.end()) {
0023 return std::pair<unsigned short, double>(it->second.nApvs, it->second.stripLength);
0024
0025 } else {
0026 std::pair<unsigned short, double> defaultValue(0, 0.);
0027 edm::LogWarning(
0028 "SiStripDetInfoFileReader::getNumberOfApvsAndStripLength - Unable to find requested detid. Returning invalid "
0029 "data ")
0030 << std::endl;
0031 return defaultValue;
0032 }
0033 }
0034
0035 const float& SiStripDetInfo::getThickness(uint32_t detId) const {
0036 std::map<uint32_t, DetInfo>::const_iterator it = detData_.find(detId);
0037
0038 if (it != detData_.end()) {
0039 return it->second.thickness;
0040
0041 } else {
0042 static const float defaultValue = 0;
0043 edm::LogWarning("SiStripDetInfo::getThickness - Unable to find requested detid. Returning invalid data ")
0044 << std::endl;
0045 return defaultValue;
0046 }
0047 }