Go to the documentation of this file.00001 #ifndef CalibTracker_SiStripESProducers_SiStripNoisesGenerator_H
00002 #define CalibTracker_SiStripESProducers_SiStripNoisesGenerator_H
00003
00004 #include "FWCore/Framework/interface/Frameworkfwd.h"
00005 #include "FWCore/ServiceRegistry/interface/Service.h"
00006 #include "CondTools/SiStrip/interface/SiStripCondObjBuilderBase.h"
00007 #include "CondFormats/SiStripObjects/interface/SiStripNoises.h"
00008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00009 #include <string>
00010 #include <map>
00011
00012 class SiStripNoisesGenerator : public SiStripCondObjBuilderBase<SiStripNoises> {
00013 public:
00014
00015 explicit SiStripNoisesGenerator(const edm::ParameterSet&,const edm::ActivityRegistry&);
00016 ~SiStripNoisesGenerator();
00017
00018 void getObj(SiStripNoises* & obj){createObject(); obj=obj_;}
00019
00020 private:
00021
00022 void createObject();
00024 std::pair<int, int> subDetAndLayer(const uint32_t detit) const;
00026 void fillParameters(std::map<int, std::vector<double> > & mapToFill, const std::string & parameterName) const;
00034 void fillSubDetParameter(std::map<int, std::vector<double> > & mapToFill, const std::vector<double> & v, const int subDet, const unsigned short layers) const;
00035
00036 inline void printLog(const uint32_t detId, const unsigned short strip, const double & noise) const
00037 {
00038 edm::LogInfo("SiStripNoisesDummyCalculator") << "detid: " << detId << " strip: " << strip << " noise: " << noise << " \t" << std::endl;
00039 }
00040
00041 double electronsPerADC_;
00042 double minimumPosValue_;
00043 bool stripLengthMode_;
00044 uint32_t printDebug_;
00045 };
00046
00047 #endif