CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SelectorBase.h
Go to the documentation of this file.
1 #ifndef Framework_SelectorBase_h
2 #define Framework_SelectorBase_h
3 
4 /*----------------------------------------------------------------------
5 
6 Selector: Base class for all "selector" objects, used to select
7 EDProducts based on information in the associated Provenance.
8 
9 Developers who make their own Selectors should inherit from SelectorBase.
10 
11 ----------------------------------------------------------------------*/
13 
14 namespace edm
15 {
16  class ConstBranchDescription;
17 
18  //------------------------------------------------------------------
19  //
21  //
22  //------------------------------------------------------------------
23 
24  class SelectorBase {
25  public:
26  virtual ~SelectorBase();
27  bool match(ConstBranchDescription const& p) const;
28  virtual SelectorBase* clone() const = 0;
29 
30  private:
31  virtual bool doMatch(ConstBranchDescription const& p) const = 0;
32  };
33 
34  template <>
36  static SelectorBase* clone(SelectorBase const * p) { return p->clone(); }
37  };
38 }
39 
40 #endif
bool match(ConstBranchDescription const &p) const
Definition: SelectorBase.cc:15
virtual SelectorBase * clone() const =0
virtual ~SelectorBase()
Definition: SelectorBase.cc:11
static SelectorBase * clone(SelectorBase const *p)
Definition: SelectorBase.h:36
virtual bool doMatch(ConstBranchDescription const &p) const =0