CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
bool operator()(const DetId &detid) const
bool isSelected(const DetId &detid) const
std::vector< unsigned int > m_masks
Definition: DetIdSelector.h:30
std::vector< unsigned int > m_selections
Definition: DetIdSelector.h:29
bool isValid() const
Definition: DetIdSelector.h:23
Definition: DetId.h:17
void addSelection(const std::string &selstring)