Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-15 22:42:21

0001 #ifndef CalibTracker_SiPixelESProducers_SiPixelDetInfoFileReader_h
0002 #define CalibTracker_SiPixelESProducers_SiPixelDetInfoFileReader_h
0003 // -*- C++ -*-
0004 //
0005 // Package:    SiPixelDetInfoFileReader
0006 // Class:      SiPixelDetInfoFileReader
0007 //
0008 /**\class SiPixelDetInfoFileReader SiPixelDetInfoFileReader.cc CalibTracker/SiPixelCommon/src/SiPixelDetInfoFileReader.cc
0009 
0010  Description: <one line class summary>
0011 
0012  Implementation:
0013      <Notes on implementation>
0014 */
0015 //
0016 // Original Author:  V.Chiochia
0017 //         Created:  Mon Nov 20 10:04:31 CET 2006
0018 //
0019 //
0020 
0021 #include <map>
0022 #include <vector>
0023 #include <string>
0024 #include <iostream>
0025 #include <fstream>
0026 #include <cstdint>
0027 
0028 class SiPixelDetInfoFileReader {
0029 public:
0030   explicit SiPixelDetInfoFileReader(std::string filePath);
0031   ~SiPixelDetInfoFileReader();
0032 
0033   const std::vector<uint32_t>& getAllDetIds() const;
0034   const std::pair<int, int>& getDetUnitDimensions(uint32_t detId) const;
0035 
0036   constexpr static char const* const kPh0DefaultFile = "CalibTracker/SiPixelESProducers/data/PixelSkimmedGeometry.txt";
0037   constexpr static char const* const kPh1DefaultFile =
0038       "SLHCUpgradeSimulations/Geometry/data/PhaseI/PixelSkimmedGeometry_phase1.txt";
0039 
0040 private:
0041   std::ifstream inputFile_;
0042   //  std::string filePath_;
0043 
0044   std::map<uint32_t, std::pair<int, int> > detData_;
0045   std::vector<uint32_t> detIds_;
0046 };
0047 #endif