22 #include "CLHEP/Random/RandFlat.h"
23 #include "CLHEP/Random/RandGauss.h"
35 printdebug_(iConfig.getUntrackedParameter<bool>(
"printDebug",
false))
58 std::vector<unsigned int> theSiStripVector;
69 infile >> detid >> channel;
72 unsigned int theBadStripRange=0;
85 if (channel!=tempchannel+count || flag != tempflag){
87 theBadStripRange = SiStripBadStrip_->
encode(tempchannel-1, count, tempflag);
89 edm::LogInfo(
"SiStripBadStripFromASCIIFile")<<
"detid " << tempdetid <<
" \t"
90 <<
" firstBadStrip " << tempchannel <<
"\t "
91 <<
" NconsecutiveBadStrips " << count <<
"\t "
92 <<
"flag " << tempflag <<
"\t"
93 <<
" packed integer " << std::hex << theBadStripRange << std::dec
96 theSiStripVector.push_back(theBadStripRange);
100 if ( ! SiStripBadStrip_->
put(tempdetid,range) )
101 edm::LogError(
"SiStripBadStripFromASCIIFile")<<
"[SiStripBadStripFromASCIIFile::GetNewObject] detid already exists"<<std::endl;
102 theSiStripVector.clear();
112 if(detid!=tempdetid){
114 theBadStripRange = SiStripBadStrip_->
encode(tempchannel-1, count, tempflag);
116 edm::LogInfo(
"SiStripBadStripFromASCIIFile")<<
"detid " << tempdetid <<
" \t"
117 <<
" firstBadStrip " << tempchannel <<
"\t "
118 <<
" NconsecutiveBadStrips " << count <<
"\t "
119 <<
"flag " << tempflag <<
"\t"
120 <<
" packed integer " << std::hex << theBadStripRange << std::dec
123 theSiStripVector.push_back(theBadStripRange);
127 if ( ! SiStripBadStrip_->
put(tempdetid,range) )
128 edm::LogError(
"SiStripBadStripFromASCIIFile")<<
"[SiStripBadStripFromASCIIFile::GetNewObject] detid already exists"<<std::endl;
129 theSiStripVector.clear();
138 return SiStripBadStrip_;
T getUntrackedParameter(std::string const &, T const &) const
SiStripBadStripFromASCIIFile(const edm::ParameterSet &iConfig)
virtual SiStripBadStrip * getNewObject()
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)