CMS 3D CMS Logo

SimWatcher.h
Go to the documentation of this file.
1 #ifndef Watcher_SimWatcher_h
2 #define Watcher_SimWatcher_h
3 // -*- C++ -*-
4 //
5 // Package: Watcher
6 // Class : SimWatcher
7 //
19 //
20 // Original Author:
21 // Created: Tue Nov 22 15:35:11 EST 2005
22 //
23 
26 
27 class SimWatcher {
28 public:
30  virtual ~SimWatcher() {}
31 
32  // Two methods are needed to be implemented in the thread
33  // safe watchers and producers
35  virtual void beginRun(edm::EventSetup const &){};
36 
37  bool isMT() const { return applicableForMT; }
38 
39  SimWatcher(const SimWatcher &) = delete;
40  const SimWatcher &operator=(const SimWatcher &) = delete;
41 
42 protected:
43  // Set "true" for thread safe watchers/producers
44  void setMT(bool val) { applicableForMT = val; }
45 
46 private:
47  bool applicableForMT{false};
48 };
49 
50 #endif
void setMT(bool val)
Definition: SimWatcher.h:44
virtual void beginRun(edm::EventSetup const &)
Definition: SimWatcher.h:35
const SimWatcher & operator=(const SimWatcher &)=delete
bool isMT() const
Definition: SimWatcher.h:37
bool applicableForMT
Definition: SimWatcher.h:47
virtual ~SimWatcher()
Definition: SimWatcher.h:30
virtual void registerConsumes(edm::ConsumesCollector)
Definition: SimWatcher.h:34