10 "file",
edm::FileInPath(
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"));
18 edm::LogInfo(
"SiStripBadChannelBuilder") <<
"... creating dummy SiStripBadStrip Data" << std::endl;
20 auto obj = std::make_unique<SiStripBadStrip>();
26 uint32_t BadModule_ = iBadComponent->getParameter<uint32_t>(
"BadModule");
27 std::vector<uint32_t> BadChannelList_ = iBadComponent->getParameter<std::vector<uint32_t> >(
"BadChannelList");
29 std::vector<unsigned int> theSiStripVector;
30 unsigned int NStrips =
reader.getNumberOfApvsAndStripLength(BadModule_).first * 128;
32 uint32_t lastBad = 999;
33 unsigned short firstBadStrip = 0, NconsecutiveBadStrips = 0;
34 unsigned int theBadStripRange;
36 for (std::vector<uint32_t>::const_iterator is = BadChannelList_.begin(); is != BadChannelList_.end(); ++is) {
37 if (*is > NStrips - 1)
39 if (*is != lastBad + 1) {
44 theBadStripRange =
obj->encode(firstBadStrip, NconsecutiveBadStrips);
48 <<
"detid " << BadModule_ <<
" \t" 49 <<
" firstBadStrip " << firstBadStrip <<
"\t " 50 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t " 51 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec << std::endl;
53 theSiStripVector.push_back(theBadStripRange);
57 NconsecutiveBadStrips = 0;
59 NconsecutiveBadStrips++;
63 theBadStripRange =
obj->encode(firstBadStrip, NconsecutiveBadStrips);
66 <<
"detid " << BadModule_ <<
" \t" 67 <<
" firstBadStrip " << firstBadStrip <<
"\t " 68 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t " 69 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec << std::endl;
71 theSiStripVector.push_back(theBadStripRange);
76 <<
"[SiStripBadChannelBuilder::analyze] detid already exists" << std::endl;
90 edm::LogError(
"SiStripBadStripBuilder") <<
"Service is unavailable" << std::endl;
Parameters BadComponentList_
T getUntrackedParameter(std::string const &, T const &) const
SiStripBadChannelBuilder(const edm::ParameterSet &)
std::vector< edm::ParameterSet > Parameters
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