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  public:
23 
24  void postBeginJob();
25 
26  void postBeginRun(GlobalContext const &gc);
27 
28  void postBeginLumi(GlobalContext const &gc);
29 
30  void preEvent(StreamContext const &sc);
31  void postEvent(StreamContext const &sc);
32 
33  void postEndLumi(GlobalContext const &gc);
34 
35  void postEndRun(GlobalContext const &gc);
36 
37  void postEndJob();
38 
39  void postOpenFile(std::string const &, bool);
40 
41  void postCloseFile(std::string const &, bool);
42 
43  inline bool isProcessWideService(IgProfService const *) { return true; }
44 
45  private:
46  void makeDump(const std::string &format);
47  static std::string replace(const std::string &s, const char *pat, int val);
48  static std::string replaceU64(const std::string &s, const char *pat, unsigned long long val);
49 
50  void (*dump_)(const char *);
51 
55 
58 
62 
65 
67  int prescale_;
68  int nrecord_; // counter
72  int nfileopened_; // counter of files opened thus far
73  int nfileclosed_; // counter of files closed thus far
74  };
75  } // namespace service
76 } // namespace edm
77 
78 #endif
edm::service::IgProfService::mineventrecord_
int mineventrecord_
Definition: IgProfService.h:66
edm::service::IgProfService::atPostBeginRun_
std::string atPostBeginRun_
Definition: IgProfService.h:53
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
service
Definition: service.py:1
edm::service::IgProfService::atPostCloseFile_
std::string atPostCloseFile_
Definition: IgProfService.h:64
edm::service::IgProfService::postBeginRun
void postBeginRun(GlobalContext const &gc)
Definition: IgProfService.cc:86
edm
HLT enums.
Definition: AlignableModifier.h:19
RunLumiEventNumber.h
edm::service::IgProfService::preEvent
void preEvent(StreamContext const &sc)
Definition: IgProfService.cc:96
edm::service::IgProfService::nevent_
edm::EventNumber_t nevent_
Definition: IgProfService.h:69
edm::service::IgProfService::replace
static std::string replace(const std::string &s, const char *pat, int val)
Definition: IgProfService.cc:139
edm::service::IgProfService::replaceU64
static std::string replaceU64(const std::string &s, const char *pat, unsigned long long val)
Definition: IgProfService.cc:153
edm::LuminosityBlockNumber_t
unsigned int LuminosityBlockNumber_t
Definition: RunLumiEventNumber.h:13
edm::service::IgProfService::atPostEndJob_
std::string atPostEndJob_
Definition: IgProfService.h:61
edm::service::IgProfService::atPostOpenFile_
std::string atPostOpenFile_
Definition: IgProfService.h:63
edm::service::IgProfService::prescale_
int prescale_
Definition: IgProfService.h:67
ActivityRegistry.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::StreamContext
Definition: StreamContext.h:31
edm::service::IgProfService::postEndLumi
void postEndLumi(GlobalContext const &gc)
Definition: IgProfService.cc:109
edm::service::IgProfService::nrun_
edm::RunNumber_t nrun_
Definition: IgProfService.h:70
edm::service::IgProfService::atPostBeginJob_
std::string atPostBeginJob_
Definition: IgProfService.h:52
edm::ActivityRegistry
Definition: ActivityRegistry.h:134
edm::EventNumber_t
unsigned long long EventNumber_t
Definition: RunLumiEventNumber.h:12
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::GlobalContext
Definition: GlobalContext.h:29
edm::service::IgProfService::atPostEndLumi_
std::string atPostEndLumi_
Definition: IgProfService.h:59
edm::ParameterSet
Definition: ParameterSet.h:47
edm::service::IgProfService::atPostEvent_
std::string atPostEvent_
Definition: IgProfService.h:57
edm::service::IgProfService::atPostEndRun_
std::string atPostEndRun_
Definition: IgProfService.h:60
edm::service::IgProfService::makeDump
void makeDump(const std::string &format)
Definition: IgProfService.cc:125
edm::service::IgProfService::nlumi_
edm::LuminosityBlockNumber_t nlumi_
Definition: IgProfService.h:71
edm::service::IgProfService::postEndJob
void postEndJob()
Definition: IgProfService.cc:113
edm::service::IgProfService::nfileopened_
int nfileopened_
Definition: IgProfService.h:72
edm::service::IgProfService
Definition: IgProfService.h:20
edm::service::IgProfService::postOpenFile
void postOpenFile(std::string const &, bool)
Definition: IgProfService.cc:115
pat
Definition: HeavyIon.h:7
edm::service::IgProfService::postCloseFile
void postCloseFile(std::string const &, bool)
Definition: IgProfService.cc:120
edm::service::IgProfService::postEvent
void postEvent(StreamContext const &sc)
Definition: IgProfService.cc:103
edm::service::IgProfService::atPostBeginLumi_
std::string atPostBeginLumi_
Definition: IgProfService.h:54
edm::service::IgProfService::postBeginJob
void postBeginJob()
Definition: IgProfService.cc:84
heppy_batch.val
val
Definition: heppy_batch.py:351
edm::service::IgProfService::IgProfService
IgProfService(const ParameterSet &, ActivityRegistry &)
Definition: IgProfService.cc:25
edm::service::IgProfService::dump_
void(* dump_)(const char *)
Definition: IgProfService.h:50
edm::service::IgProfService::atPreEvent_
std::string atPreEvent_
Definition: IgProfService.h:56
edm::service::IgProfService::postEndRun
void postEndRun(GlobalContext const &gc)
Definition: IgProfService.cc:111
format
funct::void
TEMPL(T2) struct Divides void
Definition: Factorize.h:24
edm::service::IgProfService::isProcessWideService
bool isProcessWideService(IgProfService const *)
Definition: IgProfService.h:43
edm::service::IgProfService::nrecord_
int nrecord_
Definition: IgProfService.h:68
ParameterSet.h
edm::service::IgProfService::postBeginLumi
void postBeginLumi(GlobalContext const &gc)
Definition: IgProfService.cc:91
edm::service::IgProfService::nfileclosed_
int nfileclosed_
Definition: IgProfService.h:73