CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
IgProfService.h
Go to the documentation of this file.
1 #ifndef IgTools_IgProf_IgProfService_h
2 #define IgTools_IgProf_IgProfService_h
3 
4 //
5 // Description: FWK service to implement hook for igprof memory profile
6 // dump functionality
7 //
8 // Peter Elmer, Princeton University 18 Nov, 2008
9 //
10 
13 
14 namespace edm {
15  class GlobalContext;
16  class StreamContext;
17 
18  namespace service {
19  class IgProfService {
20 
21  public:
22 
24 
25  void postBeginJob();
26 
27  void postBeginRun(GlobalContext const& gc);
28 
29  void postBeginLumi(GlobalContext const &gc);
30 
31  void preEvent(StreamContext const &sc);
32  void postEvent(StreamContext const &sc);
33 
34  void postEndLumi(GlobalContext const &gc);
35 
36  void postEndRun(GlobalContext const &gc);
37 
38  void postEndJob();
39 
40  void postOpenFile(std::string const&, bool);
41 
42  void postCloseFile(std::string const&, bool);
43 
44  inline
46  return true;
47  }
48 
49  private:
50 
51  void makeDump(const std::string &format);
52  static std::string replace(const std::string &s,
53  const char *pat, int val);
54 
55  void (*dump_)(const char *);
56 
60 
63 
67 
70 
72  int prescale_;
73  int nrecord_; // counter
74  int nevent_;
75  int nrun_;
76  int nlumi_;
77  int nfileopened_; // counter of files opened thus far
78  int nfileclosed_; // counter of files closed thus far
79 
80  };
81  }
82 }
83 
84 
85 #endif
bool isProcessWideService(IgProfService const *)
Definition: IgProfService.h:45
void postCloseFile(std::string const &, bool)
IgProfService(const ParameterSet &, ActivityRegistry &)
void postEndRun(GlobalContext const &gc)
void postEvent(StreamContext const &sc)
void postOpenFile(std::string const &, bool)
void(* dump_)(const char *)
Definition: IgProfService.h:55
void postBeginLumi(GlobalContext const &gc)
void postEndLumi(GlobalContext const &gc)
void preEvent(StreamContext const &sc)
void makeDump(const std::string &format)
static std::string replace(const std::string &s, const char *pat, int val)
void postBeginRun(GlobalContext const &gc)