25 if (inputFile_.is_open()) {
31 inputFile_ >> detid >>
ncols >> nrows;
33 if (!(inputFile_.eof() || inputFile_.fail())) {
34 detIds_.push_back(detid);
41 std::map<uint32_t, std::pair<int, int> >::const_iterator it = detData_.find(detid);
43 if (it == detData_.end()) {
44 detData_[detid] = pair<int, int>(
ncols, nrows);
47 edm::LogError(
"SiPixelDetInfoFileReader::SiPixelDetInfoFileReader")
48 <<
"DetId " << detid <<
" already found on file. Ignoring new data" << endl;
52 }
else if (inputFile_.eof()) {
53 edm::LogInfo(
"SiPixelDetInfoFileReader::SiPixelDetInfoFileReader - END of file reached") << endl;
56 }
else if (inputFile_.fail()) {
57 edm::LogError(
"SiPixelDetInfoFileReader::SiPixelDetInfoFileReader - ERROR while reading file") << endl;
65 edm::LogError(
"SiPixelDetInfoFileReader::SiPixelDetInfoFileReader - Unable to open file") << endl;
80 edm::LogInfo(
"SiPixelDetInfoFileReader::~SiPixelDetInfoFileReader");
90 std::map<uint32_t, std::pair<int, int> >::const_iterator it = detData_.find(detId);
92 if (it != detData_.end()) {
96 static const std::pair<int, int> defaultValue(0, 0);
98 "SiPixelDetInfoFileReader::getDetUnitDimensions - Unable to find requested detid. Returning invalid data ")