CMS 3D CMS Logo

SiStripDetInfoFileReader.h
Go to the documentation of this file.
1 #ifndef CalibTracker_SiStripChannelGain_SiStripDetInfoFileReader_h
2 #define CalibTracker_SiStripChannelGain_SiStripDetInfoFileReader_h
3 // -*- C++ -*-
4 //
5 // Package: SiStripDetInfoFileReader
6 // Class: SiStripDetInfoFileReader
7 //
15 //
16 // Original Author: G. Bruno
17 // Created: Mon Nov 20 10:04:31 CET 2006
18 //
19 //
20 
21 #include <map>
22 #include <vector>
23 #include <string>
24 #include <iostream>
25 #include <fstream>
28 #include <cstdint>
29 
31 public:
32  struct DetInfo {
33  DetInfo(){};
34  DetInfo(unsigned short _nApvs, double _stripLength, float _thickness)
35  : nApvs(_nApvs), stripLength(_stripLength), thickness(_thickness){};
36 
37  unsigned short nApvs;
38  double stripLength;
39  float thickness;
40  };
41 
44 
47 
49 
51 
52  const std::vector<uint32_t>& getAllDetIds() const { return detIds_; }
53 
54  const std::pair<unsigned short, double> getNumberOfApvsAndStripLength(uint32_t detId) const;
55 
56  const float& getThickness(uint32_t detId) const;
57 
58  const std::map<uint32_t, DetInfo>& getAllData() const { return detData_; }
59 
60 private:
61  void reader(std::string filePath);
62 
63  std::ifstream inputFile_;
64  // std::string filePath_;
65 
66  std::map<uint32_t, DetInfo> detData_;
67  // std::map<uint32_t, std::pair<unsigned short, double> > detData_;
68  //std::map<uint32_t, float > detThickness_;
69  std::vector<uint32_t> detIds_;
70 };
71 #endif
const float & getThickness(uint32_t detId) const
std::map< uint32_t, DetInfo > detData_
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
DetInfo(unsigned short _nApvs, double _stripLength, float _thickness)
const std::vector< uint32_t > & getAllDetIds() const
SiStripDetInfoFileReader & operator=(const SiStripDetInfoFileReader &copy)
std::vector< uint32_t > detIds_
const std::map< uint32_t, DetInfo > & getAllData() const
void reader(std::string filePath)