13 #include <boost/lexical_cast.hpp>
18 printdebug_(iConfig.getUntrackedParameter<bool>(
"printDebug",
true)){}
29 uint32_t FedErrorMask = 1;
30 uint32_t DigiErrorMask = 2;
31 uint32_t ClusterErrorMask = 4;
35 edm::LogInfo(
"SiStripBadComponentsDQMServiceReader") <<
"[SiStripBadComponentsDQMServiceReader::analyze] End Reading SiStripBadStrip" << std::endl;
37 std::vector<uint32_t>
detid;
38 SiStripBadStrip_->getDetIds(detid);
44 ss <<
"subdet layer stereo side \t detId \t\t Errors" << std::endl;
46 for (
size_t id=0;
id<detid.size();
id++) {
49 for(
int it=0;it<range.second-range.first;it++){
50 unsigned int value=(*(range.first+it));
51 ss <<
detIdToString(detid[
id], tTopo) <<
"\t" << detid[id] <<
"\t";
53 uint32_t
flag = boost::lexical_cast<uint32_t>(SiStripBadStrip_->decode(value).flag);
55 printError( ss, ((flag & FedErrorMask) == FedErrorMask),
"Fed error, " );
56 printError( ss, ((flag & DigiErrorMask) == DigiErrorMask),
"Digi error, " );
57 printError( ss, ((flag & ClusterErrorMask) == ClusterErrorMask),
"Cluster error" );
61 ss <<
" firstBadStrip " << SiStripBadStrip_->decode(value).firstStrip <<
"\t "
62 <<
" NconsecutiveBadStrips " << SiStripBadStrip_->decode(value).range <<
"\t "
63 <<
" flag " << SiStripBadStrip_->decode(value).flag <<
"\t "
64 <<
" packed integer " << std::hex << value <<
std::dec <<
"\t " << std::endl;
69 edm::LogInfo(
"SiStripBadComponentsDQMServiceReader") << ss.str();
75 ss << errorText <<
"\t ";
128 std::string name( detector +
"\t" + boost::lexical_cast<string>(layer) +
"\t" + boost::lexical_cast<string>(stereo) +
"\t" );
132 else if ( side == 2 ) {
unsigned int tibLayer(const DetId &id) const
void printError(std::stringstream &ss, const bool error, const std::string &errorText)
uint32_t tobStereo(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
uint32_t rawId() const
get the raw id
unsigned int tidSide(const DetId &id) const
uint32_t tidStereo(const DetId &id) const
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 &)
std::string detIdToString(const DetId &detid, const TrackerTopology *tTopo)
SiStripBadComponentsDQMServiceReader(const edm::ParameterSet &)
T const * product() const
std::pair< ContainerIterator, ContainerIterator > Range
uint32_t tecStereo(const DetId &id) const
uint32_t tibStereo(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const
~SiStripBadComponentsDQMServiceReader()