CMS 3D CMS Logo

tracer_setupFile.cc
Go to the documentation of this file.
1 #include "tracer_setupFile.h"
3 
4 #include <chrono>
5 
6 #include <sstream>
7 #include <type_traits>
8 #include <cassert>
9 #include <typeindex>
10 
12 
18 
26 
29 
31 
33 
34 namespace {
35  using duration_t = std::chrono::microseconds;
36  using clock_t = std::chrono::steady_clock;
37  auto const now = clock_t::now;
38 
39  enum class Step : char {
40  preSourceTransition = 'S',
41  postSourceTransition = 's',
42  preModulePrefetching = 'P',
43  postModulePrefetching = 'p',
44  preModuleEventAcquire = 'A',
45  postModuleEventAcquire = 'a',
46  preModuleTransition = 'M',
47  preEventReadFromSource = 'R',
48  postEventReadFromSource = 'r',
49  preModuleEventDelayedGet = 'D',
50  postModuleEventDelayedGet = 'd',
51  postModuleTransition = 'm',
52  preESModulePrefetching = 'Q',
53  postESModulePrefetching = 'q',
54  preESModule = 'N',
55  postESModule = 'n',
56  preESModuleAcquire = 'B',
57  postESModuleAcquire = 'b',
58  preFrameworkTransition = 'F',
59  postFrameworkTransition = 'f'
60  };
61 
62  enum class Phase : short {
63  destruction = -16,
64  endJob = -12,
65  endStream = -11,
66  writeProcessBlock = -10,
67  endProcessBlock = -9,
68  globalWriteRun = -7,
69  globalEndRun = -6,
70  streamEndRun = -5,
71  globalWriteLumi = -4,
72  globalEndLumi = -3,
73  streamEndLumi = -2,
74  clearEvent = -1,
75  Event = 0,
76  streamBeginLumi = 2,
77  globalBeginLumi = 3,
78  streamBeginRun = 5,
79  globalBeginRun = 6,
80  accessInputProcessBlock = 8,
81  beginProcessBlock = 9,
82  openFile = 10,
83  beginStream = 11,
84  beginJob = 12,
85  esSync = 13,
86  esSyncEnqueue = 14,
87  getNextTransition = 15,
88  construction = 16,
89  startTracing = 17
90  };
91 
92  std::ostream& operator<<(std::ostream& os, Step const s) {
93  os << static_cast<std::underlying_type_t<Step>>(s);
94  return os;
95  }
96 
97  std::ostream& operator<<(std::ostream& os, Phase const s) {
98  os << static_cast<std::underlying_type_t<Phase>>(s);
99  return os;
100  }
101 
102  template <Step S, typename... ARGS>
103  std::string assembleMessage(ARGS const... args) {
104  std::ostringstream oss;
105  oss << S;
106  concatenate(oss, args...);
107  oss << '\n';
108  return oss.str();
109  }
110 
111  Phase toTransitionImpl(edm::StreamContext const& iContext) {
112  using namespace edm;
113  switch (iContext.transition()) {
115  return Phase::beginStream;
117  return Phase::streamBeginRun;
119  return Phase::streamBeginLumi;
121  return Phase::Event;
123  return Phase::streamEndLumi;
125  return Phase::streamEndRun;
127  return Phase::endStream;
128  default:
129  break;
130  }
131  assert(false);
132  return Phase::Event;
133  }
134 
135  auto toTransition(edm::StreamContext const& iContext) -> std::underlying_type_t<Phase> {
136  return static_cast<std::underlying_type_t<Phase>>(toTransitionImpl(iContext));
137  }
138 
139  Phase toTransitionImpl(edm::GlobalContext const& iContext) {
140  using namespace edm;
141  switch (iContext.transition()) {
143  return Phase::beginProcessBlock;
145  return Phase::accessInputProcessBlock;
147  return Phase::globalBeginRun;
149  return Phase::globalBeginLumi;
151  return Phase::globalEndLumi;
153  return Phase::globalWriteLumi;
155  return Phase::globalEndRun;
157  return Phase::globalWriteRun;
159  return Phase::endProcessBlock;
161  return Phase::writeProcessBlock;
162  default:
163  break;
164  }
165  assert(false);
166  return Phase::Event;
167  }
168  auto toTransition(edm::GlobalContext const& iContext) -> std::underlying_type_t<Phase> {
169  return static_cast<std::underlying_type_t<Phase>>(toTransitionImpl(iContext));
170  }
171 
172  unsigned int toTransitionIndex(edm::GlobalContext const& iContext) {
177  return 0;
178  }
182  return iContext.runIndex();
183  }
184  return iContext.luminosityBlockIndex();
185  }
186 
187  template <Step S>
188  struct ESModuleState {
189  ESModuleState(std::shared_ptr<edm::ThreadSafeOutputFileStream> logFile,
190  decltype(now()) beginTime,
191  std::shared_ptr<std::vector<std::type_index>> recordIndices)
192  : logFile_{logFile}, recordIndices_{recordIndices}, beginTime_{beginTime} {}
193 
194  void operator()(edm::eventsetup::EventSetupRecordKey const& iKey,
195  edm::ESModuleCallingContext const& iContext) const {
196  using namespace edm;
197  auto const t = std::chrono::duration_cast<duration_t>(now() - beginTime_).count();
198  auto top = iContext.getTopModuleCallingContext();
199  short int phase = 0;
200  unsigned long phaseID = 0xFFFFFFFF;
201  if (top->type() == ParentContext::Type::kGlobal) {
202  auto global = top->globalContext();
203  phase = toTransition(*global);
204  phaseID = toTransitionIndex(*global);
205  } else if (top->type() == ParentContext::Type::kStream) {
206  auto stream = top->getStreamContext();
207  phase = toTransition(*stream);
208  phaseID = stream_id(*stream);
209  } else if (top->type() == ParentContext::Type::kPlaceInPath) {
210  auto stream = top->getStreamContext();
211  phase = toTransition(*stream);
212  phaseID = stream_id(*stream);
213  }
214  auto recordIndex = findRecordIndices(iKey);
215  long long requestingModuleID;
216  decltype(iContext.moduleCallingContext()->callID()) requestingCallID;
217  if (iContext.type() == ESParentContext::Type::kModule) {
218  requestingModuleID = iContext.moduleCallingContext()->moduleDescription()->id();
219  requestingCallID = iContext.moduleCallingContext()->callID();
220  } else {
221  requestingModuleID =
222  -1 * static_cast<long long>(iContext.esmoduleCallingContext()->componentDescription()->id_ + 1);
223  requestingCallID = iContext.esmoduleCallingContext()->callID();
224  }
225  auto msg = assembleMessage<S>(phase,
226  phaseID,
227  iContext.componentDescription()->id_ + 1,
228  recordIndex,
229  iContext.callID(),
230  requestingModuleID,
231  requestingCallID,
232  t);
233  logFile_->write(std::move(msg));
234  }
235 
236  private:
237  int findRecordIndices(edm::eventsetup::EventSetupRecordKey const& iKey) const {
238  auto index = std::type_index(iKey.type().value());
239  auto itFind = std::find(recordIndices_->begin(), recordIndices_->end(), index);
240  return itFind - recordIndices_->begin();
241  }
242 
243  std::shared_ptr<edm::ThreadSafeOutputFileStream> logFile_;
244  std::shared_ptr<std::vector<std::type_index>> recordIndices_;
245  decltype(now()) beginTime_;
246  };
247 
248  template <Step S>
249  struct GlobalEDModuleState {
250  GlobalEDModuleState(std::shared_ptr<edm::ThreadSafeOutputFileStream> logFile, decltype(now()) beginTime)
251  : logFile_{logFile}, beginTime_{beginTime} {}
252 
253  void operator()(edm::GlobalContext const& gc, edm::ModuleCallingContext const& mcc) {
254  using namespace edm;
255  auto const t = std::chrono::duration_cast<duration_t>(now() - beginTime_).count();
256  long requestingModuleID = 0;
257  decltype(mcc.parent().moduleCallingContext()->callID()) requestingCallID = 0;
258  if (mcc.type() == ParentContext::Type::kModule) {
259  requestingModuleID = module_id(*mcc.parent().moduleCallingContext());
260  requestingCallID = mcc.parent().moduleCallingContext()->callID();
261  }
262  auto msg = assembleMessage<S>(toTransition(gc),
263  toTransitionIndex(gc),
264  module_id(mcc),
265  module_callid(mcc),
266  requestingModuleID,
267  requestingCallID,
268  t);
269  logFile_->write(std::move(msg));
270  }
271 
272  private:
273  std::shared_ptr<edm::ThreadSafeOutputFileStream> logFile_;
274  decltype(now()) beginTime_;
275  };
276 
277  template <Step S>
278  struct StreamEDModuleState {
279  StreamEDModuleState(std::shared_ptr<edm::ThreadSafeOutputFileStream> logFile, decltype(now()) beginTime)
280  : logFile_{logFile}, beginTime_{beginTime} {}
281 
282  void operator()(edm::StreamContext const& sc, edm::ModuleCallingContext const& mcc) {
283  using namespace edm;
284  auto const t = std::chrono::duration_cast<duration_t>(now() - beginTime_).count();
285  long requestingModuleID = 0;
286  decltype(mcc.parent().moduleCallingContext()->callID()) requestingCallID = 0;
287  if (mcc.type() == ParentContext::Type::kModule) {
288  requestingModuleID = module_id(*mcc.parent().moduleCallingContext());
289  requestingCallID = mcc.parent().moduleCallingContext()->callID();
290  }
291  auto msg = assembleMessage<S>(
292  toTransition(sc), stream_id(sc), module_id(mcc), module_callid(mcc), requestingModuleID, requestingCallID, t);
293  logFile_->write(std::move(msg));
294  }
295 
296  private:
297  std::shared_ptr<edm::ThreadSafeOutputFileStream> logFile_;
298  decltype(now()) beginTime_;
299  };
300 
301  struct ModuleCtrDtr {
302  long long beginConstruction = 0;
303  long long endConstruction = 0;
304  long long beginDestruction = 0;
305  long long endDestruction = 0;
306  };
307 } // namespace
308 
310  void setupFile(std::string const& iFileName, edm::ActivityRegistry& iRegistry) {
311  auto beginTracer = now();
312  using namespace std::chrono;
313 
314  if (iFileName.empty()) {
315  return;
316  }
317 
318  auto logFile = std::make_shared<edm::ThreadSafeOutputFileStream>(iFileName);
319 
320  auto beginTime = TimingServiceBase::jobStartTime();
321 
322  auto esModuleLabelsPtr = std::make_shared<std::vector<std::string>>();
323  auto& esModuleLabels = *esModuleLabelsPtr;
324  //acquire names for all the ED and ES modules
325  iRegistry.watchPostESModuleRegistration([&esModuleLabels](auto const& iDescription) {
326  if (esModuleLabels.size() <= iDescription.id_ + 1) {
327  esModuleLabels.resize(iDescription.id_ + 2);
328  }
329  //NOTE: we want the id to start at 1 not 0
330  if (not iDescription.label_.empty()) {
331  esModuleLabels[iDescription.id_ + 1] = iDescription.label_;
332  } else {
333  esModuleLabels[iDescription.id_ + 1] = iDescription.type_;
334  }
335  });
336  auto moduleCtrDtrPtr = std::make_shared<std::vector<ModuleCtrDtr>>();
337  auto& moduleCtrDtr = *moduleCtrDtrPtr;
338  auto moduleLabelsPtr = std::make_shared<std::vector<std::string>>();
339  auto& moduleLabels = *moduleLabelsPtr;
340  iRegistry.watchPreModuleConstruction([&moduleLabels, &moduleCtrDtr, beginTime](ModuleDescription const& md) {
341  auto const t = duration_cast<duration_t>(now() - beginTime).count();
342 
343  auto const mid = md.id();
344  if (mid < moduleLabels.size()) {
345  moduleLabels[mid] = md.moduleLabel();
346  moduleCtrDtr[mid].beginConstruction = t;
347  } else {
348  moduleLabels.resize(mid + 1);
349  moduleLabels.back() = md.moduleLabel();
350  moduleCtrDtr.resize(mid + 1);
351  moduleCtrDtr.back().beginConstruction = t;
352  }
353  });
354  iRegistry.watchPostModuleConstruction([&moduleCtrDtr, beginTime](auto const& md) {
355  auto const t = duration_cast<duration_t>(now() - beginTime).count();
356  moduleCtrDtr[md.id()].endConstruction = t;
357  });
358 
359  iRegistry.watchPreModuleDestruction([&moduleCtrDtr, beginTime](auto const& md) {
360  auto const t = duration_cast<duration_t>(now() - beginTime).count();
361  moduleCtrDtr[md.id()].beginDestruction = t;
362  });
363  iRegistry.watchPostModuleDestruction([&moduleCtrDtr, beginTime](auto const& md) {
364  auto const t = duration_cast<duration_t>(now() - beginTime).count();
365  moduleCtrDtr[md.id()].endDestruction = t;
366  });
367 
368  auto sourceCtrPtr = std::make_shared<ModuleCtrDtr>();
369  auto& sourceCtr = *sourceCtrPtr;
370  iRegistry.watchPreSourceConstruction([&sourceCtr, beginTime](auto const&) {
371  auto const t = duration_cast<duration_t>(now() - beginTime).count();
372  sourceCtr.beginConstruction = t;
373  });
374  iRegistry.watchPostSourceConstruction([&sourceCtr, beginTime](auto const&) {
375  auto const t = duration_cast<duration_t>(now() - beginTime).count();
376  sourceCtr.endConstruction = t;
377  });
378 
379  auto recordIndices = std::make_shared<std::vector<std::type_index>>();
381  [logFile, recordIndices](auto const& recordsToResolvers, auto const&) mutable {
382  std::ostringstream oss;
383 
384  auto recordKeys = recordsToResolvers.recordKeys();
385  std::sort(recordKeys.begin(), recordKeys.end());
386  std::vector<std::string> recordNames;
387  //want id to start at 1 not 0
388  recordNames.reserve(recordKeys.size() + 1);
389  recordNames.emplace_back("");
390  recordIndices->reserve(recordKeys.size() + 1);
391  recordIndices->push_back(std::type_index(typeid(void)));
392  for (auto const& r : recordKeys) {
393  recordNames.push_back(r.name());
394  recordIndices->push_back(std::type_index(r.type().value()));
395  }
396 
397  moduleIdToLabel(oss, recordNames, 'R', "Record ID", "Record name");
398  logFile->write(oss.str());
399  });
400 
401  iRegistry.watchPreBeginJob([logFile,
402  moduleLabelsPtr,
403  esModuleLabelsPtr,
404  moduleCtrDtrPtr,
405  sourceCtrPtr,
406  beginTime,
407  beginTracer](auto&, auto&) mutable {
408  {
409  std::ostringstream oss;
410  moduleIdToLabel(oss, *moduleLabelsPtr, 'M', "EDModule ID", "Module label");
411  logFile->write(oss.str());
412  moduleLabelsPtr.reset();
413  }
414  {
415  std::ostringstream oss;
416  moduleIdToLabel(oss, *esModuleLabelsPtr, 'N', "ESModule ID", "ESModule label");
417  logFile->write(oss.str());
418  esModuleLabelsPtr.reset();
419  }
420  {
421  auto const tracerStart = duration_cast<duration_t>(beginTracer - beginTime).count();
422  auto msg = assembleMessage<Step::preFrameworkTransition>(
423  static_cast<std::underlying_type_t<Phase>>(Phase::startTracing), 0, 0, 0, 0, tracerStart);
424  logFile->write(std::move(msg));
425  }
426  //NOTE: the source construction can run concurently with module construction so we need to properly
427  // interleave its timing in with the modules
428  auto srcBeginConstruction = sourceCtrPtr->beginConstruction;
429  auto srcEndConstruction = sourceCtrPtr->endConstruction;
430  sourceCtrPtr.reset();
431  auto handleSource = [&srcBeginConstruction, &srcEndConstruction, &logFile](long long iTime) mutable {
432  if (srcBeginConstruction != 0 and srcBeginConstruction < iTime) {
433  auto bmsg = assembleMessage<Step::preSourceTransition>(
434  static_cast<std::underlying_type_t<Phase>>(Phase::construction), 0, srcBeginConstruction);
435  logFile->write(std::move(bmsg));
436  srcBeginConstruction = 0;
437  }
438  if (srcEndConstruction != 0 and srcEndConstruction < iTime) {
439  auto bmsg = assembleMessage<Step::postSourceTransition>(
440  static_cast<std::underlying_type_t<Phase>>(Phase::construction), 0, srcEndConstruction);
441  logFile->write(std::move(bmsg));
442  srcEndConstruction = 0;
443  }
444  };
445  {
446  std::sort(moduleCtrDtrPtr->begin(), moduleCtrDtrPtr->end(), [](auto const& l, auto const& r) {
447  return l.beginConstruction < r.beginConstruction;
448  });
449  int id = 0;
450  for (auto const& ctr : *moduleCtrDtrPtr) {
451  if (ctr.beginConstruction != 0) {
452  handleSource(ctr.beginConstruction);
453  auto bmsg = assembleMessage<Step::preModuleTransition>(
454  static_cast<std::underlying_type_t<Phase>>(Phase::construction), 0, id, 0, 0, 0, ctr.beginConstruction);
455  logFile->write(std::move(bmsg));
456  handleSource(ctr.endConstruction);
457  auto emsg = assembleMessage<Step::postModuleTransition>(
458  static_cast<std::underlying_type_t<Phase>>(Phase::construction), 0, id, 0, 0, 0, ctr.endConstruction);
459  logFile->write(std::move(emsg));
460  }
461  ++id;
462  }
463  id = 0;
464  std::sort(moduleCtrDtrPtr->begin(), moduleCtrDtrPtr->end(), [](auto const& l, auto const& r) {
465  return l.beginDestruction < r.beginDestruction;
466  });
467  for (auto const& dtr : *moduleCtrDtrPtr) {
468  if (dtr.beginDestruction != 0) {
469  handleSource(dtr.beginDestruction);
470  auto bmsg = assembleMessage<Step::preModuleTransition>(
471  static_cast<std::underlying_type_t<Phase>>(Phase::destruction), 0, id, 0, 0, 0, dtr.beginDestruction);
472  logFile->write(std::move(bmsg));
473  handleSource(dtr.endDestruction);
474  auto emsg = assembleMessage<Step::postModuleTransition>(
475  static_cast<std::underlying_type_t<Phase>>(Phase::destruction), 0, id, 0, 0, 0, dtr.endDestruction);
476  logFile->write(std::move(emsg));
477  }
478  ++id;
479  }
480  moduleCtrDtrPtr.reset();
481  }
482  auto const t = duration_cast<duration_t>(now() - beginTime).count();
483  handleSource(t);
484  auto msg = assembleMessage<Step::preFrameworkTransition>(
485  static_cast<std::underlying_type_t<Phase>>(Phase::beginJob), 0, 0, 0, 0, t);
486  logFile->write(std::move(msg));
487  });
488  iRegistry.watchPostBeginJob([logFile, beginTime]() {
489  auto const t = duration_cast<duration_t>(now() - beginTime).count();
490  auto msg = assembleMessage<Step::postFrameworkTransition>(
491  static_cast<std::underlying_type_t<Phase>>(Phase::beginJob), 0, 0, 0, 0, t);
492  logFile->write(std::move(msg));
493  });
494 
495  iRegistry.watchPreEndJob([logFile, beginTime]() {
496  auto const t = duration_cast<duration_t>(now() - beginTime).count();
497  auto msg = assembleMessage<Step::preFrameworkTransition>(
498  static_cast<std::underlying_type_t<Phase>>(Phase::endJob), 0, 0, 0, 0, t);
499  logFile->write(std::move(msg));
500  });
501  iRegistry.watchPostEndJob([logFile, beginTime]() {
502  auto const t = duration_cast<duration_t>(now() - beginTime).count();
503  auto msg = assembleMessage<Step::postFrameworkTransition>(
504  static_cast<std::underlying_type_t<Phase>>(Phase::endJob), 0, 0, 0, 0, t);
505  logFile->write(std::move(msg));
506  });
507 
508  iRegistry.watchPreEvent([logFile, beginTime](auto const& sc) {
509  auto const t = duration_cast<duration_t>(now() - beginTime).count();
510  auto msg = assembleMessage<Step::preFrameworkTransition>(static_cast<std::underlying_type_t<Phase>>(Phase::Event),
511  stream_id(sc),
512  sc.eventID().run(),
513  sc.eventID().luminosityBlock(),
514  sc.eventID().event(),
515  t);
516  logFile->write(std::move(msg));
517  });
518  iRegistry.watchPostEvent([logFile, beginTime](auto const& sc) {
519  auto const t = duration_cast<duration_t>(now() - beginTime).count();
520  auto msg =
521  assembleMessage<Step::postFrameworkTransition>(static_cast<std::underlying_type_t<Phase>>(Phase::Event),
522  stream_id(sc),
523  sc.eventID().run(),
524  sc.eventID().luminosityBlock(),
525  sc.eventID().event(),
526  t);
527  logFile->write(std::move(msg));
528  });
529 
530  iRegistry.watchPreClearEvent([logFile, beginTime](auto const& sc) {
531  auto const t = duration_cast<duration_t>(now() - beginTime).count();
532  auto msg =
533  assembleMessage<Step::preFrameworkTransition>(static_cast<std::underlying_type_t<Phase>>(Phase::clearEvent),
534  stream_id(sc),
535  sc.eventID().run(),
536  sc.eventID().luminosityBlock(),
537  sc.eventID().event(),
538  t);
539  logFile->write(std::move(msg));
540  });
541  iRegistry.watchPostClearEvent([logFile, beginTime](auto const& sc) {
542  auto const t = duration_cast<duration_t>(now() - beginTime).count();
543  auto msg =
544  assembleMessage<Step::postFrameworkTransition>(static_cast<std::underlying_type_t<Phase>>(Phase::clearEvent),
545  stream_id(sc),
546  sc.eventID().run(),
547  sc.eventID().luminosityBlock(),
548  sc.eventID().event(),
549  t);
550  logFile->write(std::move(msg));
551  });
552 
553  {
554  auto preGlobal = [logFile, beginTime](GlobalContext const& gc) {
555  auto const t = duration_cast<duration_t>(now() - beginTime).count();
556  auto msg = assembleMessage<Step::preFrameworkTransition>(toTransition(gc),
557  toTransitionIndex(gc),
558  gc.luminosityBlockID().run(),
560  0,
561  t);
562  logFile->write(std::move(msg));
563  };
564  iRegistry.watchPreBeginProcessBlock(preGlobal);
565  iRegistry.watchPreEndProcessBlock(preGlobal);
566  iRegistry.watchPreWriteProcessBlock(preGlobal);
567  iRegistry.watchPreAccessInputProcessBlock(preGlobal);
568  iRegistry.watchPreGlobalBeginRun(preGlobal);
569  iRegistry.watchPreGlobalBeginLumi(preGlobal);
570  iRegistry.watchPreGlobalEndLumi(preGlobal);
571  iRegistry.watchPreGlobalWriteLumi(preGlobal);
572  iRegistry.watchPreGlobalEndRun(preGlobal);
573  iRegistry.watchPreGlobalWriteRun(preGlobal);
574  }
575  {
576  auto postGlobal = [logFile, beginTime](GlobalContext const& gc) {
577  auto const t = duration_cast<duration_t>(now() - beginTime).count();
578  auto msg = assembleMessage<Step::postFrameworkTransition>(toTransition(gc),
579  toTransitionIndex(gc),
580  gc.luminosityBlockID().run(),
582  0,
583  t);
584  logFile->write(std::move(msg));
585  };
586  iRegistry.watchPostBeginProcessBlock(postGlobal);
587  iRegistry.watchPostEndProcessBlock(postGlobal);
588  iRegistry.watchPostWriteProcessBlock(postGlobal);
589  iRegistry.watchPostAccessInputProcessBlock(postGlobal);
590  iRegistry.watchPostGlobalBeginRun(postGlobal);
591  iRegistry.watchPostGlobalBeginLumi(postGlobal);
592  iRegistry.watchPostGlobalEndLumi(postGlobal);
593  iRegistry.watchPostGlobalWriteLumi(postGlobal);
594  iRegistry.watchPostGlobalEndRun(postGlobal);
595  iRegistry.watchPostGlobalWriteRun(postGlobal);
596  }
597  {
598  auto preStream = [logFile, beginTime](StreamContext const& sc) {
599  auto const t = duration_cast<duration_t>(now() - beginTime).count();
600  auto msg = assembleMessage<Step::preFrameworkTransition>(
601  toTransition(sc), stream_id(sc), sc.eventID().run(), sc.eventID().luminosityBlock(), 0, t);
602  logFile->write(std::move(msg));
603  };
604  iRegistry.watchPreStreamBeginRun(preStream);
605  iRegistry.watchPreStreamBeginLumi(preStream);
606  iRegistry.watchPreStreamEndLumi(preStream);
607  iRegistry.watchPreStreamEndRun(preStream);
608  }
609  {
610  auto postStream = [logFile, beginTime](StreamContext const& sc) {
611  auto const t = duration_cast<duration_t>(now() - beginTime).count();
612  auto msg = assembleMessage<Step::postFrameworkTransition>(
613  toTransition(sc), stream_id(sc), sc.eventID().run(), sc.eventID().luminosityBlock(), 0, t);
614  logFile->write(std::move(msg));
615  };
616  iRegistry.watchPostStreamBeginRun(postStream);
617  iRegistry.watchPostStreamBeginLumi(postStream);
618  iRegistry.watchPostStreamEndLumi(postStream);
619  iRegistry.watchPostStreamEndRun(postStream);
620  }
621  {
622  iRegistry.watchESSyncIOVQueuing([logFile, beginTime](IOVSyncValue const& sv) {
623  auto const t = duration_cast<duration_t>(now() - beginTime).count();
624  auto msg = assembleMessage<Step::preFrameworkTransition>(
625  static_cast<std::underlying_type_t<Phase>>(Phase::esSyncEnqueue),
626  -1,
627  sv.eventID().run(),
628  sv.eventID().luminosityBlock(),
629  0,
630  t);
631  logFile->write(std::move(msg));
632  });
633  iRegistry.watchPreESSyncIOV([logFile, beginTime](IOVSyncValue const& sv) {
634  auto const t = duration_cast<duration_t>(now() - beginTime).count();
635  auto msg =
636  assembleMessage<Step::preFrameworkTransition>(static_cast<std::underlying_type_t<Phase>>(Phase::esSync),
637  -1,
638  sv.eventID().run(),
639  sv.eventID().luminosityBlock(),
640  0,
641  t);
642  logFile->write(std::move(msg));
643  });
644  iRegistry.watchPostESSyncIOV([logFile, beginTime](IOVSyncValue const& sv) {
645  auto const t = duration_cast<duration_t>(now() - beginTime).count();
646  auto msg =
647  assembleMessage<Step::postFrameworkTransition>(static_cast<std::underlying_type_t<Phase>>(Phase::esSync),
648  -1,
649  sv.eventID().run(),
650  sv.eventID().luminosityBlock(),
651  0,
652  t);
653  logFile->write(std::move(msg));
654  });
655  }
656  {
657  iRegistry.watchPreOpenFile([logFile, beginTime](std::string const&) {
658  auto const t = duration_cast<duration_t>(now() - beginTime).count();
659  auto msg = assembleMessage<Step::preSourceTransition>(
660  static_cast<std::underlying_type_t<Phase>>(Phase::openFile), 0, t);
661  logFile->write(std::move(msg));
662  });
663  iRegistry.watchPostOpenFile([logFile, beginTime](std::string const&) {
664  auto const t = duration_cast<duration_t>(now() - beginTime).count();
665  auto msg = assembleMessage<Step::postSourceTransition>(
666  static_cast<std::underlying_type_t<Phase>>(Phase::openFile), 0, t);
667  logFile->write(std::move(msg));
668  });
669  iRegistry.watchPreSourceEvent([logFile, beginTime](StreamID id) {
670  auto const t = duration_cast<duration_t>(now() - beginTime).count();
671  auto msg = assembleMessage<Step::preSourceTransition>(
672  static_cast<std::underlying_type_t<Phase>>(Phase::Event), id.value(), t);
673  logFile->write(std::move(msg));
674  });
675  iRegistry.watchPostSourceEvent([logFile, beginTime](StreamID id) {
676  auto const t = duration_cast<duration_t>(now() - beginTime).count();
677  auto msg = assembleMessage<Step::postSourceTransition>(
678  static_cast<std::underlying_type_t<Phase>>(Phase::Event), id.value(), t);
679  logFile->write(std::move(msg));
680  });
681 
682  iRegistry.watchPreSourceRun([logFile, beginTime](RunIndex id) {
683  auto const t = duration_cast<duration_t>(now() - beginTime).count();
684  auto msg = assembleMessage<Step::preSourceTransition>(
685  static_cast<std::underlying_type_t<Phase>>(Phase::globalBeginRun), id.value(), t);
686  logFile->write(std::move(msg));
687  });
688  iRegistry.watchPostSourceRun([logFile, beginTime](RunIndex id) {
689  auto const t = duration_cast<duration_t>(now() - beginTime).count();
690  auto msg = assembleMessage<Step::postSourceTransition>(
691  static_cast<std::underlying_type_t<Phase>>(Phase::globalBeginRun), id.value(), t);
692  logFile->write(std::move(msg));
693  });
694 
695  iRegistry.watchPreSourceLumi([logFile, beginTime](auto id) {
696  auto const t = duration_cast<duration_t>(now() - beginTime).count();
697  auto msg = assembleMessage<Step::preSourceTransition>(
698  static_cast<std::underlying_type_t<Phase>>(Phase::globalBeginLumi), id.value(), t);
699  logFile->write(std::move(msg));
700  });
701  iRegistry.watchPostSourceLumi([logFile, beginTime](auto id) {
702  auto const t = duration_cast<duration_t>(now() - beginTime).count();
703  auto msg = assembleMessage<Step::postSourceTransition>(
704  static_cast<std::underlying_type_t<Phase>>(Phase::globalBeginLumi), id.value(), t);
705  logFile->write(std::move(msg));
706  });
707 
708  iRegistry.watchPreSourceNextTransition([logFile, beginTime]() {
709  auto const t = duration_cast<duration_t>(now() - beginTime).count();
710  auto msg = assembleMessage<Step::preSourceTransition>(
711  static_cast<std::underlying_type_t<Phase>>(Phase::getNextTransition), t);
712  logFile->write(std::move(msg));
713  });
714  iRegistry.watchPostSourceNextTransition([logFile, beginTime]() {
715  auto const t = duration_cast<duration_t>(now() - beginTime).count();
716  auto msg = assembleMessage<Step::postSourceTransition>(
717  static_cast<std::underlying_type_t<Phase>>(Phase::getNextTransition), t);
718  logFile->write(std::move(msg));
719  });
720 
721  //ED Modules
722  iRegistry.watchPreModuleBeginJob([logFile, beginTime](auto const& md) {
723  auto const t = duration_cast<duration_t>(now() - beginTime).count();
724  auto msg = assembleMessage<Step::preModuleTransition>(
725  static_cast<std::underlying_type_t<Phase>>(Phase::beginJob), 0, md.id(), 0, 0, 0, t);
726  logFile->write(std::move(msg));
727  });
728  iRegistry.watchPostModuleBeginJob([logFile, beginTime](auto const& md) {
729  auto const t = duration_cast<duration_t>(now() - beginTime).count();
730  auto msg = assembleMessage<Step::postModuleTransition>(
731  static_cast<std::underlying_type_t<Phase>>(Phase::beginJob), 0, md.id(), 0, 0, 0, t);
732  logFile->write(std::move(msg));
733  });
734 
735  iRegistry.watchPreModuleBeginStream(StreamEDModuleState<Step::preModuleTransition>(logFile, beginTime));
736  iRegistry.watchPostModuleBeginStream(StreamEDModuleState<Step::postModuleTransition>(logFile, beginTime));
737 
738  iRegistry.watchPreModuleEndStream(StreamEDModuleState<Step::preModuleTransition>(logFile, beginTime));
739  iRegistry.watchPostModuleEndStream(StreamEDModuleState<Step::postModuleTransition>(logFile, beginTime));
740 
741  iRegistry.watchPreModuleEndJob([logFile, beginTime](auto const& md) {
742  auto const t = duration_cast<duration_t>(now() - beginTime).count();
743  auto msg = assembleMessage<Step::preModuleTransition>(
744  static_cast<std::underlying_type_t<Phase>>(Phase::endJob), 0, md.id(), 0, 0, 0, t);
745  logFile->write(std::move(msg));
746  });
747  iRegistry.watchPostModuleEndJob([logFile, beginTime](auto const& md) {
748  auto const t = duration_cast<duration_t>(now() - beginTime).count();
749  auto msg = assembleMessage<Step::postModuleTransition>(
750  static_cast<std::underlying_type_t<Phase>>(Phase::endJob), 0, md.id(), 0, 0, 0, t);
751  logFile->write(std::move(msg));
752  });
753 
754  iRegistry.watchPreModuleEventPrefetching(StreamEDModuleState<Step::preModulePrefetching>(logFile, beginTime));
755  iRegistry.watchPostModuleEventPrefetching(StreamEDModuleState<Step::postModulePrefetching>(logFile, beginTime));
756 
757  iRegistry.watchPreModuleEvent(StreamEDModuleState<Step::preModuleTransition>(logFile, beginTime));
758  iRegistry.watchPostModuleEvent(StreamEDModuleState<Step::postModuleTransition>(logFile, beginTime));
759  iRegistry.watchPreModuleEventAcquire(StreamEDModuleState<Step::preModuleEventAcquire>(logFile, beginTime));
760  iRegistry.watchPostModuleEventAcquire(StreamEDModuleState<Step::postModuleEventAcquire>(logFile, beginTime));
761  iRegistry.watchPreModuleEventDelayedGet(StreamEDModuleState<Step::preModuleEventDelayedGet>(logFile, beginTime));
763  StreamEDModuleState<Step::postModuleEventDelayedGet>(logFile, beginTime));
764  iRegistry.watchPreEventReadFromSource(StreamEDModuleState<Step::preEventReadFromSource>(logFile, beginTime));
765  iRegistry.watchPostEventReadFromSource(StreamEDModuleState<Step::postEventReadFromSource>(logFile, beginTime));
766 
767  iRegistry.watchPreModuleTransform(StreamEDModuleState<Step::preModuleTransition>(logFile, beginTime));
768  iRegistry.watchPostModuleTransform(StreamEDModuleState<Step::postModuleTransition>(logFile, beginTime));
769  iRegistry.watchPreModuleTransformPrefetching(StreamEDModuleState<Step::preModulePrefetching>(logFile, beginTime));
771  StreamEDModuleState<Step::postModulePrefetching>(logFile, beginTime));
772  iRegistry.watchPreModuleTransformAcquiring(StreamEDModuleState<Step::preModuleEventAcquire>(logFile, beginTime));
774  StreamEDModuleState<Step::postModuleEventAcquire>(logFile, beginTime));
775 
776  iRegistry.watchPreModuleStreamPrefetching(StreamEDModuleState<Step::preModulePrefetching>(logFile, beginTime));
777  iRegistry.watchPostModuleStreamPrefetching(StreamEDModuleState<Step::postModulePrefetching>(logFile, beginTime));
778 
779  iRegistry.watchPreModuleStreamBeginRun(StreamEDModuleState<Step::preModuleTransition>(logFile, beginTime));
780  iRegistry.watchPostModuleStreamBeginRun(StreamEDModuleState<Step::postModuleTransition>(logFile, beginTime));
781  iRegistry.watchPreModuleStreamEndRun(StreamEDModuleState<Step::preModuleTransition>(logFile, beginTime));
782  iRegistry.watchPostModuleStreamEndRun(StreamEDModuleState<Step::postModuleTransition>(logFile, beginTime));
783 
784  iRegistry.watchPreModuleStreamBeginLumi(StreamEDModuleState<Step::preModuleTransition>(logFile, beginTime));
785  iRegistry.watchPostModuleStreamBeginLumi(StreamEDModuleState<Step::postModuleTransition>(logFile, beginTime));
786  iRegistry.watchPreModuleStreamEndLumi(StreamEDModuleState<Step::preModuleTransition>(logFile, beginTime));
787  iRegistry.watchPostModuleStreamEndLumi(StreamEDModuleState<Step::postModuleTransition>(logFile, beginTime));
788 
789  iRegistry.watchPreModuleBeginProcessBlock(GlobalEDModuleState<Step::preModuleTransition>(logFile, beginTime));
790  iRegistry.watchPostModuleBeginProcessBlock(GlobalEDModuleState<Step::postModuleTransition>(logFile, beginTime));
792  GlobalEDModuleState<Step::preModuleTransition>(logFile, beginTime));
794  GlobalEDModuleState<Step::postModuleTransition>(logFile, beginTime));
795  iRegistry.watchPreModuleEndProcessBlock(GlobalEDModuleState<Step::preModuleTransition>(logFile, beginTime));
796  iRegistry.watchPostModuleEndProcessBlock(GlobalEDModuleState<Step::postModuleTransition>(logFile, beginTime));
797 
798  iRegistry.watchPreModuleGlobalPrefetching(GlobalEDModuleState<Step::preModulePrefetching>(logFile, beginTime));
799  iRegistry.watchPostModuleGlobalPrefetching(GlobalEDModuleState<Step::postModulePrefetching>(logFile, beginTime));
800 
801  iRegistry.watchPreModuleGlobalBeginRun(GlobalEDModuleState<Step::preModuleTransition>(logFile, beginTime));
802  iRegistry.watchPostModuleGlobalBeginRun(GlobalEDModuleState<Step::postModuleTransition>(logFile, beginTime));
803  iRegistry.watchPreModuleGlobalEndRun(GlobalEDModuleState<Step::preModuleTransition>(logFile, beginTime));
804  iRegistry.watchPostModuleGlobalEndRun(GlobalEDModuleState<Step::postModuleTransition>(logFile, beginTime));
805 
806  iRegistry.watchPreModuleGlobalBeginLumi(GlobalEDModuleState<Step::preModuleTransition>(logFile, beginTime));
807  iRegistry.watchPostModuleGlobalBeginLumi(GlobalEDModuleState<Step::postModuleTransition>(logFile, beginTime));
808  iRegistry.watchPreModuleGlobalEndLumi(GlobalEDModuleState<Step::preModuleTransition>(logFile, beginTime));
809  iRegistry.watchPostModuleGlobalEndLumi(GlobalEDModuleState<Step::postModuleTransition>(logFile, beginTime));
810 
811  iRegistry.watchPreModuleWriteProcessBlock(GlobalEDModuleState<Step::preModuleTransition>(logFile, beginTime));
812  iRegistry.watchPostModuleWriteProcessBlock(GlobalEDModuleState<Step::postModuleTransition>(logFile, beginTime));
813 
814  iRegistry.watchPreModuleWriteRun(GlobalEDModuleState<Step::preModuleTransition>(logFile, beginTime));
815  iRegistry.watchPostModuleWriteRun(GlobalEDModuleState<Step::postModuleTransition>(logFile, beginTime));
816 
817  iRegistry.watchPreModuleWriteLumi(GlobalEDModuleState<Step::preModuleTransition>(logFile, beginTime));
818  iRegistry.watchPostModuleWriteLumi(GlobalEDModuleState<Step::postModuleTransition>(logFile, beginTime));
819 
820  //ES Modules
821  iRegistry.watchPreESModulePrefetching(
822  ESModuleState<Step::preESModulePrefetching>(logFile, beginTime, recordIndices));
824  ESModuleState<Step::postESModulePrefetching>(logFile, beginTime, recordIndices));
825  iRegistry.watchPreESModule(ESModuleState<Step::preESModule>(logFile, beginTime, recordIndices));
826  iRegistry.watchPostESModule(ESModuleState<Step::postESModule>(logFile, beginTime, recordIndices));
827  iRegistry.watchPreESModuleAcquire(ESModuleState<Step::preESModuleAcquire>(logFile, beginTime, recordIndices));
828  iRegistry.watchPostESModuleAcquire(ESModuleState<Step::postESModuleAcquire>(logFile, beginTime, recordIndices));
829  }
830 
831  std::ostringstream oss;
832  oss << "# Transition Symbol\n";
833  oss << "#------------------------ ------\n";
834  oss << "# startTracing " << Phase::startTracing << "\n"
835  << "# construction " << Phase::construction << "\n"
836  << "# getNextTransition " << Phase::getNextTransition << "\n"
837  << "# esSyncEnqueue " << Phase::esSyncEnqueue << "\n"
838  << "# esSync " << Phase::esSync << "\n"
839  << "# beginJob " << Phase::beginJob << "\n"
840  << "# beginStream " << Phase::beginStream << "\n"
841  << "# openFile " << Phase::openFile << "\n"
842  << "# beginProcessBlock " << Phase::beginProcessBlock << "\n"
843  << "# accessInputProcessBlock " << Phase::accessInputProcessBlock << "\n"
844  << "# globalBeginRun " << Phase::globalBeginRun << "\n"
845  << "# streamBeginRun " << Phase::streamBeginRun << "\n"
846  << "# globalBeginLumi " << Phase::globalBeginLumi << "\n"
847  << "# streamBeginLumi " << Phase::streamBeginLumi << "\n"
848  << "# Event " << Phase::Event << "\n"
849  << "# clearEvent " << Phase::clearEvent << "\n"
850  << "# streamEndLumi " << Phase::streamEndLumi << "\n"
851  << "# globalEndLumi " << Phase::globalEndLumi << "\n"
852  << "# globalWriteLumi " << Phase::globalWriteLumi << "\n"
853  << "# streamEndRun " << Phase::streamEndRun << "\n"
854  << "# globalEndRun " << Phase::globalEndRun << "\n"
855  << "# globalWriteRun " << Phase::globalWriteRun << "\n"
856  << "# endProcessBlock " << Phase::endProcessBlock << "\n"
857  << "# writeProcessBlock " << Phase::writeProcessBlock << "\n"
858  << "# endStream " << Phase::endStream << "\n"
859  << "# endJob " << Phase::endJob << "\n"
860  << "# destruction " << Phase::destruction << "\n\n";
861  oss << "# Step Symbol Entries\n"
862  << "# -------------------------- ------ ------------------------------------------\n"
863  << "# preSourceTransition " << Step::preSourceTransition
864  << " <Transition type> <Transition ID> <Time since begin of cmsRun (us)>\n"
865  << "# postSourceTransition " << Step::postSourceTransition
866  << " <Transition type> <Transition ID> <Time since begin of cmsRun (us)>\n"
867  << "# preModulePrefetching " << Step::preModulePrefetching
868  << " <Transition type> <Transition ID> <EDModule ID> <Call ID> <Requesting EDModule ID or 0> <Requesting "
869  "Call ID> <Time since begin of "
870  "cmsRun "
871  "(us)>\n"
872  << "# postModulePrefetching " << Step::postModulePrefetching
873  << " <Transition type> <Transition ID> <EDModule ID> <Call ID> <Requesting EDModule ID or 0> <Requesting "
874  "Call ID> <Time since begin of "
875  "cmsRun "
876  "(us)>\n"
877  << "# preModuleEventAcquire " << Step::preModuleEventAcquire
878  << " <Transition type> <Transition ID> <EDModule ID> <Call ID> <Requesting EDModule ID or 0> <Requesting "
879  "Call ID> <Time since begin of "
880  "cmsRun "
881  "(us)>\n"
882  << "# postModuleEventAcquire " << Step::postModuleEventAcquire
883  << " <Transition type> <Transition ID> <EDModule ID> <Call ID> <Requesting EDModule ID or 0> <Requesting "
884  "Call ID> <Time since begin of "
885  "cmsRun "
886  "(us)>\n"
887  << "# preModuleTransition " << Step::preModuleTransition
888  << " <Transition type> <Transition ID> <EDModule ID> <Call ID> <Requesting EDModule ID or 0> <Requesting "
889  "Call ID> <Time since begin of "
890  "cmsRun "
891  "(us)>\n"
892  << "# preEventReadFromSource " << Step::preEventReadFromSource
893  << " <Transition type> <Transition ID> <EDModule ID> <Call ID> <Requesting EDModule ID or 0> <Requesting "
894  "Call ID> <Time since begin of "
895  "cmsRun "
896  "(us)>\n"
897  << "# postEventReadFromSource " << Step::postEventReadFromSource
898  << " <Transition type> <Transition ID> <EDModule ID> <Call ID> <Requesting EDModule ID or 0> <Requesting "
899  "Call ID> <Time since begin of "
900  "cmsRun "
901  "(us)>\n"
902  << "# postModuleTransition " << Step::postModuleTransition
903  << " <Transition type> <Transition ID> <EDModule ID> <Call ID> <Requesting EDModule ID> <Requesting Call ID> "
904  "<Time since begin of cmsRun "
905  "(us)>\n"
906  << "# preESModulePrefetching " << Step::preESModulePrefetching
907  << " <Transition type> <Transition ID> <ESModule ID> <Record ID> <Call ID> <Requesting module ID (+ED, -ES)> "
908  "<Requesting Call ID> "
909  "<Time "
910  "since of cmsRun (us)>\n"
911  << "# postESModulePrefetching " << Step::postESModulePrefetching
912  << " <Transition type> <Transition ID> <ESModule ID> <Record ID> <Call ID> <Requesting module ID (+ED, -ES)> "
913  "<Requesting Call ID> "
914  "<Time "
915  "since of cmsRun (us)>\n"
916  << "# preESModuleTransition " << Step::preESModule
917  << " <TransitionType> <Transition ID> <ESModule ID> <Record ID> <Call ID> <Requesting module ID (+ED, -ES)> "
918  "<Requesting Call ID> "
919  "<Time "
920  "since of cmsRun (us)>\n"
921  << "# postESModuleTransition " << Step::postESModule
922  << " <TransitionType> <Transition ID> <ESModule ID> <Record ID> <Call ID> <Requesting module ID (+ED, -ES)> "
923  "<Requesting Call ID> "
924  "<Time "
925  "since of cmsRun (us)>\n"
926  << "# preFrameworkTransition " << Step::preFrameworkTransition
927  << " <Transition type> <Transition ID> <Run#> <LumiBlock#> <Event #> <Time since begin of cmsRun (ms)>\n"
928  << "# postFrameworkTransition " << Step::postFrameworkTransition
929  << " <Transition type> <Transition ID> <Run#> <LumiBlock#> <Event #> <Time since begin of cmsRun (ms)>\n";
930  logFile->write(oss.str());
931  return;
932  }
933 } // namespace edm::service::tracer
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
void watchPostModuleConstruction(PostModuleConstruction::slot_type const &iSlot)
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
void watchPreEvent(PreEvent::slot_type const &iSlot)
void watchPostESModuleRegistration(PostESModuleRegistration::slot_type const &iSlot)
ModuleDescription const * moduleDescription() const
void watchPreModuleStreamPrefetching(PreModuleStreamPrefetching::slot_type const &iSlot)
void watchPreAccessInputProcessBlock(PreAccessInputProcessBlock::slot_type const &iSlot)
LuminosityBlockNumber_t luminosityBlock() const
ModuleCallingContext const * moduleCallingContext() const
void watchPostModuleEndProcessBlock(PostModuleEndProcessBlock::slot_type const &iSlot)
void watchPostModuleTransformAcquiring(PostModuleTransformAcquiring::slot_type const &iSlot)
void watchPreESModule(PreESModule::slot_type const &iSlot)
void watchPreModuleEventAcquire(PreModuleEventAcquire::slot_type const &iSlot)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void watchPostModuleEndStream(PostModuleEndStream::slot_type const &iSlot)
auto module_id(edm::ModuleCallingContext const &mcc)
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
void watchPreModuleConstruction(PreModuleConstruction::slot_type const &iSlot)
void watchPreModuleEndProcessBlock(PreModuleEndProcessBlock::slot_type const &iSlot)
void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const &iSlot)
void watchPostESModuleAcquire(PostESModuleAcquire::slot_type const &iSlot)
ModuleCallingContext const * getTopModuleCallingContext() const
void watchPostEvent(PostEvent::slot_type const &iSlot)
void watchPreStreamEndRun(PreStreamEndRun::slot_type const &iSlot)
void watchPreSourceConstruction(PreSourceConstruction::slot_type const &iSlot)
void watchPostSourceConstruction(PostSourceConstruction::slot_type const &iSlot)
void watchPostModuleGlobalPrefetching(PostModuleGlobalPrefetching::slot_type const &iSlot)
void watchPostStreamEndLumi(PostStreamEndLumi::slot_type const &iSlot)
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
void watchPostSourceNextTransition(PostSourceNextTransition::slot_type const &iSlot)
void watchPostEndProcessBlock(PostEndProcessBlock::slot_type const &iSlot)
void watchPreEventReadFromSource(PreEventReadFromSource::slot_type const &iSlot)
void watchPreModuleDestruction(PreModuleDestruction::slot_type const &iSlot)
void watchPostESModulePrefetching(PostESModulePrefetching::slot_type const &iSlot)
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const &iSlot)
Phase
void watchPostGlobalBeginLumi(PostGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const &iSlot)
void watchPostSourceEvent(PostSourceEvent::slot_type const &iSlot)
void watchPreModuleAccessInputProcessBlock(PreModuleAccessInputProcessBlock::slot_type const &iSlot)
void watchPostModuleTransformPrefetching(PostModuleTransformPrefetching::slot_type const &iSlot)
void watchPreBeginProcessBlock(PreBeginProcessBlock::slot_type const &iSlot)
ESModuleCallingContext const * esmoduleCallingContext() const
void watchPreEndProcessBlock(PreEndProcessBlock::slot_type const &iSlot)
void watchPostModuleTransform(PostModuleTransform::slot_type const &iSlot)
void watchPreModuleBeginStream(PreModuleBeginStream::slot_type const &iSlot)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
void watchPostESModule(PostESModule::slot_type const &iSlot)
void watchPreESSyncIOV(PreESSyncIOV::slot_type const &iSlot)
assert(be >=bs)
void watchPreStreamEndLumi(PreStreamEndLumi::slot_type const &iSlot)
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
void watchPreModuleEventPrefetching(PreModuleEventPrefetching::slot_type const &iSlot)
void watchPostModuleWriteRun(PostModuleWriteRun::slot_type const &iSlot)
void watchPostModuleWriteProcessBlock(PostModuleWriteProcessBlock::slot_type const &iSlot)
void watchPostModuleWriteLumi(PostModuleWriteLumi::slot_type const &iSlot)
void beginJob()
Definition: Breakpoints.cc:14
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:39
void watchPostModuleEventPrefetching(PostModuleEventPrefetching::slot_type const &iSlot)
void setupFile(std::string const &iFileName, edm::ActivityRegistry &iRegistry)
void watchPreOpenFile(PreOpenFile::slot_type const &iSlot)
std::type_info const & value() const
Definition: HCTypeTag.h:45
void watchPostGlobalBeginRun(PostGlobalBeginRun::slot_type const &iSlot)
void watchPreGlobalEndRun(PreGlobalEndRun::slot_type const &iSlot)
unsigned int id() const
void watchPostBeginProcessBlock(PostBeginProcessBlock::slot_type const &iSlot)
void watchEventSetupConfiguration(EventSetupConfiguration::slot_type const &iSlot)
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
void watchPostStreamBeginLumi(PostStreamBeginLumi::slot_type const &iSlot)
void watchPreSourceLumi(PreSourceLumi::slot_type const &iSlot)
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
void watchPreModuleEventDelayedGet(PreModuleEventDelayedGet::slot_type const &iSlot)
void watchPreModuleBeginProcessBlock(PreModuleBeginProcessBlock::slot_type const &iSlot)
void watchPostModuleEventAcquire(PostModuleEventAcquire::slot_type const &iSlot)
std::uintptr_t callID() const
void watchPreModuleEndJob(PreModuleEndJob::slot_type const &iSlot)
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521
void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const &iSlot)
void watchPreSourceNextTransition(PreSourceNextTransition::slot_type const &iSlot)
ModuleCallingContext const * moduleCallingContext() const
void watchPreWriteProcessBlock(PreWriteProcessBlock::slot_type const &iSlot)
Transition transition() const
Definition: StreamContext.h:56
void watchPreSourceRun(PreSourceRun::slot_type const &iSlot)
LuminosityBlockIndex const & luminosityBlockIndex() const
Definition: GlobalContext.h:64
auto module_callid(edm::ModuleCallingContext const &mcc)
std::ostream & operator<<(std::ostream &os, SimpleMemoryCheck::SignificantEvent const &se)
void watchPreModuleBeginJob(PreModuleBeginJob::slot_type const &iSlot)
void watchPreModuleTransformAcquiring(PreModuleTransformAcquiring::slot_type const &iSlot)
void watchPostStreamEndRun(PostStreamEndRun::slot_type const &iSlot)
LuminosityBlockID const & luminosityBlockID() const
Definition: GlobalContext.h:62
RunNumber_t run() const
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const &iSlot)
void watchPostModuleBeginProcessBlock(PostModuleBeginProcessBlock::slot_type const &iSlot)
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const &iSlot)
void watchPreGlobalWriteLumi(PreGlobalWriteLumi::slot_type const &iSlot)
void watchPreModuleTransformPrefetching(PreModuleTransformPrefetching::slot_type const &iSlot)
RunNumber_t run() const
Definition: EventID.h:38
void moduleIdToLabel(std::ostream &oStream, std::vector< std::string > const &iModuleLabels, char moduleIdSymbol, std::string const &iIDHeader, std::string const &iLabelHeader)
void watchPostModuleBeginStream(PostModuleBeginStream::slot_type const &iSlot)
void watchPreModuleTransform(PreModuleTransform::slot_type const &iSlot)
void watchPostAccessInputProcessBlock(PostAccessInputProcessBlock::slot_type const &iSlot)
void watchPostSourceLumi(PostSourceLumi::slot_type const &iSlot)
void watchPostModuleEventDelayedGet(PostModuleEventDelayedGet::slot_type const &iSlot)
void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const &iSlot)
void watchPostGlobalWriteRun(PostGlobalWriteRun::slot_type const &iSlot)
void watchPostModuleStreamBeginLumi(PostModuleStreamBeginLumi::slot_type const &iSlot)
void watchESSyncIOVQueuing(ESSyncIOVQueuing::slot_type const &iSlot)
void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const &iSlot)
void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const &iSlot)
std::enable_if_t< std::is_integral< T >::value > concatenate(std::ostream &os, T const t)
void watchPostClearEvent(PostClearEvent::slot_type const &iSlot)
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const &iSlot)
void watchPostOpenFile(PostOpenFile::slot_type const &iSlot)
tuple msg
Definition: mps_check.py:286
void watchPreModuleEndStream(PreModuleEndStream::slot_type const &iSlot)
void watchPreBeginJob(PreBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
void watchPreModuleWriteRun(PreModuleWriteRun::slot_type const &iSlot)
void watchPreEndJob(PreEndJob::slot_type const &iSlot)
Transition transition() const
Definition: GlobalContext.h:55
void watchPostStreamBeginRun(PostStreamBeginRun::slot_type const &iSlot)
void watchPreClearEvent(PreClearEvent::slot_type const &iSlot)
void watchPostGlobalWriteLumi(PostGlobalEndLumi::slot_type const &iSlot)
RunIndex const & runIndex() const
Definition: GlobalContext.h:63
HLT enums.
void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const &iSlot)
void watchPostModuleAccessInputProcessBlock(PostModuleAccessInputProcessBlock::slot_type const &iSlot)
void watchPostModuleDestruction(PostModuleDestruction::slot_type const &iSlot)
void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const &iSlot)
void watchPreModuleWriteProcessBlock(PreModuleWriteProcessBlock::slot_type const &iSlot)
EventID const & eventID() const
Definition: StreamContext.h:60
void watchPostModuleBeginJob(PostModuleBeginJob::slot_type const &iSlot)
void watchPostEventReadFromSource(PostEventReadFromSource::slot_type const &iSlot)
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
void watchPreModuleWriteLumi(PreModuleWriteLumi::slot_type const &iSlot)
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
static std::chrono::steady_clock::time_point jobStartTime()
void watchPreESModulePrefetching(PreESModulePrefetching::slot_type const &iSlot)
void watchPostModuleStreamPrefetching(PostModuleStreamPrefetching::slot_type const &iSlot)
std::string const & moduleLabel() const
auto stream_id(edm::StreamContext const &cs)
void watchPreGlobalWriteRun(PreGlobalWriteRun::slot_type const &iSlot)
void watchPostModuleEndJob(PostModuleEndJob::slot_type const &iSlot)
void watchPreModuleGlobalPrefetching(PreModuleGlobalPrefetching::slot_type const &iSlot)
def move(src, dest)
Definition: eostools.py:511
edm::eventsetup::ComponentDescription const * componentDescription() const
EventNumber_t event() const
Definition: EventID.h:40
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
void watchPreESModuleAcquire(PreESModuleAcquire::slot_type const &iSlot)
ParentContext const & parent() const
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
void watchPostESSyncIOV(PostESSyncIOV::slot_type const &iSlot)
void watchPostWriteProcessBlock(PostWriteProcessBlock::slot_type const &iSlot)