25 inputFile_.open(filePath.c_str());
27 if (inputFile_.is_open()){
35 inputFile_ >> detid >> ncols >> nrows ;
37 if (!(inputFile_.eof() || inputFile_.fail())){
39 detIds_.push_back(detid);
46 std::map<uint32_t, std::pair<int, int> >::const_iterator it = detData_.find(detid);
48 if( it==detData_.end() ){
50 detData_[detid]=pair<int, int>(ncols,nrows);
54 edm::LogError(
"SiPixelDetInfoFileReader::SiPixelDetInfoFileReader") <<
"DetId " << detid <<
" already found on file. Ignoring new data"<<endl;
59 else if (inputFile_.eof()){
61 edm::LogInfo(
"SiPixelDetInfoFileReader::SiPixelDetInfoFileReader - END of file reached")<<endl;
65 else if (inputFile_.fail()) {
67 edm::LogError(
"SiPixelDetInfoFileReader::SiPixelDetInfoFileReader - ERROR while reading file")<<endl;
77 edm::LogError(
"SiPixelDetInfoFileReader::SiPixelDetInfoFileReader - Unable to open file")<<endl;
97 edm::LogInfo(
"SiPixelDetInfoFileReader::~SiPixelDetInfoFileReader");
112 std::map<uint32_t, std::pair<int, int> >::const_iterator it = detData_.find(detId);
114 if(it!=detData_.end()){
121 static std::pair< int, int> defaultValue(0,0);
122 edm::LogWarning(
"SiPixelDetInfoFileReader::getDetUnitDimensions - Unable to find requested detid. Returning invalid data ")<<endl;
const std::pair< int, int > & getDetUnitDimensions(uint32_t detId) const
const std::vector< uint32_t > & getAllDetIds() const
SiPixelDetInfoFileReader(std::string filePath)
~SiPixelDetInfoFileReader()