CMS 3D CMS Logo

DetIdSelector.h
Go to the documentation of this file.
1 #ifndef DetIdSelector_h
2 #define DetIdSelector_h
3 
4 #include <string>
5 #include <vector>
6 
7 class DetId;
8 namespace edm {
9  class ParameterSet;
10 }
11 
13 public:
14  DetIdSelector();
15  DetIdSelector(const std::string& selstring);
16  DetIdSelector(const std::vector<std::string>& selstrings);
17  DetIdSelector(const edm::ParameterSet& selconfig);
18 
19  bool isSelected(const DetId& detid) const;
20  bool isSelected(const unsigned int& rawid) const;
21  bool operator()(const DetId& detid) const;
22  bool operator()(const unsigned int& rawid) const;
23  inline bool isValid() const { return !m_selections.empty(); }
24 
25 private:
26  void addSelection(const std::string& selstring);
27  void addSelection(const std::vector<std::string>& selstrings);
28 
29  std::vector<unsigned int> m_selections;
30  std::vector<unsigned int> m_masks;
31 };
32 
33 #endif // DetIdSelector_h
DetIdSelector::isValid
bool isValid() const
Definition: DetIdSelector.h:23
edm
HLT enums.
Definition: AlignableModifier.h:19
DetIdSelector::operator()
bool operator()(const DetId &detid) const
Definition: DetIdSelector.cc:53
DetIdSelector::addSelection
void addSelection(const std::string &selstring)
Definition: DetIdSelector.cc:19
DetId
Definition: DetId.h:17
DetIdSelector::DetIdSelector
DetIdSelector()
Definition: DetIdSelector.cc:6
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:36
ParameterSet
Definition: Functions.h:16
DetIdSelector::m_selections
std::vector< unsigned int > m_selections
Definition: DetIdSelector.h:29
DetIdSelector::m_masks
std::vector< unsigned int > m_masks
Definition: DetIdSelector.h:30
DetIdSelector::isSelected
bool isSelected(const DetId &detid) const
Definition: DetIdSelector.cc:51
DetIdSelector
Definition: DetIdSelector.h:12