17 #include "CLHEP/Random/RandFlat.h" 18 #include "CLHEP/Random/RandGauss.h" 26 std::unique_ptr<SiStripBadStrip>
getNewObject()
override;
45 edm::LogInfo(
"SiStripBadChannelBuilder") <<
"... creating dummy SiStripBadStrip Data" << std::endl;
47 auto obj = std::make_unique<SiStripBadStrip>();
53 uint32_t BadModule_ = iBadComponent->getParameter<uint32_t>(
"BadModule");
54 std::vector<uint32_t> BadChannelList_ = iBadComponent->getParameter<std::vector<uint32_t> >(
"BadChannelList");
56 std::vector<unsigned int> theSiStripVector;
59 uint32_t lastBad = 999;
60 unsigned short firstBadStrip = 0, NconsecutiveBadStrips = 0;
61 unsigned int theBadStripRange;
63 for (std::vector<uint32_t>::const_iterator is = BadChannelList_.begin(); is != BadChannelList_.end(); ++is) {
64 if (*is > NStrips - 1)
66 if (*is != lastBad + 1) {
71 theBadStripRange =
obj->encode(firstBadStrip, NconsecutiveBadStrips);
75 <<
"detid " << BadModule_ <<
" \t" 76 <<
" firstBadStrip " << firstBadStrip <<
"\t " 77 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t " 78 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec << std::endl;
80 theSiStripVector.push_back(theBadStripRange);
84 NconsecutiveBadStrips = 0;
86 NconsecutiveBadStrips++;
90 theBadStripRange =
obj->encode(firstBadStrip, NconsecutiveBadStrips);
93 <<
"detid " << BadModule_ <<
" \t" 94 <<
" firstBadStrip " << firstBadStrip <<
"\t " 95 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t " 96 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec << std::endl;
98 theSiStripVector.push_back(theBadStripRange);
103 <<
"[SiStripBadChannelBuilder::analyze] detid already exists" << std::endl;
115 edm::LogError(
"SiStripBadStripBuilder") <<
"Service is unavailable" << std::endl;
Parameters BadComponentList_
SiStripBadChannelBuilder(const edm::ParameterSet &)
cond::Time_t beginOfTime() const
Log< level::Error, false > LogError
std::vector< edm::ParameterSet > Parameters
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
T getUntrackedParameter(std::string const &, T const &) const
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t currentTime() const
#define DEFINE_FWK_MODULE(type)
SiStripDetInfo read(std::string filePath)
Log< level::Info, false > LogInfo
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
std::pair< ContainerIterator, ContainerIterator > Range
static constexpr char const *const kDefaultFile
~SiStripBadChannelBuilder() override
const std::string & fullPath() const
std::unique_ptr< SiStripBadStrip > getNewObject() override