#include <SiStripBadStrip.h>
Classes | |
struct | data |
struct | DetRegistry |
class | StrictWeakOrdering |
Public Types | |
typedef std::vector< unsigned int > | Container |
typedef std::vector< unsigned int >::const_iterator | ContainerIterator |
typedef Container | InputVector |
typedef std::pair < ContainerIterator, ContainerIterator > | Range |
typedef std::vector< DetRegistry > | Registry |
typedef Registry::const_iterator | RegistryIterator |
Public Member Functions | |
data | decode (const unsigned int &value) const |
unsigned int | encode (const unsigned short &first, const unsigned short &NconsecutiveBadStrips, const unsigned short &flag=0) |
ContainerIterator | getDataVectorBegin () const |
ContainerIterator | getDataVectorEnd () const |
void | getDetIds (std::vector< uint32_t > &DetIds_) const |
const Range | getRange (const uint32_t &detID) const |
RegistryIterator | getRegistryVectorBegin () const |
RegistryIterator | getRegistryVectorEnd () const |
void | printDebug (std::stringstream &ss) const |
void | printSummary (std::stringstream &ss) const |
bool | put (const uint32_t &detID, Range input) |
bool | put (const uint32_t &detID, const InputVector &vect) |
SiStripBadStrip (const SiStripBadStrip &orig) | |
SiStripBadStrip () | |
virtual | ~SiStripBadStrip () |
Protected Attributes | |
Registry | indexes |
Container | v_badstrips |
Holds the list of bad components.
The bad components can be filled with two put methods, that receive a DetId and either a range of bad strips or a vector of bad strips.
The information is stored in two vectors:
Definition at line 27 of file SiStripBadStrip.h.
typedef std::vector<unsigned int> SiStripBadStrip::Container |
Definition at line 48 of file SiStripBadStrip.h.
typedef std::vector<unsigned int>::const_iterator SiStripBadStrip::ContainerIterator |
Definition at line 49 of file SiStripBadStrip.h.
Definition at line 53 of file SiStripBadStrip.h.
typedef std::pair<ContainerIterator, ContainerIterator> SiStripBadStrip::Range |
Definition at line 50 of file SiStripBadStrip.h.
typedef std::vector<DetRegistry> SiStripBadStrip::Registry |
Definition at line 51 of file SiStripBadStrip.h.
typedef Registry::const_iterator SiStripBadStrip::RegistryIterator |
Definition at line 52 of file SiStripBadStrip.h.
SiStripBadStrip::SiStripBadStrip | ( | ) | [inline] |
Definition at line 55 of file SiStripBadStrip.h.
{};
SiStripBadStrip::SiStripBadStrip | ( | const SiStripBadStrip & | orig | ) | [inline] |
Definition at line 56 of file SiStripBadStrip.h.
References indexes, and v_badstrips.
{ v_badstrips=orig.v_badstrips; indexes=orig.indexes; }
virtual SiStripBadStrip::~SiStripBadStrip | ( | ) | [inline, virtual] |
Definition at line 60 of file SiStripBadStrip.h.
{};
data SiStripBadStrip::decode | ( | const unsigned int & | value | ) | const [inline] |
Definition at line 75 of file SiStripBadStrip.h.
References a, sistrip::FirstBadStripMask_, sistrip::FirstBadStripShift_, SiStripBadStrip::data::firstStrip, SiStripBadStrip::data::flag, sistrip::FlagBadStripMask_, sistrip::FlagBadStripShift_, SiStripBadStrip::data::range, sistrip::RangeBadStripMask_, and sistrip::RangeBadStripShift_.
Referenced by SiStripQuality::add(), SiStripFEDErrorsDQM::addErrors(), SiStripHitEffFromCalibTree::algoAnalyze(), SiStripQuality::compact(), SiStripQuality::fillBadComponents(), MeasurementTracker::initializeStripStatus(), SiStripQuality::IsStripBad(), SiStripQuality::nBadStripsOnTheLeft(), SiStripQuality::nBadStripsOnTheRight(), SiStripQuality::operator-=(), SiStripQuality::ReduceGranularity(), and SiStripQuality::subtraction().
{ data a; a.firstStrip = ((value>>sistrip::FirstBadStripShift_)&sistrip::FirstBadStripMask_); a.range = ((value>>sistrip::RangeBadStripShift_)&sistrip::RangeBadStripMask_); a.flag = ((value>>sistrip::FlagBadStripShift_)&sistrip::FlagBadStripMask_); return a; }
unsigned int SiStripBadStrip::encode | ( | const unsigned short & | first, |
const unsigned short & | NconsecutiveBadStrips, | ||
const unsigned short & | flag = 0 |
||
) | [inline] |
Definition at line 83 of file SiStripBadStrip.h.
References sistrip::FirstBadStripMask_, sistrip::FirstBadStripShift_, sistrip::FlagBadStripMask_, sistrip::FlagBadStripShift_, sistrip::RangeBadStripMask_, and sistrip::RangeBadStripShift_.
Referenced by SiStripQuality::add(), SiStripFEDErrorsDQM::addBadStrips(), SiStripFEDErrorsDQM::addErrors(), SiStripQuality::addInvalidConnectionFromCabling(), SiStripQuality::addNotConnectedConnectionFromCabling(), SiStripBadChannelBuilder::algoAnalyze(), SiStripBadFiberBuilder::algoAnalyze(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::AnalyzeOccupancy(), SiStripBadAPVAlgorithmFromClusterOccupancy::AnalyzeOccupancy(), SiStripQuality::compact(), SiStripBadModuleGenerator::createObject(), SiStripBadStripFromASCIIFile::getNewObject(), SiStripBadModuleByHandBuilder::getNewObject(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::iterativeSearch(), SiStripHotStripAlgorithmFromClusterOccupancy::iterativeSearch(), SiStripHitEffFromCalibTree::makeSQLite(), SiStripBadComponentsDQMService::readBadComponents(), SiStripQuality::ReduceGranularity(), SiStripCondObjBuilderFromDb::setDefaultValuesCabling(), SiStripCondObjBuilderFromDb::setValuesCabling(), SiStripQuality::subtraction(), and SiStripQuality::turnOffFeds().
{ return ((first & sistrip::FirstBadStripMask_)<<sistrip::FirstBadStripShift_) | ((NconsecutiveBadStrips & sistrip::RangeBadStripMask_)<<sistrip::RangeBadStripShift_) | ((flag & sistrip::FlagBadStripMask_)<<sistrip::FlagBadStripShift_); }
ContainerIterator SiStripBadStrip::getDataVectorBegin | ( | ) | const [inline] |
Definition at line 69 of file SiStripBadStrip.h.
References v_badstrips.
Referenced by SiStripQuality::add(), SiStripHitEffFromCalibTree::algoAnalyze(), SiStripHitEffFromCalibTree::getNewObject(), SiStripQualityHotStripIdentifierRoot::getNewObject(), SiStripQualityHotStripIdentifier::getNewObject(), SiStripQuality::operator-=(), and SiStripQuality::ReduceGranularity().
{return v_badstrips.begin();}
ContainerIterator SiStripBadStrip::getDataVectorEnd | ( | ) | const [inline] |
Definition at line 70 of file SiStripBadStrip.h.
References v_badstrips.
{return v_badstrips.end();}
void SiStripBadStrip::getDetIds | ( | std::vector< uint32_t > & | DetIds_ | ) | const |
Definition at line 37 of file SiStripBadStrip.cc.
References begin, end, indexes, and L1TEmulatorMonitor_cff::p.
{ // returns vector of DetIds in map SiStripBadStrip::RegistryIterator begin = indexes.begin(); SiStripBadStrip::RegistryIterator end = indexes.end(); for (SiStripBadStrip::RegistryIterator p=begin; p != end; ++p) { DetIds_.push_back(p->detid); } }
const SiStripBadStrip::Range SiStripBadStrip::getRange | ( | const uint32_t & | detID | ) | const |
Definition at line 26 of file SiStripBadStrip.cc.
References indexes, L1TEmulatorMonitor_cff::p, and v_badstrips.
Referenced by SiStripQuality::add(), MeasurementTracker::initializeStripStatus(), SiStripQuality::IsStripBad(), SiStripQuality::operator-=(), printDebug(), and jptJetAnalysis::StripSignalOverNoiseCalculator::signalOverNoise().
{ // get SiStripBadStrip Range of DetId RegistryIterator p = std::lower_bound(indexes.begin(),indexes.end(),DetId,SiStripBadStrip::StrictWeakOrdering()); if (p==indexes.end()|| p->detid!=DetId) return SiStripBadStrip::Range(v_badstrips.end(),v_badstrips.end()); else return SiStripBadStrip::Range(v_badstrips.begin()+p->ibegin,v_badstrips.begin()+p->iend); }
RegistryIterator SiStripBadStrip::getRegistryVectorBegin | ( | ) | const [inline] |
Definition at line 71 of file SiStripBadStrip.h.
References indexes.
Referenced by SiStripQuality::add(), SiStripHitEffFromCalibTree::algoAnalyze(), SiStripHitEffFromCalibTree::getNewObject(), SiStripQualityHotStripIdentifierRoot::getNewObject(), SiStripQualityHotStripIdentifier::getNewObject(), SiStripQuality::operator-=(), SiStripQuality::operator==(), and SiStripQuality::ReduceGranularity().
{return indexes.begin();}
RegistryIterator SiStripBadStrip::getRegistryVectorEnd | ( | ) | const [inline] |
Definition at line 72 of file SiStripBadStrip.h.
References indexes.
Referenced by SiStripQuality::add(), SiStripHitEffFromCalibTree::algoAnalyze(), SiStripHitEffFromCalibTree::getNewObject(), SiStripQualityHotStripIdentifierRoot::getNewObject(), SiStripQualityHotStripIdentifier::getNewObject(), SiStripQuality::operator-=(), SiStripQuality::operator==(), and SiStripQuality::ReduceGranularity().
{return indexes.end();}
void SiStripBadStrip::printDebug | ( | std::stringstream & | ss | ) | const |
Definition at line 62 of file SiStripBadStrip.cc.
References getRange(), and indexes.
Referenced by SiStripQuality::setPrintDebugOutput().
{ ss << "Printing all bad strips for all DetIds" << std::endl; // Loop on the vector<DetRegistry> and take the bad modules and bad strips Registry::const_iterator it = indexes.begin(); for( ; it!=indexes.end(); ++it ) { ss << "For DetId = " << it->detid << std::endl; SiStripBadStrip::Range range(getRange(it->detid)); for( std::vector<unsigned int>::const_iterator badStrip = range.first; badStrip != range.second; ++badStrip ) { ss << "strip: " << *badStrip << std::endl; } } }
void SiStripBadStrip::printSummary | ( | std::stringstream & | ss | ) | const |
Definition at line 46 of file SiStripBadStrip.cc.
References SiStripDetSummary::add(), indexes, and SiStripDetSummary::print().
Referenced by SiStripBadComponentsDQMService::getMetaDataString().
{ SiStripDetSummary summaryBadModules; SiStripDetSummary summaryBadStrips; // Loop on the vector<DetRegistry> and take the bad modules and bad strips Registry::const_iterator it = indexes.begin(); for( ; it!=indexes.end(); ++it ) { summaryBadModules.add(it->detid); summaryBadStrips.add(it->iend - it->ibegin); } ss << "Summary of bad modules in detector:" << std::endl; summaryBadModules.print(ss, false); ss << "Summary of bad strip in detectors:" << std::endl; summaryBadStrips.print(ss, false); }
bool SiStripBadStrip::put | ( | const uint32_t & | detID, |
const InputVector & | vect | ||
) | [inline] |
Definition at line 62 of file SiStripBadStrip.h.
References put().
Referenced by SiStripFEDErrorsDQM::addErrors(), SiStripBadChannelBuilder::algoAnalyze(), SiStripBadFiberBuilder::algoAnalyze(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::AnalyzeOccupancy(), SiStripBadAPVAlgorithmFromClusterOccupancy::AnalyzeOccupancy(), SiStripQuality::cleanUp(), SiStripBadModuleGenerator::createObject(), SiStripHotStripAlgorithmFromClusterOccupancy::extractBadStrips(), SiStripBadStripFromASCIIFile::getNewObject(), SiStripHitEffFromCalibTree::getNewObject(), SiStripQualityHotStripIdentifierRoot::getNewObject(), SiStripBadModuleByHandBuilder::getNewObject(), SiStripQualityHotStripIdentifier::getNewObject(), SiStripHitEffFromCalibTree::makeSQLite(), put(), SiStripBadComponentsDQMService::readBadComponents(), and SiStripCondObjBuilderFromDb::storeQuality().
bool SiStripBadStrip::put | ( | const uint32_t & | detID, |
Range | input | ||
) |
Definition at line 7 of file SiStripBadStrip.cc.
References SiStripBadStrip::DetRegistry::detid, SiStripBadStrip::DetRegistry::ibegin, SiStripBadStrip::DetRegistry::iend, indexes, L1TEmulatorMonitor_cff::p, and v_badstrips.
{ // put in SiStripBadStrip::v_badstrips of DetId Registry::iterator p = std::lower_bound(indexes.begin(),indexes.end(),DetId,SiStripBadStrip::StrictWeakOrdering()); if (p!=indexes.end() && p->detid==DetId){ edm::LogError("SiStripBadStrip") << "[" << __PRETTY_FUNCTION__ << "] SiStripBadStrip for DetID " << DetId << " is already stored. Skippig this put" << std::endl; return false; } size_t sd= input.second-input.first; DetRegistry detregistry; detregistry.detid=DetId; detregistry.ibegin=v_badstrips.size(); detregistry.iend=v_badstrips.size()+sd; indexes.insert(p,detregistry); v_badstrips.insert(v_badstrips.end(),input.first,input.second); return true; }
Registry SiStripBadStrip::indexes [protected] |
Definition at line 89 of file SiStripBadStrip.h.
Referenced by SiStripQuality::cleanUp(), SiStripQuality::clear(), SiStripQuality::fillBadComponents(), getDetIds(), getRange(), getRegistryVectorBegin(), getRegistryVectorEnd(), printDebug(), printSummary(), put(), SiStripQuality::put_replace(), SiStripBadStrip(), and SiStripQuality::SiStripQuality().
Container SiStripBadStrip::v_badstrips [protected] |
Definition at line 88 of file SiStripBadStrip.h.
Referenced by SiStripQuality::cleanUp(), SiStripQuality::clear(), SiStripQuality::fillBadComponents(), getDataVectorBegin(), getDataVectorEnd(), getRange(), put(), SiStripQuality::put_replace(), SiStripBadStrip(), and SiStripQuality::SiStripQuality().