CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
InitRootHandlers.h
Go to the documentation of this file.
1 #ifndef FWCore_Services_InitRootHandlers_h
2 #define FWCore_Services_InitRootHandlers_h
3 
4 #include <memory>
6 
7 namespace std {
8  class thread;
9 }
10 
11 namespace edm {
13  class ParameterSet;
14  class ActivityRegistry;
15 
16  namespace service {
17  class InitRootHandlers : public RootHandlers {
18 
19  friend int cmssw_stacktrace(void *);
20 
21  public:
22  explicit InitRootHandlers(ParameterSet const& pset, ActivityRegistry& iReg);
23  virtual ~InitRootHandlers();
24 
25  static void fillDescriptions(ConfigurationDescriptions& descriptions);
26  static void stacktraceFromThread();
27 
28  private:
29  static char *const *getPstackArgv();
30  virtual void enableWarnings_() override;
31  virtual void ignoreWarnings_() override;
32  virtual void willBeUsingThreads() override;
33  virtual void initializeThisThreadForUse() override;
34 
35  void cachePidInfoHandler(unsigned int, unsigned int) {cachePidInfo();}
36  void cachePidInfo();
37  static void stacktraceHelperThread();
38 
39  static const int pidStringLength_ = 200;
41  static char * const pstackArgv_[];
42  static int parentToChild_[2];
43  static int childToParent_[2];
44  static std::unique_ptr<std::thread> helperThread_;
49  std::shared_ptr<const void> sigBusHandler_;
50  std::shared_ptr<const void> sigSegvHandler_;
51  std::shared_ptr<const void> sigIllHandler_;
52  };
53 
54  inline
56  return true;
57  }
58 
59  } // end of namespace service
60 } // end of namespace edm
61 
62 #endif // InitRootHandlers_H
virtual void enableWarnings_() override
static char *const pstackArgv_[]
bool isProcessWideService(TFileService const *)
Definition: TFileService.h:99
std::shared_ptr< const void > sigSegvHandler_
friend int cmssw_stacktrace(void *)
std::shared_ptr< const void > sigBusHandler_
void cachePidInfoHandler(unsigned int, unsigned int)
static char pidString_[pidStringLength_]
static char *const * getPstackArgv()
std::shared_ptr< const void > sigIllHandler_
virtual void initializeThisThreadForUse() override
virtual void ignoreWarnings_() override
static std::unique_ptr< std::thread > helperThread_
InitRootHandlers(ParameterSet const &pset, ActivityRegistry &iReg)
virtual void willBeUsingThreads() override
static void fillDescriptions(ConfigurationDescriptions &descriptions)