00001 #include "CondFormats/CSCObjects/interface/CSCBadChambers.h" 00002 #include <algorithm> 00003 00004 bool CSCBadChambers::isInBadChamber( IndexType ichamber ) const { 00005 00006 if ( numberOfChambers() == 0 ) return false; 00007 00008 std::vector<int>::const_iterator badbegin = chambers.begin(); 00009 std::vector<int>::const_iterator badend = chambers.end(); 00010 std::vector<int>::const_iterator it = std::find( badbegin, badend, ichamber ); 00011 if ( it != badend ) return true; // ichamber is in the list of bad chambers 00012 else return false; 00013 } 00014 00015 bool CSCBadChambers::isInBadChamber( const CSCDetId& id ) const { 00016 00017 if ( numberOfChambers() == 0 ) return false; 00018 00019 return isInBadChamber( chamberIndex( id.endcap(), id.station(), id.ring(), id.chamber() ) ); 00020 }