File indexing completed on 2024-04-06 11:59:32
0001 #ifndef CalibTracker_SiPixelESProducers_SiPixelDetInfoFileReader_h
0002 #define CalibTracker_SiPixelESProducers_SiPixelDetInfoFileReader_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
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
0043
0044 std::map<uint32_t, std::pair<int, int> > detData_;
0045 std::vector<uint32_t> detIds_;
0046 };
0047 #endif