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::ModuleGain::soft_reset
void soft_reset()
Definition: SiStripGainFromAsciiFile.h:25
mps_fire.i
i
Definition: mps_fire.py:355
SiStripGainFromAsciiFile::fp_
edm::FileInPath fp_
Definition: SiStripGainFromAsciiFile.h:38
SiStripGainFromAsciiFile::SiStripGainFromAsciiFile
SiStripGainFromAsciiFile(const edm::ParameterSet &)
Definition: SiStripGainFromAsciiFile.cc:13
SiStripGainFromAsciiFile::getNewObject
std::unique_ptr< SiStripApvGain > getNewObject() override
Definition: SiStripGainFromAsciiFile.cc:25
SiStripGainFromAsciiFile::GainsMap
std::unordered_map< unsigned int, ModuleGain > GainsMap
Definition: SiStripGainFromAsciiFile.h:40
SiStripGainFromAsciiFile::Asciifilename_
std::string Asciifilename_
Definition: SiStripGainFromAsciiFile.h:36
FileInPath.h
edm::FileInPath
Definition: FileInPath.h:64
ConditionDBWriter
Definition: ConditionDBWriter.h:149
SiStripGainFromAsciiFile::ModuleGain::hard_reset
void hard_reset(float val)
Definition: SiStripGainFromAsciiFile.h:30
SiStripApvGain.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripGainFromAsciiFile::ModuleGain
Definition: SiStripGainFromAsciiFile.h:22
edm::ParameterSet
Definition: ParameterSet.h:36
SiStripGainFromAsciiFile
Definition: SiStripGainFromAsciiFile.h:13
ConditionDBWriter.h
SiStripGainFromAsciiFile::~SiStripGainFromAsciiFile
~SiStripGainFromAsciiFile() override
Definition: SiStripGainFromAsciiFile.cc:21
heppy_batch.val
val
Definition: heppy_batch.py:351
SiStripGainFromAsciiFile::referenceValue_
float referenceValue_
Definition: SiStripGainFromAsciiFile.h:37
SiStripGainFromAsciiFile::ModuleGain::apv
float apv[6]
Definition: SiStripGainFromAsciiFile.h:23