15 #include "CLHEP/Random/RandFlat.h" 16 #include "CLHEP/Random/RandGauss.h" 32 : fp_(iConfig.getUntrackedParameter<
edm::FileInPath>(
"file",
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;
std::string fullPath() const
cond::Time_t beginOfTime() const
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)
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t currentTime() const
~SiStripApvGainBuilder() override=default
std::pair< ContainerIterator, ContainerIterator > Range
#define DEFINE_FWK_MODULE(type)
SiStripDetInfo read(std::string filePath)
Log< level::Info, false > LogInfo
static constexpr char const *const kDefaultFile
SiStripApvGainBuilder(const edm::ParameterSet &iConfig)
const edm::FileInPath fp_