21 unsigned int run=
event.id().run();
23 edm::LogInfo(
"SiStripBadChannelBuilder") <<
"... creating dummy SiStripBadStrip Data for Run " << run <<
"\n " << std::endl;
29 const std::vector<uint32_t> DetIds =
reader.getAllDetIds();
33 uint32_t BadModule_ = iBadComponent->getParameter<uint32_t>(
"BadModule");
34 std::vector<uint32_t> BadChannelList_ = iBadComponent->getParameter<std::vector<uint32_t> >(
"BadChannelList");
36 std::vector<unsigned int> theSiStripVector;
37 unsigned int NStrips=
reader.getNumberOfApvsAndStripLength(BadModule_).first*128;
40 unsigned short firstBadStrip=0, NconsecutiveBadStrips=0;
41 unsigned int theBadStripRange;
43 for(std::vector<uint32_t>::const_iterator is=BadChannelList_.begin(); is!=BadChannelList_.end(); ++is){
51 theBadStripRange = obj->
encode(firstBadStrip,NconsecutiveBadStrips);
54 edm::LogInfo(
"SiStripBadChannelBuilder") <<
"detid " << BadModule_ <<
" \t" 55 <<
" firstBadStrip " << firstBadStrip <<
"\t " 56 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t " 57 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec 60 theSiStripVector.push_back(theBadStripRange);
64 NconsecutiveBadStrips=0;
66 NconsecutiveBadStrips++;
70 theBadStripRange = obj->
encode(firstBadStrip,NconsecutiveBadStrips);
72 edm::LogInfo(
"SiStripBadChannelBuilder") <<
"detid " << BadModule_ <<
" \t" 73 <<
" firstBadStrip " << firstBadStrip <<
"\t " 74 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t " 75 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec 78 theSiStripVector.push_back(theBadStripRange);
81 if ( ! obj->
put(BadModule_,range) )
82 edm::LogError(
"SiStripBadChannelBuilder")<<
"[SiStripBadChannelBuilder::analyze] detid already exists"<<std::endl;
95 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)