CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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>
26 #include <boost/cstdint.hpp>
29 
31 
32 public:
33 
34  struct DetInfo{
35 
36  DetInfo(){};
37  DetInfo(unsigned short _nApvs, double _stripLength, float _thickness):
38  nApvs(_nApvs),stripLength(_stripLength),thickness(_thickness){};
39 
40  unsigned short nApvs;
41  double stripLength;
42  float thickness;
43  };
44 
47  const edm::ActivityRegistry&);
48 
49  explicit SiStripDetInfoFileReader(std::string filePath);
51 
53 
55 
56  const std::vector<uint32_t> & getAllDetIds() const {return detIds_;}
57 
58  const std::pair<unsigned short, double> getNumberOfApvsAndStripLength(uint32_t detId) const;
59 
60  const float & getThickness(uint32_t detId) const;
61 
62  const std::map<uint32_t, DetInfo > & getAllData() const {return detData_;}
63 
64 
65 private:
66 
67  void reader(std::string filePath);
68 
69  std::ifstream inputFile_;
70  // std::string filePath_;
71 
72  std::map<uint32_t, DetInfo> detData_;
73  // std::map<uint32_t, std::pair<unsigned short, double> > detData_;
74  //std::map<uint32_t, float > detThickness_;
75  std::vector<uint32_t> detIds_;
76 
77 };
78 #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::map< uint32_t, DetInfo > & getAllData() const
const std::vector< uint32_t > & getAllDetIds() const
SiStripDetInfoFileReader & operator=(const SiStripDetInfoFileReader &copy)
std::vector< uint32_t > detIds_
void reader(std::string filePath)