15 #include "CLHEP/Random/RandFlat.h"
16 #include "CLHEP/Random/RandGauss.h"
32 : fp_(iConfig.getUntrackedParameter<edm::FileInPath>(
"file",
33 edm::FileInPath(SiStripDetInfoFileReader::
kDefaultFile))),
34 printdebug_(iConfig.getUntrackedParameter<uint32_t>(
"printDebug", 1)) {}
39 edm::LogInfo(
"SiStripApvGainBuilder") <<
"... creating dummy SiStripApvGain Data for Run " << run <<
"\n "
45 const auto& DetInfos =
reader.getAllData();
48 for (
const auto& it : DetInfos) {
49 const auto& nAPVs = it.second.nApvs;
52 std::vector<float> theSiStripVector;
53 for (
unsigned short j = 0;
j < nAPVs;
j++) {
54 float gain = (
j + 1) * 1000 + (CLHEP::RandFlat::shoot(1.) * 100);
56 edm::LogInfo(
"SiStripApvGainBuilder") <<
"detid " << it.first <<
" \t"
57 <<
" apv " <<
j <<
" \t" << gain <<
" \t" << std::endl;
58 theSiStripVector.push_back(gain);
63 edm::LogError(
"SiStripApvGainBuilder") <<
"[SiStripApvGainBuilder::analyze] detid already exists" << std::endl;
76 edm::LogError(
"SiStripApvGainBuilder") <<
"Service is unavailable" << std::endl;
#define DEFINE_FWK_MODULE(type)
void analyze(const edm::Event &, const edm::EventSetup &) override
Log< level::Error, false > LogError
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
const uint16_t range(const Frame &aFrame)
bool put(const uint32_t &detID, Range input)
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
~SiStripApvGainBuilder() override=default
cond::Time_t beginOfTime() const
std::pair< ContainerIterator, ContainerIterator > Range
SiStripDetInfo read(std::string filePath)
Log< level::Info, false > LogInfo
cond::Time_t currentTime() const
std::string fullPath() const
static constexpr char const *const kDefaultFile
SiStripApvGainBuilder(const edm::ParameterSet &iConfig)
const edm::FileInPath fp_