16 detData_ =
copy.detData_;
17 detIds_ =
copy.detIds_;
23 pset.getUntrackedParameter<
std::string>(
"filePath",
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"));
28 detData_ =
copy.detData_;
29 detIds_ =
copy.detIds_;
46 if (inputFile_.is_open()) {
50 unsigned short numberOfAPVs;
53 inputFile_ >> detid >> numberOfAPVs >> stripLength >>
thickness;
55 if (!(inputFile_.eof() || inputFile_.fail())) {
56 detIds_.push_back(detid);
63 std::map<uint32_t, DetInfo>::const_iterator it = detData_.find(detid);
65 if (it == detData_.end()) {
68 edm::LogError(
"SiStripDetInfoFileReader::SiStripDetInfoFileReader")
69 <<
"DetId " << detid <<
" already found on file. Ignoring new data" << endl;
74 }
else if (inputFile_.eof()) {
75 edm::LogInfo(
"SiStripDetInfoFileReader::SiStripDetInfoFileReader - END of file reached") << endl;
78 }
else if (inputFile_.fail()) {
79 edm::LogError(
"SiStripDetInfoFileReader::SiStripDetInfoFileReader - ERROR while reading file") << endl;
87 edm::LogError(
"SiStripDetInfoFileReader::SiStripDetInfoFileReader - Unable to open file") << endl;
102 std::map<uint32_t, DetInfo>::const_iterator it = detData_.find(detId);
104 if (it != detData_.end()) {
105 return std::pair<unsigned short, double>(it->second.nApvs, it->second.stripLength);
110 "SiStripDetInfoFileReader::getNumberOfApvsAndStripLength - Unable to find requested detid. Returning invalid "
118 std::map<uint32_t, DetInfo>::const_iterator it = detData_.find(detId);
120 if (it != detData_.end()) {
121 return it->second.thickness;
125 edm::LogWarning(
"SiStripDetInfoFileReader::getThickness - Unable to find requested detid. Returning invalid data ")