Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:32

0001 // SiPixelDisabledModules.cc
0002 //
0003 // class implementation to hold a list of disabled pixel modules
0004 //
0005 // M. Eads
0006 // Apr 2008
0007 
0008 #include "CondFormats/SiPixelObjects/interface/SiPixelDisabledModules.h"
0009 
0010 #include <algorithm>
0011 
0012 // add a list of modules to the vector of disabled modules
0013 void SiPixelDisabledModules::addDisabledModule(const disabledModuleListType& idVector) {
0014   theDisabledModules.insert(theDisabledModules.end(), idVector.begin(), idVector.end());
0015 
0016 }  // void SiPixelDisabledModules::addDisabledModule(disabledModuleListType idVector)
0017 
0018 // remove disabled module from the list
0019 // returns false if id not in disable list, true otherwise
0020 bool SiPixelDisabledModules::removeDisabledModule(disabledModuleType module) {
0021   disabledModuleListType::iterator iter = find(theDisabledModules.begin(), theDisabledModules.end(), module);
0022   if (iter == theDisabledModules.end())
0023     return false;
0024 
0025   theDisabledModules.erase(iter);
0026   return true;
0027 
0028 }  // bool SiPixelDisabledModules::removeDisabledModule(disabledModuleType module)
0029 
0030 // method to return true if the specified module is in the list
0031 // of disabled modules
0032 bool SiPixelDisabledModules::isModuleDisabled(disabledModuleType module) {
0033   disabledModuleListType::const_iterator iter = find(theDisabledModules.begin(), theDisabledModules.end(), module);
0034 
0035   return iter != theDisabledModules.end();
0036 
0037 }  // bool SiPixelDisabledModules::isModuleDisabled(disabledModuleType module)