CMS 3D CMS Logo

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 
14 
15 namespace edm {
16  class GlobalContext;
17  class StreamContext;
18 
19  namespace service {
20  class IgProfService {
21 
22  public:
23 
25 
26  void postBeginJob();
27 
28  void postBeginRun(GlobalContext const& gc);
29 
30  void postBeginLumi(GlobalContext const &gc);
31 
32  void preEvent(StreamContext const &sc);
33  void postEvent(StreamContext const &sc);
34 
35  void postEndLumi(GlobalContext const &gc);
36 
37  void postEndRun(GlobalContext const &gc);
38 
39  void postEndJob();
40 
41  void postOpenFile(std::string const&, bool);
42 
43  void postCloseFile(std::string const&, bool);
44 
45  inline
47  return true;
48  }
49 
50  private:
51 
52  void makeDump(const std::string &format);
53  static std::string replace(const std::string &s,
54  const char *pat, int val);
55  static std::string replaceU64(const std::string &s,
56  const char *pat, unsigned long long val);
57 
58  void (*dump_)(const char *);
59 
63 
66 
70 
73 
75  int prescale_;
76  int nrecord_; // counter
80  int nfileopened_; // counter of files opened thus far
81  int nfileclosed_; // counter of files closed thus far
82 
83  };
84  }
85 }
86 
87 
88 #endif
bool isProcessWideService(IgProfService const *)
Definition: IgProfService.h:46
void postCloseFile(std::string const &, bool)
unsigned long long EventNumber_t
IgProfService(const ParameterSet &, ActivityRegistry &)
void postEndRun(GlobalContext const &gc)
edm::LuminosityBlockNumber_t nlumi_
Definition: IgProfService.h:79
unsigned int LuminosityBlockNumber_t
Definition: HeavyIon.h:7
static std::string replaceU64(const std::string &s, const char *pat, unsigned long long val)
void postEvent(StreamContext const &sc)
void postOpenFile(std::string const &, bool)
void(* dump_)(const char *)
Definition: IgProfService.h:58
void postBeginLumi(GlobalContext const &gc)
void postEndLumi(GlobalContext const &gc)
edm::EventNumber_t nevent_
Definition: IgProfService.h:77
HLT enums.
void preEvent(StreamContext const &sc)
unsigned int RunNumber_t
void makeDump(const std::string &format)
static std::string replace(const std::string &s, const char *pat, int val)
void postBeginRun(GlobalContext const &gc)