22 unsigned int run=
event.id().run();
24 edm::LogInfo(
"SiStripBadFiberBuilder") <<
"... creating dummy SiStripBadStrip Data for Run " << run <<
"\n " << std::endl;
30 const std::vector<uint32_t> DetIds =
reader.getAllDetIds();
35 uint32_t BadModule_ = iBadComponent->getParameter<uint32_t>(
"BadModule");
36 std::vector<uint32_t> BadApvList_ = iBadComponent->getParameter<std::vector<uint32_t> >(
"BadApvList");
38 std::vector<unsigned int> theSiStripVector;
40 unsigned short firstBadStrip=0, NconsecutiveBadStrips=0;
41 unsigned int theBadStripRange;
43 for(std::vector<uint32_t>::const_iterator is=BadApvList_.begin(); is!=BadApvList_.end(); ++is){
45 firstBadStrip=(*is)*128;
46 NconsecutiveBadStrips=128;
48 theBadStripRange =
obj->
encode(firstBadStrip,NconsecutiveBadStrips);
51 ss <<
"detid " << BadModule_ <<
" \t" 52 <<
" firstBadStrip " << firstBadStrip <<
"\t " 53 <<
" NconsecutiveBadStrips " << NconsecutiveBadStrips <<
"\t " 54 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec 57 theSiStripVector.push_back(theBadStripRange);
61 if ( !
obj->
put(BadModule_,range) )
62 edm::LogError(
"SiStripBadFiberBuilder")<<
"[SiStripBadFiberBuilder::analyze] detid already exists"<<std::endl;
T getUntrackedParameter(std::string const &, T const &) const
~SiStripBadFiberBuilder()
SiStripBadFiberBuilder(const edm::ParameterSet &)
Parameters BadComponentList_
std::vector< edm::ParameterSet > Parameters
void algoAnalyze(const edm::Event &event, const edm::EventSetup &iSetup)
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)