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  private:
9  struct WarningSentry {
10  WarningSentry(RootHandlers* iHandler): m_handler(iHandler){
11  m_handler->ignoreWarnings_();
12  };
14  m_handler->enableWarnings_();
15  }
17  };
19  friend class edm::EventProcessor;
20 
21  public:
23  virtual ~RootHandlers () {}
24 
25  template<typename F>
27  WarningSentry sentry(this);
28  iFunc();
29  }
30 
31  private:
32  virtual void willBeUsingThreads() = 0;
33  virtual void initializeThisThreadForUse() = 0;
34 
35  virtual void enableWarnings_() = 0;
36  virtual void ignoreWarnings_() = 0;
37  };
38 } // end of namespace edm
39 
40 #endif // InitRootHandlers_H
void ignoreWarningsWhileDoing(F iFunc)
Definition: RootHandlers.h:26
WarningSentry(RootHandlers *iHandler)
Definition: RootHandlers.h:10
virtual void willBeUsingThreads()=0
virtual void enableWarnings_()=0
edm::propagate_const< RootHandlers * > m_handler
Definition: RootHandlers.h:16
virtual void initializeThisThreadForUse()=0
HLT enums.
virtual ~RootHandlers()
Definition: RootHandlers.h:23
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
virtual void ignoreWarnings_()=0