test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DummySelector.h
Go to the documentation of this file.
1 #ifndef CommonTools_UtilAlgos_DummySelector_h
2 #define CommonTools_UtilAlgos_DummySelector_h
3 /* \class DummySelector
4  *
5  * Dummy generic selector following the
6  * interface proposed in the document:
7  *
8  * https://twiki.cern.ch/twiki/bin/view/CMS/SelectorInterface
9  *
10  * \author Luca Lista, INFN
11  */
14 
15 namespace edm {
16  class ParameterSet;
17  class Event;
18  class EventSetup;
19 }
20 
22 public:
24  void newEvent(const edm::Event&, const edm::EventSetup&) { updated_ = true; }
25  template<typename T>
26  bool operator()(const T&) {
27  if(!updated_)
29  << "DummySelector: forgot to call newEvent\n";
30  return true;
31  }
32 private:
33  bool updated_;
34 };
35 
36 namespace dummy {
37  template<typename T>
38  inline bool select(const T&) { return true; }
39 }
40 
42 
43 #endif
bool select(const T &)
Definition: DummySelector.h:38
bool operator()(const T &)
Definition: DummySelector.h:26
void newEvent(const edm::Event &, const edm::EventSetup &)
Definition: DummySelector.h:24
DummySelector(const edm::ParameterSet &, edm::ConsumesCollector &iC)
Definition: DummySelector.h:23
volatile std::atomic< bool > shutdown_flag false
EVENTSETUP_STD_INIT(DummySelector)
long double T