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 //
22 //
23 // Original Author:
24 // Created: Tue Nov 22 15:35:11 EST 2005
25 //
26 
29 
30 class SimWatcher {
31 public:
33  virtual ~SimWatcher() {}
34 
35  // Two methods are needed to be implemented in the thread
36  // safe watchers and producers
38  virtual void beginRun(edm::EventSetup const &){};
39 
40  bool isMT() const { return applicableForMT; }
41 
42  SimWatcher(const SimWatcher &) = delete;
43  const SimWatcher &operator=(const SimWatcher &) = delete;
44 
45 protected:
46  // Set "true" for thread safe watchers/producers
47  void setMT(bool val) { applicableForMT = val; }
48 
49 private:
50  bool applicableForMT{false};
51 };
52 
53 #endif
void setMT(bool val)
Definition: SimWatcher.h:47
virtual void beginRun(edm::EventSetup const &)
Definition: SimWatcher.h:38
const SimWatcher & operator=(const SimWatcher &)=delete
bool isMT() const
Definition: SimWatcher.h:40
bool applicableForMT
Definition: SimWatcher.h:50
virtual ~SimWatcher()
Definition: SimWatcher.h:33
virtual void registerConsumes(edm::ConsumesCollector)
Definition: SimWatcher.h:37