17 #include "CLHEP/Random/RandFlat.h" 18 #include "CLHEP/Random/RandGauss.h" 34 : fp_(iConfig.getUntrackedParameter<
edm::FileInPath>(
"file",
36 printdebug_(iConfig.getUntrackedParameter<uint32_t>(
"printDebug", 1)) {}
41 edm::LogInfo(
"SiStripNoisesBuilder") <<
"... creating dummy SiStripNoises Data for Run " <<
run <<
"\n " << std::endl;
48 const auto& DetInfos =
reader.getAllData();
50 for (
const auto& it : DetInfos) {
51 const auto& nAPVs = it.second.nApvs;
59 float noise = CLHEP::RandGauss::shoot(MeanNoise, RmsNoise);
64 obj.setData(
noise, theSiStripVector);
67 <<
"detid " << it.first <<
" \t" 68 <<
" strip " <<
strip <<
" \t" <<
noise <<
" \t" << theSiStripVector.back() / 10 <<
" \t" << std::endl;
70 if (!
obj.put(it.first, theSiStripVector))
71 edm::LogError(
"SiStripNoisesBuilder") <<
"[SiStripNoisesBuilder::analyze] detid already exists" << std::endl;
84 edm::LogError(
"SiStripNoisesBuilder") <<
"Service is unavailable" << std::endl;
std::string fullPath() const
void analyze(const edm::Event &, const edm::EventSetup &) override
cond::Time_t beginOfTime() const
std::vector< uint16_t > InputVector
Log< level::Error, false > LogError
SiStripNoisesBuilder(const edm::ParameterSet &iConfig)
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
const edm::FileInPath fp_
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t currentTime() const
#define DEFINE_FWK_MODULE(type)
SiStripDetInfo read(std::string filePath)
~SiStripNoisesBuilder() override=default
Log< level::Info, false > LogInfo
static constexpr char const *const kDefaultFile
const uint32_t printdebug_