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 // $Id: SiStripDetInfoFileReader.h,v 1.4 2008/09/19 16:53:10 giordano Exp $
19 //
20 //
21 
22 #include <map>
23 #include <vector>
24 #include <string>
25 #include <iostream>
26 #include <fstream>
27 #include <boost/cstdint.hpp>
30 
32 
33 public:
34 
35  struct DetInfo{
36 
37  DetInfo(){};
38  DetInfo(unsigned short _nApvs, double _stripLength, float _thickness):
39  nApvs(_nApvs),stripLength(_stripLength),thickness(_thickness){};
40 
41  unsigned short nApvs;
42  double stripLength;
43  float thickness;
44  };
45 
48  const edm::ActivityRegistry&);
49 
50  explicit SiStripDetInfoFileReader(std::string filePath);
52 
54 
56 
57  const std::vector<uint32_t> & getAllDetIds() const {return detIds_;}
58 
59  const std::pair<unsigned short, double> getNumberOfApvsAndStripLength(uint32_t detId) const;
60 
61  const float & getThickness(uint32_t detId) const;
62 
63  const std::map<uint32_t, DetInfo > & getAllData() const {return detData_;}
64 
65 
66 private:
67 
68  void reader(std::string filePath);
69 
70  std::ifstream inputFile_;
71  // std::string filePath_;
72 
73  std::map<uint32_t, DetInfo> detData_;
74  // std::map<uint32_t, std::pair<unsigned short, double> > detData_;
75  //std::map<uint32_t, float > detThickness_;
76  std::vector<uint32_t> detIds_;
77 
78 };
79 #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)