CMS 3D CMS Logo

SiPixelDisabledModules.cc
Go to the documentation of this file.
1 // SiPixelDisabledModules.cc
2 //
3 // class implementation to hold a list of disabled pixel modules
4 //
5 // M. Eads
6 // Apr 2008
7 
9 
10 #include <algorithm>
11 
12 // add a list of modules to the vector of disabled modules
14  theDisabledModules.insert(theDisabledModules.end(), idVector.begin(), idVector.end());
15 
16 } // void SiPixelDisabledModules::addDisabledModule(disabledModuleListType idVector)
17 
18 // remove disabled module from the list
19 // returns false if id not in disable list, true otherwise
21  disabledModuleListType::iterator iter = find(theDisabledModules.begin(), theDisabledModules.end(), module);
22  if (iter == theDisabledModules.end())
23  return false;
24 
25  theDisabledModules.erase(iter);
26  return true;
27 
28 } // bool SiPixelDisabledModules::removeDisabledModule(disabledModuleType module)
29 
30 // method to return true if the specified module is in the list
31 // of disabled modules
33  disabledModuleListType::const_iterator iter = find(theDisabledModules.begin(), theDisabledModules.end(), module);
34 
35  return iter != theDisabledModules.end();
36 
37 } // bool SiPixelDisabledModules::isModuleDisabled(disabledModuleType module)
bool isModuleDisabled(disabledModuleType module)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
void addDisabledModule(disabledModuleType module)
Definition: DetId.h:17
std::vector< disabledModuleType > disabledModuleListType
bool removeDisabledModule(disabledModuleType module)
Definition: vlib.h:198
disabledModuleListType theDisabledModules