7 fp_(iConfig.getUntrackedParameter<
edm::FileInPath>(
"file",
edm::FileInPath(
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"))),
8 printdebug_(iConfig.getUntrackedParameter<uint32_t>(
"printDebug",3)){}
16 edm::LogInfo(
"SiStripThresholdBuilder") <<
"... creating dummy SiStripThreshold Data for Run " << run <<
"\n " << std::endl;
22 const std::map<uint32_t, SiStripDetInfoFileReader::DetInfo > DetInfos =
reader.getAllData();
25 for(std::map<uint32_t, SiStripDetInfoFileReader::DetInfo >::const_iterator it = DetInfos.begin(); it != DetInfos.end(); it++){
30 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);
45 edm::LogInfo(
"SiStripThresholdBuilder") <<
"detid: " << it->first <<
" \n" 46 <<
"firstStrip: " << strip <<
" \t" 47 <<
"lTh: " << lTh <<
" \t" 48 <<
"hTh: " << hTh <<
" \t" 49 <<
"cTh: " << cTh <<
" \t" 50 <<
"FirstStrip_and_Hth: " << theSiStripVector.back().FirstStrip_and_Hth <<
" \n" 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) )
58 edm::LogError(
"SiStripThresholdBuilder")<<
"[SiStripThresholdBuilder::analyze] detid already exists"<<std::endl;
72 edm::LogError(
"SiStripThresholdBuilder")<<
"Service is unavailable"<<std::endl;
bool put(const uint32_t &detID, const InputVector &vect)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
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)
std::vector< std::vector< double > > tmp
cond::Time_t currentTime() const
std::string fullPath() const