21 unsigned int run=
event.id().run();
23 edm::LogInfo(
"SiStripBadChannelBuilder") <<
"... creating dummy SiStripBadStrip Data for Run " << run <<
"\n " << std::endl;
31 uint32_t BadModule_ = iBadComponent->getParameter<uint32_t>(
"BadModule");
32 std::vector<uint32_t> BadChannelList_ = iBadComponent->getParameter<std::vector<uint32_t> >(
"BadChannelList");
34 std::vector<unsigned int> theSiStripVector;
35 unsigned int NStrips=
reader.getNumberOfApvsAndStripLength(BadModule_).first*128;
38 unsigned short firstBadStrip=0, NconsecutiveBadStrips=0;
39 unsigned int theBadStripRange;
41 for(std::vector<uint32_t>::const_iterator is=BadChannelList_.begin(); is!=BadChannelList_.end(); ++is){
49 theBadStripRange = obj->
encode(firstBadStrip,NconsecutiveBadStrips);
52 edm::LogInfo(
"SiStripBadChannelBuilder") <<
"detid " << BadModule_ <<
" \t" 53 <<
" firstBadStrip " << firstBadStrip <<
"\t " 54 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t " 55 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec 58 theSiStripVector.push_back(theBadStripRange);
62 NconsecutiveBadStrips=0;
64 NconsecutiveBadStrips++;
68 theBadStripRange = obj->
encode(firstBadStrip,NconsecutiveBadStrips);
70 edm::LogInfo(
"SiStripBadChannelBuilder") <<
"detid " << BadModule_ <<
" \t" 71 <<
" firstBadStrip " << firstBadStrip <<
"\t " 72 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t " 73 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec 76 theSiStripVector.push_back(theBadStripRange);
79 if ( ! obj->
put(BadModule_,range) )
80 edm::LogError(
"SiStripBadChannelBuilder")<<
"[SiStripBadChannelBuilder::analyze] detid already exists"<<std::endl;
93 edm::LogError(
"SiStripBadStripBuilder")<<
"Service is unavailable"<<std::endl;
Parameters BadComponentList_
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)
cond::Time_t endOfTime() const
cond::Time_t currentTime() const
std::pair< ContainerIterator, ContainerIterator > Range
std::string fullPath() const
bool put(const uint32_t &detID, const InputVector &vect)
unsigned int encode(const unsigned short &first, const unsigned short &NconsecutiveBadStrips, const unsigned short &flag=0)