10 #include <boost/lexical_cast.hpp>
15 printdebug_(iConfig.getUntrackedParameter<bool>(
"printDebug",
true)){}
21 uint32_t FedErrorMask = 1;
22 uint32_t DigiErrorMask = 2;
23 uint32_t ClusterErrorMask = 4;
27 edm::LogInfo(
"SiStripBadComponentsDQMServiceReader") <<
"[SiStripBadComponentsDQMServiceReader::analyze] End Reading SiStripBadStrip" << std::endl;
29 std::vector<uint32_t>
detid;
30 SiStripBadStrip_->getDetIds(detid);
36 ss <<
"subdet layer stereo side \t detId \t\t Errors" << std::endl;
38 for (
size_t id=0;
id<detid.size();
id++) {
41 for(
int it=0;it<range.second-range.first;it++){
42 unsigned int value=(*(range.first+it));
45 uint32_t
flag = boost::lexical_cast<uint32_t>(SiStripBadStrip_->decode(value).flag);
47 printError( ss, ((flag & FedErrorMask) == FedErrorMask),
"Fed error, " );
48 printError( ss, ((flag & DigiErrorMask) == DigiErrorMask),
"Digi error, " );
49 printError( ss, ((flag & ClusterErrorMask) == ClusterErrorMask),
"Cluster error" );
53 ss <<
" firstBadStrip " << SiStripBadStrip_->decode(value).firstStrip <<
"\t "
54 <<
" NconsecutiveBadStrips " << SiStripBadStrip_->decode(value).range <<
"\t "
55 <<
" flag " << SiStripBadStrip_->decode(value).flag <<
"\t "
56 <<
" packed integer " << std::hex << value << std::dec <<
"\t " << std::endl;
61 edm::LogInfo(
"SiStripBadComponentsDQMServiceReader") << ss.str();
67 ss << errorText <<
"\t ";
87 layer = theTIBDetId.
layer();
88 stereo = theTIBDetId.stereo();
95 layer = theTOBDetId.
layer();
96 stereo = theTOBDetId.stereo();
103 side = theTECDetId.
side();
105 layer = theTECDetId.wheel();
106 stereo = theTECDetId.stereo();
113 side = theTIDDetId.
side();
115 layer = theTIDDetId.wheel();
116 stereo = theTIDDetId.stereo();
120 std::string
name( detector +
"\t" + boost::lexical_cast<string>(layer) +
"\t" + boost::lexical_cast<string>(stereo) +
"\t" );
124 else if ( side == 2 ) {
unsigned int layer() const
layer id
void printError(std::stringstream &ss, const bool error, const std::string &errorText)
unsigned int side() const
positive or negative id
uint32_t rawId() const
get the raw id
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void analyze(const edm::Event &, const edm::EventSetup &)
SiStripBadComponentsDQMServiceReader(const edm::ParameterSet &)
unsigned int side() const
positive or negative id
std::string detIdToString(const DetId &detid)
unsigned int layer() const
layer id
std::pair< ContainerIterator, ContainerIterator > Range
~SiStripBadComponentsDQMServiceReader()