Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:33

0001 // SiPixelDisabledModules.h
0002 //
0003 // class definition to hold a list of disabled pixel modules
0004 //
0005 // M. Eads
0006 // Apr 2008
0007 
0008 #ifndef SiPixelDisabledModules_H
0009 #define SiPixelDisabledModules_H
0010 
0011 #include "CondFormats/Serialization/interface/Serializable.h"
0012 
0013 #include <vector>
0014 #include <utility>
0015 
0016 #include "DataFormats/DetId/interface/DetId.h"
0017 
0018 class SiPixelDisabledModules {
0019 public:
0020   typedef DetId disabledModuleType;
0021   typedef std::vector<disabledModuleType> disabledModuleListType;
0022 
0023   SiPixelDisabledModules() { ; }
0024 
0025   // constructor from a list of disabled modules
0026   SiPixelDisabledModules(const disabledModuleListType& disabledModules) : theDisabledModules(disabledModules) { ; }
0027 
0028   virtual ~SiPixelDisabledModules() { ; }
0029 
0030   // return the list of disabled modules/ROCs
0031   disabledModuleListType getDisabledModuleList() { return theDisabledModules; }
0032 
0033   // set the list of disabled modules (current list is lost)
0034   void setDisabledModuleList(const disabledModuleListType& disabledModules) { theDisabledModules = disabledModules; }
0035 
0036   // add a single module to the vector of disabled modules
0037   void addDisabledModule(disabledModuleType module) { theDisabledModules.push_back(module); }
0038 
0039   // add a vector of modules to the vector of disabled modules
0040   void addDisabledModule(const disabledModuleListType& idVector);
0041 
0042   // remove disabled module from the list
0043   // returns false if id not in disable list, true otherwise
0044   bool removeDisabledModule(disabledModuleType module);
0045 
0046   // check if a particular module is in the disabled list
0047   // return true if it is
0048   bool isModuleDisabled(disabledModuleType module);
0049 
0050 private:
0051   disabledModuleListType theDisabledModules;
0052 
0053   COND_SERIALIZABLE;
0054 };  // class SiPixelDisabledModules
0055 
0056 #endif