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 
15 public:
16 
18  ~SiStripGainFromAsciiFile() override;
19 
20 private:
21 
22  std::unique_ptr<SiStripApvGain> getNewObject() override;
23 
24 private:
25 
26  struct ModuleGain{
27  float apv[6];
28 
29  void soft_reset(){ for (int i=0;i<6;++i) if(apv[i]==-1)apv[i]=1; }
30  void hard_reset(float val){ for (int i=0;i<6;++i) apv[i]=val; }
31 
32  };
33 
37 
38  std::unordered_map< unsigned int,ModuleGain> GainsMap;
39 
40 };
41 #endif
SiStripGainFromAsciiFile(const edm::ParameterSet &)
std::unique_ptr< SiStripApvGain > getNewObject() override
std::unordered_map< unsigned int, ModuleGain > GainsMap