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(
"SiStripApvGainBuilder") <<
"... creating dummy SiStripApvGain Data for Run " <<
run <<
"\n " 47 const auto& DetInfos =
reader.getAllData();
50 for (
const auto&
it : DetInfos) {
51 const auto& nAPVs =
it.second.nApvs;
54 std::vector<float> theSiStripVector;
55 for (
unsigned short j = 0;
j < nAPVs;
j++) {
56 float gain = (
j + 1) * 1000 + (CLHEP::RandFlat::shoot(1.) * 100);
58 edm::LogInfo(
"SiStripApvGainBuilder") <<
"detid " <<
it.first <<
" \t" 59 <<
" apv " <<
j <<
" \t" <<
gain <<
" \t" << std::endl;
60 theSiStripVector.push_back(
gain);
65 edm::LogError(
"SiStripApvGainBuilder") <<
"[SiStripApvGainBuilder::analyze] detid already exists" << std::endl;
78 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_