37 if (
void *sym = dlsym(0,
"igprof_dump_now"))
38 dump_ = __extension__ (
void(*)(
const char *)) sym;
41 <<
"IgProfModule requested but application is not"
42 <<
" currently being profiled with igprof\n";
84 if (!
dump_ || format.empty())
96 static std::string
replace(
const std::string &
s,
const char *pat,
int val)
99 size_t patlen = strlen(pat);
101 while ((pos = result.find(pat, pos)) != std::string::npos)
104 int n = sprintf(buf,
"%d", val);
105 result.replace(pos, patlen, buf);
106 pos = pos - patlen +
n;
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
virtual void beginRun(const edm::Run &r, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
virtual void endLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &)
virtual void respondToOpenInputFile(const edm::FileBlock &)
string format
Some error handling for the usage.
virtual void endRun(const edm::Run &, const edm::EventSetup &)
void(* dump_)(const char *)
static std::string replace(const std::string &s, const char *pat, int val)
virtual void beginLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &)
void makeDump(const std::string &format)
LuminosityBlockNumber_t luminosityBlock() const
virtual void analyze(const edm::Event &e, const edm::EventSetup &)
virtual void endJob(void)
IgProfModule(const edm::ParameterSet &ps)