CMS 3D CMS Logo

RootHandlers.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_RootHandlers_h
2 #define FWCore_Utilities_RootHandlers_h
3 
5 namespace edm {
6  class EventProcessor;
7  class RootHandlers {
8  public:
10 
11  private:
12  struct WarningSentry {
14  m_handler->ignoreWarnings_(level);
15  };
16  ~WarningSentry() { m_handler->enableWarnings_(); }
18  };
20  friend class edm::EventProcessor;
21 
22  public:
23  virtual ~RootHandlers() {}
24 
25  template <typename F>
27  WarningSentry sentry(this, level);
28  iFunc();
29  }
30 
31  private:
32  virtual void willBeUsingThreads() = 0;
33 
34  virtual void enableWarnings_() = 0;
35  virtual void ignoreWarnings_(SeverityLevel level) = 0;
36  };
37 } // end of namespace edm
38 
39 #endif // InitRootHandlers_H
virtual void ignoreWarnings_(SeverityLevel level)=0
virtual void willBeUsingThreads()=0
virtual void enableWarnings_()=0
edm::propagate_const< RootHandlers * > m_handler
Definition: RootHandlers.h:17
WarningSentry(RootHandlers *iHandler, SeverityLevel level)
Definition: RootHandlers.h:13
void ignoreWarningsWhileDoing(F iFunc, SeverityLevel level=SeverityLevel::kWarning)
Definition: RootHandlers.h:26
HLT enums.
virtual ~RootHandlers()
Definition: RootHandlers.h:23
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163