47 if (
void *sym = dlsym(0,
"igprof_dump_now")) {
48 dump_ = __extension__ (
void(*)(
const char *)) sym;
51 <<
"IgProfModule requested but application is not" 52 <<
" currently being profiled with igprof\n";
152 if (!
dump_ || format.empty())
162 dump_(
final.c_str());
168 size_t patlen = strlen(pat);
170 while ((pos = result.find(pat, pos)) != std::string::npos)
173 int n = sprintf(buf,
"%d", val);
174 result.replace(pos, patlen, buf);
175 pos = pos - patlen +
n;
184 size_t patlen = strlen(pat);
186 while ((pos = result.find(pat, pos)) != std::string::npos)
189 int n = sprintf(buf,
"%llu", val);
190 result.replace(pos, patlen, buf);
191 pos = pos - patlen +
n;
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
void watchPreEvent(PreEvent::slot_type const &iSlot)
std::string atPostEndLumi_
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
std::string atPostEndJob_
void watchPostEvent(PostEvent::slot_type const &iSlot)
void postCloseFile(std::string const &, bool)
LuminosityBlockID const & luminosityBlockID() const
void watchPostGlobalBeginLumi(PostGlobalBeginLumi::slot_type const &iSlot)
IgProfService(const ParameterSet &, ActivityRegistry &)
void postEndRun(GlobalContext const &gc)
edm::LuminosityBlockNumber_t nlumi_
std::string atPostBeginRun_
std::string atPostOpenFile_
static std::string replaceU64(const std::string &s, const char *pat, unsigned long long val)
void watchPostGlobalBeginRun(PostGlobalBeginRun::slot_type const &iSlot)
void postEvent(StreamContext const &sc)
void watchPostCloseFile(PostCloseFile::slot_type const &iSlot)
std::string atPostEndRun_
void postOpenFile(std::string const &, bool)
std::string atPostCloseFile_
void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const &iSlot)
format
Some error handling for the usage.
void(* dump_)(const char *)
void postBeginLumi(GlobalContext const &gc)
#define DEFINE_FWK_SERVICE(type)
std::string atPostBeginLumi_
void postEndLumi(GlobalContext const &gc)
edm::EventNumber_t nevent_
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
LuminosityBlockNumber_t luminosityBlock() const
void watchPostOpenFile(PostOpenFile::slot_type const &iSlot)
void preEvent(StreamContext const &sc)
EventID const & eventID() const
void makeDump(const std::string &format)
std::string atPostBeginJob_
static std::string replace(const std::string &s, const char *pat, int val)
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
void postBeginRun(GlobalContext const &gc)