38 if (
void *sym = dlsym(
nullptr,
"igprof_dump_now"))
39 dump_ = __extension__ (
void(*)(
const char *)) sym;
42 <<
"IgProfModule requested but application is not" 43 <<
" currently being profiled with igprof\n";
85 if (!
dump_ || format.empty())
100 size_t patlen = strlen(pat);
102 while ((pos = result.find(pat, pos)) != std::string::npos)
105 int n = sprintf(buf,
"%d", val);
106 result.replace(pos, patlen, buf);
107 pos = pos - patlen +
n;
116 size_t patlen = strlen(pat);
118 while ((pos = result.find(pat, pos)) != std::string::npos)
121 int n = sprintf(buf,
"%llu", val);
122 result.replace(pos, patlen, buf);
123 pos = pos - patlen +
n;
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
void beginLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &) override
void respondToOpenInputFile(const edm::FileBlock &) override
void endLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &) override
edm::LuminosityBlockNumber_t nlumi_
unsigned long long EventNumber_t
unsigned int LuminosityBlockNumber_t
static std::string replace(const std::string &s, const char *pat, int val)
void makeDump(const std::string &format)
LuminosityBlockNumber_t luminosityBlock() const
#define DEFINE_FWK_MODULE(type)
edm::EventNumber_t nevent_
void endRun(const edm::Run &, const edm::EventSetup &) override
format
Some error handling for the usage.
static std::string replaceU64(const std::string &s, const char *pat, unsigned long long val)
void beginRun(const edm::Run &r, const edm::EventSetup &) override
void(* dump_)(const char *)
void analyze(const edm::Event &e, const edm::EventSetup &) override
void endJob(void) override
IgProfModule(const edm::ParameterSet &ps)