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  namespace service {
16  class IgProfService {
17 
18  public:
19 
21 
22  void postBeginJob();
23 
24  void postBeginRun(Run const& run, EventSetup const& es);
25 
26  void postBeginLumi(LuminosityBlock const& run, EventSetup const& es);
27 
28  void preEvent(EventID const& id, Timestamp const& ts);
29  void postEvent(Event const& ev, EventSetup const& es);
30 
31  void postEndLumi(LuminosityBlock const& run, EventSetup const& es);
32 
33  void postEndRun(Run const& run, EventSetup const& es);
34 
35  void postEndJob();
36 
37  void postOpenFile();
38 
39  void postCloseFile();
40 
41  private:
42 
43  void makeDump(const std::string &format);
44  static std::string replace(const std::string &s,
45  const char *pat, int val);
46 
47  void (*dump_)(const char *);
48 
49  std::string atPostBeginJob_;
50  std::string atPostBeginRun_;
51  std::string atPostBeginLumi_;
52 
53  std::string atPreEvent_;
54  std::string atPostEvent_;
55 
56  std::string atPostEndLumi_;
57  std::string atPostEndRun_;
58  std::string atPostEndJob_;
59 
60  std::string atPostOpenFile_;
61  std::string atPostCloseFile_;
62 
64  int prescale_;
65  int nrecord_; // counter
66  int nevent_;
67  int nrun_;
68  int nlumi_;
69  int nfileopened_; // counter of files opened thus far
70  int nfileclosed_; // counter of files closed thus far
71 
72  };
73  }
74 }
75 
76 
77 #endif
void postEvent(Event const &ev, EventSetup const &es)
void preEvent(EventID const &id, Timestamp const &ts)
IgProfService(const ParameterSet &, ActivityRegistry &)
void postBeginRun(Run const &run, EventSetup const &es)
void postBeginLumi(LuminosityBlock const &run, EventSetup const &es)
void postEndRun(Run const &run, EventSetup const &es)
void(* dump_)(const char *)
Definition: IgProfService.h:47
void postEndLumi(LuminosityBlock const &run, EventSetup const &es)
string s
Definition: asciidump.py:422
void makeDump(const std::string &format)
static std::string replace(const std::string &s, const char *pat, int val)
Definition: Run.h:31