CMS 3D CMS Logo

SiStripBadStrip Class Reference

#include <CondFormats/SiStripObjects/interface/SiStripBadStrip.h>

Inheritance diagram for SiStripBadStrip:

SiStripQuality

List of all members.

Public Types

typedef std::vector< unsigned intContainer
typedef std::vector< unsigned
int >::const_iterator 
ContainerIterator
typedef Container InputVector
typedef std::pair
< ContainerIterator,
ContainerIterator
Range
typedef std::vector< DetRegistryRegistry
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
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

Classes

struct  data
struct  DetRegistry
class  StrictWeakOrdering


Detailed Description

Definition at line 11 of file SiStripBadStrip.h.


Member Typedef Documentation

typedef std::vector<unsigned int> SiStripBadStrip::Container

Definition at line 33 of file SiStripBadStrip.h.

typedef std::vector<unsigned int>::const_iterator SiStripBadStrip::ContainerIterator

Definition at line 34 of file SiStripBadStrip.h.

typedef Container SiStripBadStrip::InputVector

Definition at line 38 of file SiStripBadStrip.h.

typedef std::pair<ContainerIterator, ContainerIterator> SiStripBadStrip::Range

Definition at line 35 of file SiStripBadStrip.h.

typedef std::vector<DetRegistry> SiStripBadStrip::Registry

Definition at line 36 of file SiStripBadStrip.h.

typedef Registry::const_iterator SiStripBadStrip::RegistryIterator

Definition at line 37 of file SiStripBadStrip.h.


Constructor & Destructor Documentation

SiStripBadStrip::SiStripBadStrip (  )  [inline]

Definition at line 40 of file SiStripBadStrip.h.

00040 {};

SiStripBadStrip::SiStripBadStrip ( const SiStripBadStrip orig  )  [inline]

Definition at line 41 of file SiStripBadStrip.h.

References indexes, and v_badstrips.

00041                                               {
00042     v_badstrips=orig.v_badstrips; 
00043     indexes=orig.indexes;
00044   }

virtual SiStripBadStrip::~SiStripBadStrip (  )  [inline, virtual]

Definition at line 45 of file SiStripBadStrip.h.

00045 {};


Member Function Documentation

data SiStripBadStrip::decode ( const unsigned int value  )  const [inline]

Definition at line 59 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(), SiStripQuality::compact(), SiStripQuality::fillBadComponents(), MeasurementTracker::initializeStripStatus(), SiStripQuality::IsStripBad(), SiStripQuality::nBadStripsOnTheLeft(), SiStripQuality::nBadStripsOnTheRight(), SiStripQuality::operator-=(), SiStripQuality::ReduceGranularity(), and SiStripQuality::subtraction().

unsigned int SiStripBadStrip::encode ( const unsigned short &  first,
const unsigned short &  NconsecutiveBadStrips,
const unsigned short &  flag = 0 
) [inline]

Definition at line 67 of file SiStripBadStrip.h.

References sistrip::FirstBadStripMask_, sistrip::FirstBadStripShift_, sistrip::FlagBadStripMask_, sistrip::FlagBadStripShift_, sistrip::RangeBadStripMask_, and sistrip::RangeBadStripShift_.

Referenced by SiStripQuality::addInvalidConnectionFromCabling(), SiStripQuality::addNotConnectedConnectionFromCabling(), SiStripBadChannelBuilder::algoAnalyze(), SiStripBadFiberBuilder::algoAnalyze(), SiStripCondObjBuilderFromDb::buildStripRelatedObjects(), SiStripQuality::compact(), SiStripBadStripFromASCIIFile::getNewObject(), SiStripBadModuleByHandBuilder::getNewObject(), SiStripHotStripAlgorithmFromClusterOccupancy::iterativeSearch(), SiStripQualityConfigurableFakeESSource::produce(), SiStripQuality::ReduceGranularity(), and SiStripQuality::subtraction().

ContainerIterator SiStripBadStrip::getDataVectorBegin (  )  const [inline]

Definition at line 53 of file SiStripBadStrip.h.

References v_badstrips.

Referenced by SiStripQuality::add(), SiStripQualityHotStripIdentifierRoot::getNewObject(), SiStripQualityHotStripIdentifier::getNewObject(), SiStripQuality::operator-=(), and SiStripQuality::ReduceGranularity().

00053 {return v_badstrips.begin();}

ContainerIterator SiStripBadStrip::getDataVectorEnd (  )  const [inline]

Definition at line 54 of file SiStripBadStrip.h.

References v_badstrips.

00054 {return v_badstrips.end();}

void SiStripBadStrip::getDetIds ( std::vector< uint32_t > &  DetIds_  )  const

Definition at line 34 of file SiStripBadStrip.cc.

References begin, end, indexes, and p.

00034                                                                   {
00035   // returns vector of DetIds in map
00036   SiStripBadStrip::RegistryIterator begin = indexes.begin();
00037   SiStripBadStrip::RegistryIterator end   = indexes.end();
00038   for (SiStripBadStrip::RegistryIterator p=begin; p != end; ++p) {
00039     DetIds_.push_back(p->detid);
00040   }
00041 }

const SiStripBadStrip::Range SiStripBadStrip::getRange ( const uint32_t &  detID  )  const

Definition at line 23 of file SiStripBadStrip.cc.

References indexes, p, and v_badstrips.

Referenced by SiStripQuality::add(), MeasurementTracker::initializeStripStatus(), SiStripQuality::IsStripBad(), and SiStripQuality::operator-=().

00023                                                                                 {
00024   // get SiStripBadStrip Range of DetId
00025   
00026   RegistryIterator p = std::lower_bound(indexes.begin(),indexes.end(),DetId,SiStripBadStrip::StrictWeakOrdering());
00027   if (p==indexes.end()|| p->detid!=DetId) 
00028     return SiStripBadStrip::Range(v_badstrips.end(),v_badstrips.end()); 
00029   else 
00030     return SiStripBadStrip::Range(v_badstrips.begin()+p->ibegin,v_badstrips.begin()+p->iend);
00031 }

RegistryIterator SiStripBadStrip::getRegistryVectorBegin (  )  const [inline]

Definition at line 55 of file SiStripBadStrip.h.

References indexes.

Referenced by SiStripQuality::add(), SiStripQualityHotStripIdentifierRoot::getNewObject(), SiStripQualityHotStripIdentifier::getNewObject(), SiStripQuality::operator-=(), SiStripQuality::operator==(), and SiStripQuality::ReduceGranularity().

00055 {return indexes.begin();}

RegistryIterator SiStripBadStrip::getRegistryVectorEnd (  )  const [inline]

Definition at line 56 of file SiStripBadStrip.h.

References indexes.

Referenced by SiStripQuality::add(), SiStripQualityHotStripIdentifierRoot::getNewObject(), SiStripQualityHotStripIdentifier::getNewObject(), SiStripQuality::operator-=(), SiStripQuality::operator==(), and SiStripQuality::ReduceGranularity().

00056 {return indexes.end();}

bool SiStripBadStrip::put ( const uint32_t &  detID,
Range  input 
)

Definition at line 4 of file SiStripBadStrip.cc.

References SiStripBadStrip::DetRegistry::detid, lat::endl(), SiStripBadStrip::DetRegistry::ibegin, SiStripBadStrip::DetRegistry::iend, indexes, p, and v_badstrips.

00004                                                             {
00005   // put in SiStripBadStrip::v_badstrips of DetId
00006   Registry::iterator p = std::lower_bound(indexes.begin(),indexes.end(),DetId,SiStripBadStrip::StrictWeakOrdering());
00007   if (p!=indexes.end() && p->detid==DetId){
00008     edm::LogError("SiStripBadStrip") << "[" << __PRETTY_FUNCTION__ << "] SiStripBadStrip for DetID " << DetId << " is already stored. Skippig this put" << std::endl;
00009     return false;
00010   }
00011   
00012   size_t sd= input.second-input.first;
00013   DetRegistry detregistry;
00014   detregistry.detid=DetId;
00015   detregistry.ibegin=v_badstrips.size();
00016   detregistry.iend=v_badstrips.size()+sd;
00017   indexes.insert(p,detregistry);
00018 
00019   v_badstrips.insert(v_badstrips.end(),input.first,input.second);
00020   return true;
00021 }

bool SiStripBadStrip::put ( const uint32_t &  detID,
const InputVector vect 
) [inline]

Definition at line 47 of file SiStripBadStrip.h.

Referenced by SiStripBadChannelBuilder::algoAnalyze(), SiStripBadFiberBuilder::algoAnalyze(), SiStripCondObjBuilderFromDb::buildStripRelatedObjects(), SiStripQuality::cleanUp(), SiStripHotStripAlgorithmFromClusterOccupancy::extractBadStrips(), SiStripBadStripFromASCIIFile::getNewObject(), SiStripQualityHotStripIdentifierRoot::getNewObject(), SiStripBadModuleByHandBuilder::getNewObject(), SiStripQualityHotStripIdentifier::getNewObject(), and SiStripQualityConfigurableFakeESSource::produce().

00047 {return put(detID,Range(vect.begin(),vect.end()));}


Member Data Documentation

Registry SiStripBadStrip::indexes [protected]

Definition at line 73 of file SiStripBadStrip.h.

Referenced by SiStripQuality::cleanUp(), SiStripQuality::clear(), SiStripQuality::fillBadComponents(), getDetIds(), getRange(), getRegistryVectorBegin(), getRegistryVectorEnd(), put(), SiStripQuality::put_replace(), SiStripBadStrip(), and SiStripQuality::SiStripQuality().

Container SiStripBadStrip::v_badstrips [protected]

Definition at line 72 of file SiStripBadStrip.h.

Referenced by SiStripQuality::cleanUp(), SiStripQuality::clear(), SiStripQuality::fillBadComponents(), getDataVectorBegin(), getDataVectorEnd(), getRange(), put(), SiStripQuality::put_replace(), SiStripBadStrip(), and SiStripQuality::SiStripQuality().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:12 2009 for CMSSW by  doxygen 1.5.4