CMS 3D CMS Logo

SiStripGainFromAsciiFile.h
Go to the documentation of this file.
1 #ifndef CalibTracker_SiStripChannelGain_SiStripGainFromAsciiFile_h
2 #define CalibTracker_SiStripChannelGain_SiStripGainFromAsciiFile_h
3 
5 
8 
9 #include <vector>
10 #include <memory>
11 #include <unordered_map>
12 
13 class SiStripGainFromAsciiFile : public ConditionDBWriter<SiStripApvGain> {
14 public:
16  ~SiStripGainFromAsciiFile() override;
17 
18 private:
19  std::unique_ptr<SiStripApvGain> getNewObject() override;
20 
21 private:
22  struct ModuleGain {
23  float apv[6];
24 
25  void soft_reset() {
26  for (int i = 0; i < 6; ++i)
27  if (apv[i] == -1)
28  apv[i] = 1;
29  }
30  void hard_reset(float val) {
31  for (int i = 0; i < 6; ++i)
32  apv[i] = val;
33  }
34  };
35 
39 
40  std::unordered_map<unsigned int, ModuleGain> GainsMap;
41 };
42 #endif
SiStripGainFromAsciiFile(const edm::ParameterSet &)
std::unique_ptr< SiStripApvGain > getNewObject() override
std::unordered_map< unsigned int, ModuleGain > GainsMap