CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
edm::service::IgProfService Class Reference

#include <IgProfService.h>

Public Member Functions

 IgProfService (const ParameterSet &, ActivityRegistry &)
 
void postBeginJob ()
 
void postBeginLumi (GlobalContext const &gc)
 
void postBeginRun (GlobalContext const &gc)
 
void postCloseFile (std::string const &)
 
void postEndJob ()
 
void postEndLumi (GlobalContext const &gc)
 
void postEndProcessBlock (GlobalContext const &gc)
 
void postEndRun (GlobalContext const &gc)
 
void postEvent (StreamContext const &sc)
 
void postModuleEvent (StreamContext const &sc, ModuleCallingContext const &mcc)
 
void postOpenFile (std::string const &)
 
void preEndJob ()
 
void preEndProcessBlock (GlobalContext const &gc)
 
void preEndRun (GlobalContext const &gc)
 
void preEvent (StreamContext const &sc)
 
void preModuleEvent (StreamContext const &sc, ModuleCallingContext const &mcc)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void makeDump (const std::string &format, std::string_view moduleLabel="")
 

Static Private Member Functions

static std::string replace (const std::string &s, const char *pat, int val)
 
static std::string replace (const std::string &s, const char *pat, std::string_view val)
 
static std::string replaceU64 (const std::string &s, const char *pat, unsigned long long val)
 

Private Attributes

std::string atPostBeginJob_
 
std::string atPostBeginLumi_
 
std::string atPostBeginRun_
 
std::string atPostCloseFile_
 
std::string atPostEndJob_
 
std::string atPostEndLumi_
 
std::string atPostEndProcessBlock_
 
std::string atPostEndRun_
 
std::string atPostEvent_
 
std::string atPostModuleEvent_
 
std::string atPostOpenFile_
 
std::string atPreEndJob_
 
std::string atPreEndProcessBlock_
 
std::string atPreEndRun_
 
std::string atPreEvent_
 
std::string atPreModuleEvent_
 
void(* dump_ )(const char *)
 
int mineventrecord_
 
std::vector< std::string > modules_
 
std::vector< std::string > moduleTypes_
 
edm::EventNumber_t nevent_
 
int nfileclosed_
 
int nfileopened_
 
edm::LuminosityBlockNumber_t nlumi_
 
int nrecord_
 
edm::RunNumber_t nrun_
 
int prescale_
 

Detailed Description

Definition at line 21 of file IgProfService.h.

Constructor & Destructor Documentation

◆ IgProfService()

IgProfService::IgProfService ( const ParameterSet ps,
ActivityRegistry iRegistry 
)

Definition at line 25 of file IgProfService.cc.

References atPostBeginJob_, atPostBeginLumi_, atPostBeginRun_, atPostCloseFile_, atPostEndJob_, atPostEndLumi_, atPostEndProcessBlock_, atPostEndRun_, atPostEvent_, atPostModuleEvent_, atPostOpenFile_, atPreEndJob_, atPreEndProcessBlock_, atPreEndRun_, atPreEvent_, atPreModuleEvent_, dump_, edm::ParameterSet::getUntrackedParameter(), mineventrecord_, modules_, moduleTypes_, or, postBeginJob(), postBeginLumi(), postBeginRun(), postCloseFile(), postEndJob(), postEndLumi(), postEndProcessBlock(), postEndRun(), postEvent(), postModuleEvent(), postOpenFile(), preEndJob(), preEndProcessBlock(), preEndRun(), preEvent(), preModuleEvent(), prescale_, jetUpdater_cfi::sort, AlCaHLTBitMon_QueryRunRegistry::string, edm::ActivityRegistry::watchPostBeginJob(), edm::ActivityRegistry::watchPostCloseFile(), edm::ActivityRegistry::watchPostEndJob(), edm::ActivityRegistry::watchPostEndProcessBlock(), edm::ActivityRegistry::watchPostEvent(), edm::ActivityRegistry::watchPostGlobalBeginLumi(), edm::ActivityRegistry::watchPostGlobalBeginRun(), edm::ActivityRegistry::watchPostGlobalEndLumi(), edm::ActivityRegistry::watchPostGlobalEndRun(), edm::ActivityRegistry::watchPostModuleEvent(), edm::ActivityRegistry::watchPostOpenFile(), edm::ActivityRegistry::watchPreEndJob(), edm::ActivityRegistry::watchPreEndProcessBlock(), edm::ActivityRegistry::watchPreEvent(), edm::ActivityRegistry::watchPreGlobalEndRun(), and edm::ActivityRegistry::watchPreModuleEvent().

26  : dump_(nullptr),
27  mineventrecord_(1),
28  prescale_(1),
29  nrecord_(0),
30  nevent_(0),
31  nrun_(0),
32  nlumi_(0),
33  nfileopened_(0),
34  nfileclosed_(0) {
35  // Removing the __extension__ gives a warning which
36  // is acknowledged as a language problem in the C++ Standard Core
37  // Language Defect Report
38  //
39  // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#195
40  //
41  // since the suggested decision seems to be that the syntax should
42  // actually be "Conditionally-Supported Behavior" in some
43  // future C++ standard I simply silence the warning.
44  if (void *sym = dlsym(nullptr, "igprof_dump_now")) {
45  dump_ = __extension__(void (*)(const char *)) sym;
46  } else
47  edm::LogWarning("IgProfModule") << "IgProfModule requested but application is not"
48  << " currently being profiled with igprof\n";
49 
50  // Get the configuration
51  prescale_ = ps.getUntrackedParameter<int>("reportEventInterval", prescale_);
52  mineventrecord_ = ps.getUntrackedParameter<int>("reportFirstEvent", mineventrecord_);
53 
54  atPostBeginJob_ = ps.getUntrackedParameter<std::string>("reportToFileAtPostBeginJob", atPostBeginJob_);
55  atPostBeginRun_ = ps.getUntrackedParameter<std::string>("reportToFileAtPostBeginRun", atPostBeginRun_);
56  atPostBeginLumi_ = ps.getUntrackedParameter<std::string>("reportToFileAtPostBeginLumi", atPostBeginLumi_);
57 
58  atPreEvent_ = ps.getUntrackedParameter<std::string>("reportToFileAtPreEvent", atPreEvent_);
59  atPostEvent_ = ps.getUntrackedParameter<std::string>("reportToFileAtPostEvent", atPostEvent_);
60 
61  modules_ = ps.getUntrackedParameter<std::vector<std::string>>("reportModules", modules_);
62  moduleTypes_ = ps.getUntrackedParameter<std::vector<std::string>>("reportModuleTypes", moduleTypes_);
63  std::sort(modules_.begin(), modules_.end());
64  std::sort(moduleTypes_.begin(), moduleTypes_.end());
65  atPreModuleEvent_ = ps.getUntrackedParameter<std::string>("reportToFileAtPreModuleEvent", atPreModuleEvent_);
66  atPostModuleEvent_ = ps.getUntrackedParameter<std::string>("reportToFileAtPostModuleEvent", atPostModuleEvent_);
67 
68  atPostEndLumi_ = ps.getUntrackedParameter<std::string>("reportToFileAtPostEndLumi", atPostEndLumi_);
69  atPreEndRun_ = ps.getUntrackedParameter<std::string>("reportToFileAtPreEndRun", atPreEndRun_);
70  atPostEndRun_ = ps.getUntrackedParameter<std::string>("reportToFileAtPostEndRun", atPostEndRun_);
72  ps.getUntrackedParameter<std::string>("reportToFileAtPreEndProcessBlock", atPreEndProcessBlock_);
74  ps.getUntrackedParameter<std::string>("reportToFileAtPostEndProcessBlock", atPostEndProcessBlock_);
75  atPreEndJob_ = ps.getUntrackedParameter<std::string>("reportToFileAtPreEndJob", atPreEndJob_);
76  atPostEndJob_ = ps.getUntrackedParameter<std::string>("reportToFileAtPostEndJob", atPostEndJob_);
77 
78  atPostOpenFile_ = ps.getUntrackedParameter<std::string>("reportToFileAtPostOpenFile", atPostOpenFile_);
79  atPostCloseFile_ = ps.getUntrackedParameter<std::string>("reportToFileAtPostCloseFile", atPostCloseFile_);
80 
81  // Register for the framework signals
82  iRegistry.watchPostBeginJob(this, &IgProfService::postBeginJob);
83  iRegistry.watchPostGlobalBeginRun(this, &IgProfService::postBeginRun);
84  iRegistry.watchPostGlobalBeginLumi(this, &IgProfService::postBeginLumi);
85 
86  iRegistry.watchPreEvent(this, &IgProfService::preEvent);
87  iRegistry.watchPostEvent(this, &IgProfService::postEvent);
88 
89  if (not modules_.empty() or not moduleTypes_.empty()) {
90  iRegistry.watchPreModuleEvent(this, &IgProfService::preModuleEvent);
91  iRegistry.watchPostModuleEvent(this, &IgProfService::postModuleEvent);
92  }
93 
94  iRegistry.watchPostGlobalEndLumi(this, &IgProfService::postEndLumi);
95  iRegistry.watchPreGlobalEndRun(this, &IgProfService::preEndRun);
96  iRegistry.watchPostGlobalEndRun(this, &IgProfService::postEndRun);
97  iRegistry.watchPreEndProcessBlock(this, &IgProfService::preEndProcessBlock);
98  iRegistry.watchPostEndProcessBlock(this, &IgProfService::postEndProcessBlock);
99  iRegistry.watchPreEndJob(this, &IgProfService::preEndJob);
100  iRegistry.watchPostEndJob(this, &IgProfService::postEndJob);
101 
102  iRegistry.watchPostOpenFile(this, &IgProfService::postOpenFile);
103  iRegistry.watchPostCloseFile(this, &IgProfService::postCloseFile);
104 }
void postOpenFile(std::string const &)
void postEndRun(GlobalContext const &gc)
edm::LuminosityBlockNumber_t nlumi_
Definition: IgProfService.h:90
void preEndRun(GlobalContext const &gc)
void preModuleEvent(StreamContext const &sc, ModuleCallingContext const &mcc)
void postEvent(StreamContext const &sc)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::vector< std::string > modules_
Definition: IgProfService.h:69
std::string atPostEndProcessBlock_
Definition: IgProfService.h:78
void preEndProcessBlock(GlobalContext const &gc)
void postCloseFile(std::string const &)
void(* dump_)(const char *)
Definition: IgProfService.h:60
void postBeginLumi(GlobalContext const &gc)
std::vector< std::string > moduleTypes_
Definition: IgProfService.h:70
void postEndLumi(GlobalContext const &gc)
edm::EventNumber_t nevent_
Definition: IgProfService.h:88
void postModuleEvent(StreamContext const &sc, ModuleCallingContext const &mcc)
void preEvent(StreamContext const &sc)
void postEndProcessBlock(GlobalContext const &gc)
Log< level::Warning, false > LogWarning
void postBeginRun(GlobalContext const &gc)

Member Function Documentation

◆ fillDescriptions()

void IgProfService::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 106 of file IgProfService.cc.

References edm::ConfigurationDescriptions::addDefault(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

106  {
108 
109  desc.setComment(
110  "All file parameters allow the following replaceable tokens:\n"
111  " %I : record number\n"
112  " %E : event number\n"
113  " %R : run number\n"
114  " %L : lumi number\n"
115  " %F : file open count\n"
116  " %C : file close count\n"
117  " %M : module label");
118  desc.addUntracked<int>("reportEventInterval", 1)->setComment("write a new file every n events");
119  desc.addUntracked<int>("reportFirstEvent", 1)->setComment("first event count to start writing files");
120  ;
121 
122  desc.addUntracked<std::string>("reportToFileAtPostBeginJob", "");
123  desc.addUntracked<std::string>("reportToFileAtPostBeginRun", "");
124  desc.addUntracked<std::string>("reportToFileAtPostBeginLumi", "");
125 
126  desc.addUntracked<std::string>("reportToFileAtPreEvent", "");
127  desc.addUntracked<std::string>("reportToFileAtPostEvent", "");
128 
129  desc.addUntracked<std::vector<std::string>>("reportModules", {});
130  desc.addUntracked<std::vector<std::string>>("reportModuleTypes", {});
131 
132  desc.addUntracked<std::string>("reportToFileAtPreModuleEvent", "");
133  desc.addUntracked<std::string>("reportToFileAtPostModuleEvent", "");
134 
135  desc.addUntracked<std::string>("reportToFileAtPostEndLumi", "");
136  desc.addUntracked<std::string>("reportToFileAtPreEndRun", "");
137  desc.addUntracked<std::string>("reportToFileAtPostEndRun", "");
138  desc.addUntracked<std::string>("reportToFileAtPreEndProcessBlock", "");
139  desc.addUntracked<std::string>("reportToFileAtPostEndProcessBlock", "");
140  desc.addUntracked<std::string>("reportToFileAtPreEndJob", "");
141  desc.addUntracked<std::string>("reportToFileAtPostEndJob", "");
142 
143  desc.addUntracked<std::string>("reportToFileAtPostOpenFile", "");
144  desc.addUntracked<std::string>("reportToFileAtPostCloseFile", "");
145 
146  descriptions.addDefault(desc);
147 }
void addDefault(ParameterSetDescription const &psetDescription)

◆ makeDump()

void IgProfService::makeDump ( const std::string &  format,
std::string_view  moduleLabel = "" 
)
private

Definition at line 231 of file IgProfService.cc.

References dump_, dqm-mbProfile::format, HerwigMaxPtPartonFilter_cfi::moduleLabel, nevent_, nfileclosed_, nfileopened_, nlumi_, nrecord_, nrun_, replace(), replaceU64(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by postBeginJob(), postBeginLumi(), postBeginRun(), postCloseFile(), postEndJob(), postEndLumi(), postEndProcessBlock(), postEndRun(), postEvent(), postModuleEvent(), postOpenFile(), preEndJob(), preEndProcessBlock(), preEndRun(), preEvent(), and preModuleEvent().

231  {
232  if (!dump_ || format.empty())
233  return;
234 
235  std::string final(format);
236  final = replace(final, "%I", nrecord_);
237  final = replaceU64(final, "%E", nevent_);
238  final = replaceU64(final, "%R", nrun_);
239  final = replaceU64(final, "%L", nlumi_);
240  final = replace(final, "%F", nfileopened_);
241  final = replace(final, "%C", nfileclosed_);
242  final = replace(final, "%M", moduleLabel);
243  dump_(final.c_str());
244 }
edm::LuminosityBlockNumber_t nlumi_
Definition: IgProfService.h:90
static std::string replaceU64(const std::string &s, const char *pat, unsigned long long val)
void(* dump_)(const char *)
Definition: IgProfService.h:60
edm::EventNumber_t nevent_
Definition: IgProfService.h:88
static std::string replace(const std::string &s, const char *pat, int val)

◆ postBeginJob()

void IgProfService::postBeginJob ( )

Definition at line 149 of file IgProfService.cc.

References atPostBeginJob_, and makeDump().

Referenced by IgProfService().

void makeDump(const std::string &format, std::string_view moduleLabel="")

◆ postBeginLumi()

void IgProfService::postBeginLumi ( GlobalContext const &  gc)

Definition at line 156 of file IgProfService.cc.

References atPostBeginLumi_, edm::LuminosityBlockID::luminosityBlock(), edm::GlobalContext::luminosityBlockID(), makeDump(), and nlumi_.

Referenced by IgProfService().

156  {
157  nlumi_ = gc.luminosityBlockID().luminosityBlock();
159 }
edm::LuminosityBlockNumber_t nlumi_
Definition: IgProfService.h:90
void makeDump(const std::string &format, std::string_view moduleLabel="")

◆ postBeginRun()

void IgProfService::postBeginRun ( GlobalContext const &  gc)

Definition at line 151 of file IgProfService.cc.

References atPostBeginRun_, edm::GlobalContext::luminosityBlockID(), makeDump(), nrun_, and edm::LuminosityBlockID::run().

Referenced by IgProfService().

151  {
152  nrun_ = gc.luminosityBlockID().run();
154 }
void makeDump(const std::string &format, std::string_view moduleLabel="")

◆ postCloseFile()

void IgProfService::postCloseFile ( std::string const &  )

Definition at line 226 of file IgProfService.cc.

References atPostCloseFile_, makeDump(), and nfileclosed_.

Referenced by IgProfService().

226  {
227  ++nfileclosed_;
229 }
void makeDump(const std::string &format, std::string_view moduleLabel="")

◆ postEndJob()

void IgProfService::postEndJob ( )

Definition at line 219 of file IgProfService.cc.

References atPostEndJob_, and makeDump().

Referenced by IgProfService().

void makeDump(const std::string &format, std::string_view moduleLabel="")

◆ postEndLumi()

void IgProfService::postEndLumi ( GlobalContext const &  gc)

Definition at line 198 of file IgProfService.cc.

References atPostEndLumi_, edm::LuminosityBlockID::luminosityBlock(), edm::GlobalContext::luminosityBlockID(), makeDump(), and nlumi_.

Referenced by IgProfService().

198  {
199  nlumi_ = gc.luminosityBlockID().luminosityBlock();
201 }
edm::LuminosityBlockNumber_t nlumi_
Definition: IgProfService.h:90
void makeDump(const std::string &format, std::string_view moduleLabel="")

◆ postEndProcessBlock()

void IgProfService::postEndProcessBlock ( GlobalContext const &  gc)

Definition at line 215 of file IgProfService.cc.

References atPostEndProcessBlock_, and makeDump().

Referenced by IgProfService().

void makeDump(const std::string &format, std::string_view moduleLabel="")
std::string atPostEndProcessBlock_
Definition: IgProfService.h:78

◆ postEndRun()

void IgProfService::postEndRun ( GlobalContext const &  gc)

Definition at line 208 of file IgProfService.cc.

References atPostEndRun_, edm::GlobalContext::luminosityBlockID(), makeDump(), nrun_, and edm::LuminosityBlockID::run().

Referenced by IgProfService().

208  {
209  nrun_ = gc.luminosityBlockID().run();
211 }
void makeDump(const std::string &format, std::string_view moduleLabel="")

◆ postEvent()

void IgProfService::postEvent ( StreamContext const &  sc)

Definition at line 168 of file IgProfService.cc.

References atPostEvent_, edm::EventID::event(), edm::StreamContext::eventID(), makeDump(), mineventrecord_, nevent_, nrecord_, and prescale_.

Referenced by IgProfService().

168  {
169  nevent_ = iStream.eventID().event();
170  if ((prescale_ > 0) && (nrecord_ >= mineventrecord_) && (((nrecord_ - mineventrecord_) % prescale_) == 0))
172 }
void makeDump(const std::string &format, std::string_view moduleLabel="")
edm::EventNumber_t nevent_
Definition: IgProfService.h:88

◆ postModuleEvent()

void IgProfService::postModuleEvent ( StreamContext const &  sc,
ModuleCallingContext const &  mcc 
)

Definition at line 186 of file IgProfService.cc.

References atPostModuleEvent_, edm::EventID::event(), edm::StreamContext::eventID(), makeDump(), mineventrecord_, edm::ModuleCallingContext::moduleDescription(), HerwigMaxPtPartonFilter_cfi::moduleLabel, edm::ModuleDescription::moduleLabel(), edm::ModuleDescription::moduleName(), modules_, moduleTypes_, nevent_, nrecord_, or, and prescale_.

Referenced by IgProfService().

186  {
187  nevent_ = iStream.eventID().event();
188  if ((prescale_ > 0) && (nrecord_ >= mineventrecord_) && (((nrecord_ - mineventrecord_) % prescale_) == 0)) {
189  auto const &moduleLabel = mcc.moduleDescription()->moduleLabel();
190  auto const &moduleType = mcc.moduleDescription()->moduleName();
191  if (std::binary_search(modules_.begin(), modules_.end(), moduleLabel) or
192  std::binary_search(moduleTypes_.begin(), moduleTypes_.end(), moduleType)) {
194  }
195  }
196 }
void makeDump(const std::string &format, std::string_view moduleLabel="")
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::vector< std::string > modules_
Definition: IgProfService.h:69
std::vector< std::string > moduleTypes_
Definition: IgProfService.h:70
edm::EventNumber_t nevent_
Definition: IgProfService.h:88

◆ postOpenFile()

void IgProfService::postOpenFile ( std::string const &  )

Definition at line 221 of file IgProfService.cc.

References atPostOpenFile_, makeDump(), and nfileopened_.

Referenced by IgProfService().

221  {
222  ++nfileopened_;
224 }
void makeDump(const std::string &format, std::string_view moduleLabel="")

◆ preEndJob()

void IgProfService::preEndJob ( )

Definition at line 217 of file IgProfService.cc.

References atPreEndJob_, and makeDump().

Referenced by IgProfService().

void makeDump(const std::string &format, std::string_view moduleLabel="")

◆ preEndProcessBlock()

void IgProfService::preEndProcessBlock ( GlobalContext const &  gc)

Definition at line 213 of file IgProfService.cc.

References atPreEndProcessBlock_, and makeDump().

Referenced by IgProfService().

void makeDump(const std::string &format, std::string_view moduleLabel="")

◆ preEndRun()

void IgProfService::preEndRun ( GlobalContext const &  gc)

Definition at line 203 of file IgProfService.cc.

References atPreEndRun_, edm::GlobalContext::luminosityBlockID(), makeDump(), nrun_, and edm::LuminosityBlockID::run().

Referenced by IgProfService().

203  {
204  nrun_ = gc.luminosityBlockID().run();
206 }
void makeDump(const std::string &format, std::string_view moduleLabel="")

◆ preEvent()

void IgProfService::preEvent ( StreamContext const &  sc)

Definition at line 161 of file IgProfService.cc.

References atPreEvent_, edm::EventID::event(), edm::StreamContext::eventID(), makeDump(), mineventrecord_, nevent_, nrecord_, and prescale_.

Referenced by IgProfService().

161  {
162  ++nrecord_; // count before events
163  nevent_ = iStream.eventID().event();
164  if ((prescale_ > 0) && (nrecord_ >= mineventrecord_) && (((nrecord_ - mineventrecord_) % prescale_) == 0))
166 }
void makeDump(const std::string &format, std::string_view moduleLabel="")
edm::EventNumber_t nevent_
Definition: IgProfService.h:88

◆ preModuleEvent()

void IgProfService::preModuleEvent ( StreamContext const &  sc,
ModuleCallingContext const &  mcc 
)

Definition at line 174 of file IgProfService.cc.

References atPreModuleEvent_, edm::EventID::event(), edm::StreamContext::eventID(), makeDump(), mineventrecord_, edm::ModuleCallingContext::moduleDescription(), HerwigMaxPtPartonFilter_cfi::moduleLabel, edm::ModuleDescription::moduleLabel(), edm::ModuleDescription::moduleName(), modules_, moduleTypes_, nevent_, nrecord_, or, and prescale_.

Referenced by IgProfService().

174  {
175  nevent_ = iStream.eventID().event();
176  if ((prescale_ > 0) && (nrecord_ >= mineventrecord_) && (((nrecord_ - mineventrecord_) % prescale_) == 0)) {
177  auto const &moduleLabel = mcc.moduleDescription()->moduleLabel();
178  auto const &moduleType = mcc.moduleDescription()->moduleName();
179  if (std::binary_search(modules_.begin(), modules_.end(), moduleLabel) or
180  std::binary_search(moduleTypes_.begin(), moduleTypes_.end(), moduleType)) {
182  }
183  }
184 }
void makeDump(const std::string &format, std::string_view moduleLabel="")
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::vector< std::string > modules_
Definition: IgProfService.h:69
std::vector< std::string > moduleTypes_
Definition: IgProfService.h:70
edm::EventNumber_t nevent_
Definition: IgProfService.h:88

◆ replace() [1/2]

std::string IgProfService::replace ( const std::string &  s,
const char *  pat,
int  val 
)
staticprivate

Definition at line 246 of file IgProfService.cc.

References visDQMUpload::buf, dqmiodumpmetadata::n, mps_fire::result, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and heppy_batch::val.

Referenced by makeDump().

246  {
247  size_t pos = 0;
248  size_t patlen = strlen(pat);
249  std::string result = s;
250  while ((pos = result.find(pat, pos)) != std::string::npos) {
251  char buf[64];
252  int n = sprintf(buf, "%d", val);
253  result.replace(pos, patlen, buf);
254  pos = pos - patlen + n;
255  }
256 
257  return result;
258 }
Definition: HeavyIon.h:7

◆ replace() [2/2]

std::string IgProfService::replace ( const std::string &  s,
const char *  pat,
std::string_view  val 
)
staticprivate

Definition at line 274 of file IgProfService.cc.

References mps_fire::result, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and heppy_batch::val.

274  {
275  size_t pos = 0;
276  size_t patlen = strlen(pat);
277  std::string result = s;
278  while ((pos = result.find(pat, pos)) != std::string::npos) {
279  result.replace(pos, patlen, val.data());
280  pos = pos - patlen + val.size();
281  }
282 
283  return result;
284 }
Definition: HeavyIon.h:7

◆ replaceU64()

std::string IgProfService::replaceU64 ( const std::string &  s,
const char *  pat,
unsigned long long  val 
)
staticprivate

Definition at line 260 of file IgProfService.cc.

References visDQMUpload::buf, dqmiodumpmetadata::n, mps_fire::result, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and heppy_batch::val.

Referenced by makeDump().

260  {
261  size_t pos = 0;
262  size_t patlen = strlen(pat);
263  std::string result = s;
264  while ((pos = result.find(pat, pos)) != std::string::npos) {
265  char buf[64];
266  int n = sprintf(buf, "%llu", val);
267  result.replace(pos, patlen, buf);
268  pos = pos - patlen + n;
269  }
270 
271  return result;
272 }
Definition: HeavyIon.h:7

Member Data Documentation

◆ atPostBeginJob_

std::string edm::service::IgProfService::atPostBeginJob_
private

Definition at line 62 of file IgProfService.h.

Referenced by IgProfService(), and postBeginJob().

◆ atPostBeginLumi_

std::string edm::service::IgProfService::atPostBeginLumi_
private

Definition at line 64 of file IgProfService.h.

Referenced by IgProfService(), and postBeginLumi().

◆ atPostBeginRun_

std::string edm::service::IgProfService::atPostBeginRun_
private

Definition at line 63 of file IgProfService.h.

Referenced by IgProfService(), and postBeginRun().

◆ atPostCloseFile_

std::string edm::service::IgProfService::atPostCloseFile_
private

Definition at line 83 of file IgProfService.h.

Referenced by IgProfService(), and postCloseFile().

◆ atPostEndJob_

std::string edm::service::IgProfService::atPostEndJob_
private

Definition at line 80 of file IgProfService.h.

Referenced by IgProfService(), and postEndJob().

◆ atPostEndLumi_

std::string edm::service::IgProfService::atPostEndLumi_
private

Definition at line 74 of file IgProfService.h.

Referenced by IgProfService(), and postEndLumi().

◆ atPostEndProcessBlock_

std::string edm::service::IgProfService::atPostEndProcessBlock_
private

Definition at line 78 of file IgProfService.h.

Referenced by IgProfService(), and postEndProcessBlock().

◆ atPostEndRun_

std::string edm::service::IgProfService::atPostEndRun_
private

Definition at line 76 of file IgProfService.h.

Referenced by IgProfService(), and postEndRun().

◆ atPostEvent_

std::string edm::service::IgProfService::atPostEvent_
private

Definition at line 67 of file IgProfService.h.

Referenced by IgProfService(), and postEvent().

◆ atPostModuleEvent_

std::string edm::service::IgProfService::atPostModuleEvent_
private

Definition at line 72 of file IgProfService.h.

Referenced by IgProfService(), and postModuleEvent().

◆ atPostOpenFile_

std::string edm::service::IgProfService::atPostOpenFile_
private

Definition at line 82 of file IgProfService.h.

Referenced by IgProfService(), and postOpenFile().

◆ atPreEndJob_

std::string edm::service::IgProfService::atPreEndJob_
private

Definition at line 79 of file IgProfService.h.

Referenced by IgProfService(), and preEndJob().

◆ atPreEndProcessBlock_

std::string edm::service::IgProfService::atPreEndProcessBlock_
private

Definition at line 77 of file IgProfService.h.

Referenced by IgProfService(), and preEndProcessBlock().

◆ atPreEndRun_

std::string edm::service::IgProfService::atPreEndRun_
private

Definition at line 75 of file IgProfService.h.

Referenced by IgProfService(), and preEndRun().

◆ atPreEvent_

std::string edm::service::IgProfService::atPreEvent_
private

Definition at line 66 of file IgProfService.h.

Referenced by IgProfService(), and preEvent().

◆ atPreModuleEvent_

std::string edm::service::IgProfService::atPreModuleEvent_
private

Definition at line 71 of file IgProfService.h.

Referenced by IgProfService(), and preModuleEvent().

◆ dump_

void(* edm::service::IgProfService::dump_) (const char *)
private

Definition at line 60 of file IgProfService.h.

Referenced by IgProfService(), and makeDump().

◆ mineventrecord_

int edm::service::IgProfService::mineventrecord_
private

Definition at line 85 of file IgProfService.h.

Referenced by IgProfService(), postEvent(), postModuleEvent(), preEvent(), and preModuleEvent().

◆ modules_

std::vector<std::string> edm::service::IgProfService::modules_
private

Definition at line 69 of file IgProfService.h.

Referenced by IgProfService(), postModuleEvent(), and preModuleEvent().

◆ moduleTypes_

std::vector<std::string> edm::service::IgProfService::moduleTypes_
private

Definition at line 70 of file IgProfService.h.

Referenced by IgProfService(), postModuleEvent(), and preModuleEvent().

◆ nevent_

edm::EventNumber_t edm::service::IgProfService::nevent_
private

Definition at line 88 of file IgProfService.h.

Referenced by makeDump(), postEvent(), postModuleEvent(), preEvent(), and preModuleEvent().

◆ nfileclosed_

int edm::service::IgProfService::nfileclosed_
private

Definition at line 92 of file IgProfService.h.

Referenced by makeDump(), and postCloseFile().

◆ nfileopened_

int edm::service::IgProfService::nfileopened_
private

Definition at line 91 of file IgProfService.h.

Referenced by makeDump(), and postOpenFile().

◆ nlumi_

edm::LuminosityBlockNumber_t edm::service::IgProfService::nlumi_
private

Definition at line 90 of file IgProfService.h.

Referenced by makeDump(), postBeginLumi(), and postEndLumi().

◆ nrecord_

int edm::service::IgProfService::nrecord_
private

Definition at line 87 of file IgProfService.h.

Referenced by makeDump(), postEvent(), postModuleEvent(), preEvent(), and preModuleEvent().

◆ nrun_

edm::RunNumber_t edm::service::IgProfService::nrun_
private

Definition at line 89 of file IgProfService.h.

Referenced by makeDump(), postBeginRun(), postEndRun(), and preEndRun().

◆ prescale_

int edm::service::IgProfService::prescale_
private

Definition at line 86 of file IgProfService.h.

Referenced by IgProfService(), postEvent(), postModuleEvent(), preEvent(), and preModuleEvent().