14 std::map<uint32_t, DetInfo> detData_;
15 std::vector<uint32_t> detIds_;
18 inputFile.open(filePath.c_str());
20 if (inputFile.is_open()) {
24 unsigned short numberOfAPVs;
27 inputFile >> detid >> numberOfAPVs >> stripLength >>
thickness;
29 if (!(inputFile.eof() || inputFile.fail())) {
30 detIds_.push_back(detid);
37 if (detData_.find(detid) == detData_.end()) {
38 detData_[detid] =
DetInfo(numberOfAPVs, stripLength, thickness);
40 edm::LogError(
"SiStripDetInfoFileReader::SiStripDetInfoFileReader")
41 <<
"DetId " << detid <<
" already found on file. Ignoring new data";
46 }
else if (inputFile.eof()) {
47 edm::LogInfo(
"SiStripDetInfoFileReader::SiStripDetInfoFileReader - END of file reached");
50 }
else if (inputFile.fail()) {
51 edm::LogError(
"SiStripDetInfoFileReader::SiStripDetInfoFileReader - ERROR while reading file");
57 edm::LogError(
"SiStripDetInfoFileReader::SiStripDetInfoFileReader - Unable to open file");
SiStripDetInfo::DetInfo DetInfo
string filePath
DQM Environment
Log< level::Error, false > LogError
SiStripDetInfo read(std::string filePath)
Log< level::Info, false > LogInfo