21 edm::LogInfo(
"SiStripBadChannelBuilder") <<
"... creating dummy SiStripBadStrip Data" << std::endl;
23 auto obj = std::make_unique<SiStripBadStrip>();
29 uint32_t BadModule_ = iBadComponent->getParameter<uint32_t>(
"BadModule");
30 std::vector<uint32_t> BadChannelList_ = iBadComponent->getParameter<std::vector<uint32_t> >(
"BadChannelList");
32 std::vector<unsigned int> theSiStripVector;
33 unsigned int NStrips=
reader.getNumberOfApvsAndStripLength(BadModule_).first*128;
36 unsigned short firstBadStrip=0, NconsecutiveBadStrips=0;
37 unsigned int theBadStripRange;
39 for(std::vector<uint32_t>::const_iterator is=BadChannelList_.begin(); is!=BadChannelList_.end(); ++is){
47 theBadStripRange =
obj->encode(firstBadStrip,NconsecutiveBadStrips);
50 edm::LogInfo(
"SiStripBadChannelBuilder") <<
"detid " << BadModule_ <<
" \t" 51 <<
" firstBadStrip " << firstBadStrip <<
"\t " 52 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t " 53 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec 56 theSiStripVector.push_back(theBadStripRange);
60 NconsecutiveBadStrips=0;
62 NconsecutiveBadStrips++;
66 theBadStripRange =
obj->encode(firstBadStrip,NconsecutiveBadStrips);
68 edm::LogInfo(
"SiStripBadChannelBuilder") <<
"detid " << BadModule_ <<
" \t" 69 <<
" firstBadStrip " << firstBadStrip <<
"\t " 70 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t " 71 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec 74 theSiStripVector.push_back(theBadStripRange);
77 if ( !
obj->put(BadModule_,range) )
78 edm::LogError(
"SiStripBadChannelBuilder")<<
"[SiStripBadChannelBuilder::analyze] detid already exists"<<std::endl;
91 edm::LogError(
"SiStripBadStripBuilder")<<
"Service is unavailable"<<std::endl;
Parameters BadComponentList_
T getUntrackedParameter(std::string const &, T const &) const
SiStripBadChannelBuilder(const edm::ParameterSet &)
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
~SiStripBadChannelBuilder() override
std::unique_ptr< SiStripBadStrip > getNewObject() override
std::vector< edm::ParameterSet > Parameters