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(std::string const&, bool);
38 
39  void postCloseFile(std::string const&, bool);
40 
41  inline
43  return true;
44  }
45 
46  private:
47 
48  void makeDump(const std::string &format);
49  static std::string replace(const std::string &s,
50  const char *pat, int val);
51 
52  void (*dump_)(const char *);
53 
57 
60 
64 
67 
69  int prescale_;
70  int nrecord_; // counter
71  int nevent_;
72  int nrun_;
73  int nlumi_;
74  int nfileopened_; // counter of files opened thus far
75  int nfileclosed_; // counter of files closed thus far
76 
77  };
78  }
79 }
80 
81 
82 #endif
void postEvent(Event const &ev, EventSetup const &es)
bool isProcessWideService(IgProfService const *)
Definition: IgProfService.h:42
void postCloseFile(std::string const &, bool)
bool ev
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 postOpenFile(std::string const &, bool)
void postEndRun(Run const &run, EventSetup const &es)
void(* dump_)(const char *)
Definition: IgProfService.h:52
void postEndLumi(LuminosityBlock const &run, EventSetup const &es)
void makeDump(const std::string &format)
static std::string replace(const std::string &s, const char *pat, int val)
Definition: Run.h:41