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.size()!=0;}
24 
25  private:
26 
27  void addSelection(const std::string& selstring);
28  void addSelection(const std::vector<std::string>& selstrings);
29 
30  std::vector<unsigned int> m_selections;
31  std::vector<unsigned int> m_masks;
32 
33 };
34 
35 #endif // DetIdSelector_h
std::vector< unsigned int > m_masks
Definition: DetIdSelector.h:31
std::vector< unsigned int > m_selections
Definition: DetIdSelector.h:30
bool isValid() const
Definition: DetIdSelector.h:23
Definition: DetId.h:18
HLT enums.