7 : fp_(iConfig.getUntrackedParameter<
edm::FileInPath>(
8 "file",
edm::FileInPath(
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"))),
9 printdebug_(iConfig.getUntrackedParameter<uint32_t>(
"printDebug", 3)) {}
15 <<
"... creating dummy SiStripThreshold Data for Run " << run <<
"\n " << std::endl;
21 const std::map<uint32_t, SiStripDetInfoFileReader::DetInfo>& DetInfos =
reader.getAllData();
24 for (std::map<uint32_t, SiStripDetInfoFileReader::DetInfo>::const_iterator it = DetInfos.begin();
31 while (strip < 128 * it->
second.nApvs) {
32 float lTh = (CLHEP::RandFlat::shoot(1.) * 64) / 5;
33 float hTh = (CLHEP::RandFlat::shoot(1.) * 64) / 5;
39 float cTh = (CLHEP::RandFlat::shoot(1.) * 30.);
41 obj->
setData(strip, lTh, hTh, cTh, theSiStripVector);
44 theSiStripVector.back().print(ss);
46 <<
"detid: " << it->first <<
" \n" 47 <<
"firstStrip: " << strip <<
" \t" 48 <<
"lTh: " << lTh <<
" \t" 49 <<
"hTh: " << hTh <<
" \t" 50 <<
"cTh: " << cTh <<
" \t" 51 <<
"FirstStrip_and_Hth: " << theSiStripVector.back().FirstStrip_and_Hth <<
" \n" 52 << ss.str() << std::endl;
54 obj->
setData(strip + 1, lTh, hTh, theSiStripVector);
55 strip = (uint16_t)(CLHEP::RandFlat::shoot(strip + 2, 128 * it->second.nApvs));
57 if (!obj->
put(it->first, theSiStripVector))
59 <<
"[SiStripThresholdBuilder::analyze] detid already exists" << std::endl;
73 edm::LogError(
"SiStripThresholdBuilder") <<
"Service is unavailable" << std::endl;
bool put(const uint32_t &detID, const InputVector &vect)
U second(std::pair< T, U > const &p)
std::vector< Data > Container
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t beginOfTime() const
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
SiStripThresholdBuilder(const edm::ParameterSet &iConfig)
cond::Time_t endOfTime() const
void setData(const uint16_t &strip, const float &lTh, const float &hTh, Container &vthr)
cond::Time_t currentTime() const
std::string fullPath() const
void analyze(const edm::Event &, const edm::EventSetup &) override