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:
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
SiStripDetInfoFileReader::detIds_
std::vector< uint32_t > detIds_
Definition: SiStripDetInfoFileReader.h:69
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
SiStripDetInfoFileReader
Definition: SiStripDetInfoFileReader.h:30
SiStripDetInfoFileReader::DetInfo::stripLength
double stripLength
Definition: SiStripDetInfoFileReader.h:38
SiStripDetInfoFileReader::operator=
SiStripDetInfoFileReader & operator=(const SiStripDetInfoFileReader &copy)
Definition: SiStripDetInfoFileReader.cc:15
SiStripDetInfoFileReader::DetInfo::nApvs
unsigned short nApvs
Definition: SiStripDetInfoFileReader.h:35
Service.h
SiStripDetInfoFileReader::getThickness
const float & getThickness(uint32_t detId) const
Definition: SiStripDetInfoFileReader.cc:117
edm::ActivityRegistry
Definition: ActivityRegistry.h:134
dt4ml_dqm_sourceclient-live_cfg.filePath
filePath
CUSTOMIZE FOR ML.
Definition: dt4ml_dqm_sourceclient-live_cfg.py:45
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripDetInfoFileReader::DetInfo
Definition: SiStripDetInfoFileReader.h:32
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripDetInfoFileReader::reader
void reader(std::string filePath)
Definition: SiStripDetInfoFileReader.cc:34
SiStripDetInfoFileReader::inputFile_
std::ifstream inputFile_
Definition: SiStripDetInfoFileReader.h:63
SiStripDetInfoFileReader::DetInfo::DetInfo
DetInfo()
Definition: SiStripDetInfoFileReader.h:33
SiStripDetInfoFileReader::getAllDetIds
const std::vector< uint32_t > & getAllDetIds() const
Definition: SiStripDetInfoFileReader.h:52
SiStripDetInfoFileReader::SiStripDetInfoFileReader
SiStripDetInfoFileReader()
Definition: SiStripDetInfoFileReader.h:42
SiStripDetInfoFileReader::getNumberOfApvsAndStripLength
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
Definition: SiStripDetInfoFileReader.cc:101
SiStripDetInfoFileReader::getAllData
const std::map< uint32_t, DetInfo > & getAllData() const
Definition: SiStripDetInfoFileReader.h:58
SiStripDetInfoFileReader::~SiStripDetInfoFileReader
~SiStripDetInfoFileReader()
Definition: SiStripDetInfoFileReader.cc:99
SiStripDetInfoFileReader::DetInfo::thickness
float thickness
Definition: SiStripDetInfoFileReader.h:39
ParameterSet.h
SiStripDetInfoFileReader::DetInfo::DetInfo
DetInfo(unsigned short _nApvs, double _stripLength, float _thickness)
Definition: SiStripDetInfoFileReader.h:34
SiStripDetInfoFileReader::detData_
std::map< uint32_t, DetInfo > detData_
Definition: SiStripDetInfoFileReader.h:66