26 inputFile_.open(filePath.c_str());
28 if (inputFile_.is_open()){
36 inputFile_ >> detid >> ncols >> nrows ;
38 if (!(inputFile_.eof() || inputFile_.fail())){
40 detIds_.push_back(detid);
47 std::map<uint32_t, std::pair<int, int> >::const_iterator it = detData_.find(detid);
49 if( it==detData_.end() ){
51 detData_[
detid]=pair<int, int>(ncols,nrows);
55 edm::LogError(
"SiPixelDetInfoFileReader::SiPixelDetInfoFileReader") <<
"DetId " << detid <<
" already found on file. Ignoring new data"<<endl;
60 else if (inputFile_.eof()){
62 edm::LogInfo(
"SiPixelDetInfoFileReader::SiPixelDetInfoFileReader - END of file reached")<<endl;
66 else if (inputFile_.fail()) {
68 edm::LogError(
"SiPixelDetInfoFileReader::SiPixelDetInfoFileReader - ERROR while reading file")<<endl;
78 edm::LogError(
"SiPixelDetInfoFileReader::SiPixelDetInfoFileReader - Unable to open file")<<endl;
98 edm::LogInfo(
"SiPixelDetInfoFileReader::~SiPixelDetInfoFileReader");
113 std::map<uint32_t, std::pair<int, int> >::const_iterator it = detData_.find(detId);
115 if(it!=detData_.end()){
122 static std::pair< int, int> defaultValue(0,0);
123 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()