CondFormats
SiPixelObjects
src
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
8
#include "
CondFormats/SiPixelObjects/interface/SiPixelDisabledModules.h
"
9
10
#include <algorithm>
11
12
// add a list of modules to the vector of disabled modules
13
void
SiPixelDisabledModules::addDisabledModule
(
const
disabledModuleListType
& idVector) {
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
20
bool
SiPixelDisabledModules::removeDisabledModule
(
disabledModuleType
module) {
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
32
bool
SiPixelDisabledModules::isModuleDisabled
(
disabledModuleType
module) {
33
disabledModuleListType::const_iterator iter =
find
(
theDisabledModules
.begin(),
theDisabledModules
.end(), module);
34
35
return
iter !=
theDisabledModules
.end();
36
37
}
// bool SiPixelDisabledModules::isModuleDisabled(disabledModuleType module)
SiPixelDisabledModules::theDisabledModules
disabledModuleListType theDisabledModules
Definition:
SiPixelDisabledModules.h:51
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition:
FindCaloHit.cc:19
SiPixelDisabledModules.h
DetId
Definition:
DetId.h:17
SiPixelDisabledModules::addDisabledModule
void addDisabledModule(disabledModuleType module)
Definition:
SiPixelDisabledModules.h:37
SiPixelDisabledModules::disabledModuleListType
std::vector< disabledModuleType > disabledModuleListType
Definition:
SiPixelDisabledModules.h:21
SiPixelDisabledModules::removeDisabledModule
bool removeDisabledModule(disabledModuleType module)
Definition:
SiPixelDisabledModules.cc:20
SiPixelDisabledModules::isModuleDisabled
bool isModuleDisabled(disabledModuleType module)
Definition:
SiPixelDisabledModules.cc:32
Generated for CMSSW Reference Manual by
1.8.16