CMS 3D CMS Logo

MessageLogger.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Services
4 // Class : MessageLogger
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: W. Brown, M. Fischler
10 // Created: Fri Nov 11 16:42:39 CST 2005
11 //
12 // Change log
13 //
14 // 1 mf 5/12/06 In ctor, MessageDrop::debugEnabled is set to a
15 // sensible value in case action happens before modules
16 // are entered. If any modules enable debugs, such
17 // LogDebug messages are not immediately discarded
18 // (though they might be filtered at the server side).
19 //
20 // 2 mf 5/27/06 In preEventProcessing, change the syntax for
21 // runEvent from 1/23 to Run: 1 Event: 23
22 //
23 // 3 mf 6/27/06 PreModuleConstruction and PreSourceConstruction get
24 // correct module name
25 //
26 // 4 mf 6/27/06 Between events the run/event is previous one
27 //
28 // 5 mf 3/30/07 Support for --jobreport option
29 //
30 // 6 mf 6/6/07 Remove the catches for forgiveness of tracked
31 // parameters
32 //
33 // 7 mf 6/19/07 Support for --jobreport option
34 //
35 // 8 wmtan 6/25/07 Enable suppression for sources, just as for modules
36 //
37 // 9 mf 7/25/07 Modify names of the MessageLoggerQ methods, eg MLqLOG
38 //
39 //10 mf 6/18/07 Insert into the PostEndJob a possible SummarizeInJobReport
40 //
41 //11 mf 3/18/09 Fix wrong-sense test establishing anyDebugEnabled_
42 //
43 //12 mf 5/19/09 MessageService PSet Validation
44 //
45 //13 mf 5/26/09 Get parameters without throwing since validation
46 // will point out any problems and throw at that point
47 //
48 //14 mf 7/1/09 Establish module name and set up enables/suppresses
49 // for all possible calls supplying module descriptor
50 //
51 //14 mf 7/1/09 Establish pseudo-module name and set up
52 // enables/suppresses for other calls from framework
53 //15 mf 9/8/09 Clean up erroneous assignments of some callbacks
54 // for specific watch routines (eg PreXYZ called postXYZ)
55 //
56 //16 mf 9/8/09 Eliminate caching by descriptor address during ctor
57 // phases (since addresses are not yet permanent then)
58 //
59 //17 mf 11/2/10 Move preparation of module out to MessageDrop methods
60 // crj which will only be called if a message is actually
61 // issued. Caching of the work is done within MessageDrop
62 // so that case of many messages in a module is still fast.
63 //
64 //18 mf 11/2/10 Eliminated curr_module, since it was only being used
65 // as a local variable for preparation of name (never
66 // used to transfer info between functions) and change
67 // 17 obviates its need.
68 //
69 // 19 mf 11/30/10 Add a messageDrop->snapshot() when establishing
70 // crj module ctors, to cure bug 75836.
71 //
72 // 20 fwyzard 7/06/11 Add support fro dropping LogError messages
73 // on a per-module basis (needed at HLT)
74 
75 // system include files
76 // user include files
77 
79 
82 
85 
87 
97 
98 #include <sstream>
99 #include <limits>
100 
101 using namespace edm;
102 using namespace edm::service;
103 
104 namespace {
105  char const* const s_globalTransitionNames[] = {
106  "@beginJob", "@beginRun", "@beginLumi", "@endLumi", "@endRun", "@endJob", "@writeRun", "@writeLumi"};
107 
108  char const* const s_streamTransitionNames[] = {
109  "@beginStream",
110  "@streamBeginRun",
111  "@streamBeginLumi",
112  "", //event
113  "@streamEndLumi",
114  "@streamEndRun",
115  "@endStream",
116  };
117 } // namespace
118 
119 namespace edm {
120  //Forward declare here
121  // Only the MessageLogger::postEVent function is allowed to call this function.
122  // So although the function is defined in MessageSender.cc this is the
123  // only place where we want it declared.
124  void clearLoggedErrorsSummary(unsigned int);
125  void setMaxLoggedErrorsSummaryIndicies(unsigned int iMax);
126 
127  namespace service {
128 
132 
133  //
134  // constructors and destructor
135  //
137  : debugEnabled_(false),
138  messageServicePSetHasBeenValidated_(false),
139  messageServicePSetValidatationResults_(),
140  nonModule_debugEnabled(false),
141  nonModule_infoEnabled(true),
142  nonModule_warningEnabled(true),
143  nonModule_errorEnabled(true) // change log 20
144  {
145  // prepare cfg validation string for later use
147  messageServicePSetValidatationResults_ = validator(iPS); // change log 12
148 
149  typedef std::vector<std::string> vString;
150  vString empty_vString;
151  vString debugModules;
152  vString suppressDebug;
153  vString suppressInfo;
154  vString suppressWarning;
155  vString suppressError; // change log 20
156 
157  try { // change log 13
158  // decide whether a summary should be placed in job report
159  fjrSummaryRequested_ = iPS.getUntrackedParameter<bool>("messageSummaryToJobReport", false);
160 
161  // grab list of debug-enabled modules
162  debugModules = iPS.getUntrackedParameter<vString>("debugModules", empty_vString);
163 
164  // grab lists of suppressLEVEL modules
165  suppressDebug = iPS.getUntrackedParameter<vString>("suppressDebug", empty_vString);
166 
167  suppressInfo = iPS.getUntrackedParameter<vString>("suppressInfo", empty_vString);
168 
169  suppressWarning = iPS.getUntrackedParameter<vString>("suppressWarning", empty_vString);
170 
171  suppressError = // change log 20
172  iPS.getUntrackedParameter<vString>("suppressError", empty_vString);
173  } catch (cms::Exception& e) { // change log 13
174  }
175 
176  // Use these lists to prepare a map to use in tracking suppression
177 
178  // Do suppressDebug first and suppressError last to get proper order
179  for (vString::const_iterator it = suppressDebug.begin(); it != suppressDebug.end(); ++it) {
181  }
182 
183  for (vString::const_iterator it = suppressInfo.begin(); it != suppressInfo.end(); ++it) {
185  }
186 
187  for (vString::const_iterator it = suppressWarning.begin(); it != suppressWarning.end(); ++it) {
189  }
190 
191  for (vString::const_iterator it = suppressError.begin(); // change log 20
192  it != suppressError.end();
193  ++it) {
195  }
196 
197  // set up for tracking whether current module is debug-enabled
198  // (and info-enabled and warning-enabled)
199  if (debugModules.empty()) {
200  anyDebugEnabled_ = false; // change log 11
201  MessageDrop::instance()->debugEnabled = false; // change log 1
202  } else {
203  anyDebugEnabled_ = true; // change log 11
205  // this will be over-ridden when specific modules are entered
206  }
207 
208  // if ( debugModules.empty()) anyDebugEnabled_ = true; // wrong; change log 11
209  for (vString::const_iterator it = debugModules.begin(); it != debugModules.end(); ++it) {
210  if (*it == "*") {
211  everyDebugEnabled_ = true;
212  } else {
213  debugEnabledModules_.insert(*it);
214  }
215  }
216 
217  // change log 7
219  std::string* jm_p = new std::string(jm);
220  MessageLoggerQ::MLqMOD(jm_p); // change log 9
221 
222  MessageLoggerQ::MLqCFG(new ParameterSet(iPS)); // change log 9
223 
224  iRegistry.watchPreallocate([this](edm::service::SystemBounds const& iBounds) {
225  //reserve the proper amount of space to record the transition info
226  this->transitionInfoCache_.resize(iBounds.maxNumberOfStreams() +
228  iBounds.maxNumberOfConcurrentRuns());
231 
233  });
234 
236  iRegistry.watchPostEndJob(this, &MessageLogger::postEndJob);
237  iRegistry.watchJobFailure(this, &MessageLogger::jobFailure); // change log 14
238 
241  // change log 3
242 
245  // change log 3
246 
249 
252 
255  // change log 14:
256  iRegistry.watchPreSourceRun([this](RunIndex) { preSourceRunLumi(); });
257  iRegistry.watchPostSourceRun([this](RunIndex) { postSourceRunLumi(); });
258  iRegistry.watchPreSourceLumi([this](LuminosityBlockIndex) { preSourceRunLumi(); });
260  iRegistry.watchPreOpenFile(this, &MessageLogger::preFile);
261  iRegistry.watchPostOpenFile(this, &MessageLogger::postFile);
264 
265  // change log 13:
266  // change log 15
271 
276 
285 
294 
295  iRegistry.watchPreEvent(this, &MessageLogger::preEvent);
296  iRegistry.watchPostEvent(this, &MessageLogger::postEvent);
297 
306 
315 
318 
319  MessageDrop* messageDrop = MessageDrop::instance();
320  nonModule_debugEnabled = messageDrop->debugEnabled;
321  nonModule_infoEnabled = messageDrop->infoEnabled;
323  nonModule_errorEnabled = messageDrop->errorEnabled;
324  } // ctor
325 
326  //
327  // Shared helper routines for establishing module name and enabling behavior
328  //
329 
331  const char* whichPhase) // ChangeLog 13, 17
332  {
333  MessageDrop* messageDrop = MessageDrop::instance();
334 
335  // std::cerr << "establishModule( " << desc.moduleName() << ")\n";
336  // Change Log 17
337  messageDrop->setModuleWithPhase(desc.moduleName(), desc.moduleLabel(), desc.id(), whichPhase);
338  // Removed caching per change 17 - caching is now done in MessageDrop.cc
339  // in theContext() method, and only happens if a message is actually issued.
340 
341  if (!anyDebugEnabled_) {
342  messageDrop->debugEnabled = false;
343  } else if (everyDebugEnabled_) {
344  messageDrop->debugEnabled = true;
345  } else {
346  messageDrop->debugEnabled = debugEnabledModules_.count(desc.moduleLabel());
347  }
348 
349  auto it = suppression_levels_.find(desc.moduleLabel());
350  if (it != suppression_levels_.end()) {
351  messageDrop->debugEnabled = messageDrop->debugEnabled && (it->second < ELseverityLevel::ELsev_success);
352  messageDrop->infoEnabled = (it->second < ELseverityLevel::ELsev_info);
353  messageDrop->warningEnabled = (it->second < ELseverityLevel::ELsev_warning);
354  messageDrop->errorEnabled = (it->second < ELseverityLevel::ELsev_error);
355  } else {
356  messageDrop->infoEnabled = true;
357  messageDrop->warningEnabled = true;
358  messageDrop->errorEnabled = true;
359  }
360  } // establishModule
361 
362  void MessageLogger::establishModule(unsigned int transitionIndex,
363  ModuleCallingContext const& mod,
364  const char* whichPhase) // ChangeLog 13, 17
365  {
366  MessageDrop* messageDrop = MessageDrop::instance();
367 
368  // std::cerr << "establishModule( " << desc.moduleName() << ")\n";
369  // Change Log 17
370  auto const desc = mod.moduleDescription();
371  messageDrop->runEvent = transitionInfoCache_[transitionIndex];
372  messageDrop->setModuleWithPhase(desc->moduleName(), desc->moduleLabel(), desc->id(), whichPhase);
373  messageDrop->streamID = transitionIndex;
374  if (transitionIndex >= lumiInfoBegin_) {
376  }
377  // Removed caching per change 17 - caching is now done in MessageDrop.cc
378  // in theContext() method, and only happens if a message is actually issued.
379 
380  if (!anyDebugEnabled_) {
381  messageDrop->debugEnabled = false;
382  } else if (everyDebugEnabled_) {
383  messageDrop->debugEnabled = true;
384  } else {
385  messageDrop->debugEnabled = debugEnabledModules_.count(desc->moduleLabel());
386  }
387 
388  auto it = suppression_levels_.find(desc->moduleLabel());
389  if (it != suppression_levels_.end()) {
390  messageDrop->debugEnabled = messageDrop->debugEnabled && (it->second < ELseverityLevel::ELsev_success);
391  messageDrop->infoEnabled = (it->second < ELseverityLevel::ELsev_info);
392  messageDrop->warningEnabled = (it->second < ELseverityLevel::ELsev_warning);
393  messageDrop->errorEnabled = (it->second < ELseverityLevel::ELsev_error);
394  } else {
395  messageDrop->infoEnabled = true;
396  messageDrop->warningEnabled = true;
397  messageDrop->errorEnabled = true;
398  }
399  } // establishModule
400 
401  void MessageLogger::unEstablishModule(ModuleDescription const& /*unused*/, const char* state) {
402  // std::cerr << "unestablishModule( " << desc.moduleName() << ") "
403  // << "state = " << *state << "\n";
404 
405  MessageDrop* messageDrop = MessageDrop::instance();
406  messageDrop->setSinglet(state); // Change Log 17
407  messageDrop->debugEnabled = nonModule_debugEnabled;
408  messageDrop->infoEnabled = nonModule_infoEnabled;
410  messageDrop->errorEnabled = nonModule_errorEnabled; // change log 20
411  }
412 
413  void MessageLogger::unEstablishModule(ModuleCallingContext const& mod, const char* state) {
414  //Need to reset to what was previously being used on this thread
415  auto previous = mod.previousModuleOnThread();
416  if (previous) {
417  //need to know if we are in a global or stream context
418  auto top = previous->getTopModuleCallingContext();
419  assert(nullptr != top);
420  if (ParentContext::Type::kGlobal == top->type()) {
421  auto globalContext = top->globalContext();
422  assert(nullptr != globalContext);
423  auto tran = globalContext->transition();
426  establishModule(lumiInfoBegin_ + globalContext->luminosityBlockIndex(),
427  *previous,
428  s_globalTransitionNames[static_cast<int>(tran)]);
429  } else {
431  runInfoBegin_ + globalContext->runIndex(), *previous, s_globalTransitionNames[static_cast<int>(tran)]);
432  }
433  } else {
434  auto stream = previous->getStreamContext();
436  stream->streamID().value(), *previous, s_streamTransitionNames[static_cast<int>(stream->transition())]);
437  }
438  } else {
439  MessageDrop* messageDrop = MessageDrop::instance();
441  messageDrop->setSinglet(state); // Change Log 17
442  messageDrop->debugEnabled = nonModule_debugEnabled;
443  messageDrop->infoEnabled = nonModule_infoEnabled;
445  messageDrop->errorEnabled = nonModule_errorEnabled; // change log 20
446  }
447 
448  // std::cerr << "unestablishModule( " << desc.moduleName() << ") "
449  // << "state = " << *state << "\n";
450  }
451 
452  void MessageLogger::establish(const char* state) {
453  MessageDrop* messageDrop = MessageDrop::instance();
454  messageDrop->setSinglet(state); // Change Log 17
455  if (!anyDebugEnabled_) {
456  messageDrop->debugEnabled = false;
457  } else if (everyDebugEnabled_) {
458  messageDrop->debugEnabled = true;
459  } else {
460  messageDrop->debugEnabled = debugEnabledModules_.count(state); // change log 8
461  }
462  std::map<const std::string, ELseverityLevel>::const_iterator it =
463  suppression_levels_.find(state); // change log 8
464  if (it != suppression_levels_.end()) {
465  messageDrop->debugEnabled = messageDrop->debugEnabled && (it->second < ELseverityLevel::ELsev_success);
466  messageDrop->infoEnabled = (it->second < ELseverityLevel::ELsev_info);
467  messageDrop->warningEnabled = (it->second < ELseverityLevel::ELsev_warning);
468  messageDrop->errorEnabled = (it->second < ELseverityLevel::ELsev_error);
469  } else {
470  messageDrop->infoEnabled = true;
471  messageDrop->warningEnabled = true;
472  messageDrop->errorEnabled = true;
473  }
474  }
475 
476  void MessageLogger::unEstablish(const char* state) {
477  MessageDrop::instance()->setSinglet(state); // Change Log 17
478  }
479 
480  //
481  // callbacks that need to establish the module, and their counterparts
482  //
483 
485  if (!messageServicePSetHasBeenValidated_) { // change log 12
488  }
490  }
491  establishModule(desc, "@ctor"); // ChangeLog 16
492  }
494  const ModuleDescription&
495  iDescription) { //it is now guaranteed that this will be called even if the module throws
496  unEstablishModule(iDescription, "AfterModConstruction");
497  }
498 
500  establishModule(desc, "@beginJob"); // ChangeLog 13
501  }
503  unEstablishModule(iDescription, "AfterModBeginJob");
504  }
505 
507  if (!messageServicePSetHasBeenValidated_) { // change log 12
510  }
512  }
513  establishModule(desc, "@sourceConstruction"); // ChangeLog 16
514  }
516  unEstablishModule(iDescription, "AfterSourceConstruction");
517  }
518 
520  ModuleDescription const& desc = *mcc.moduleDescription();
521  establishModule(desc, "@beginStream"); // ChangeLog 13
522  }
524  ModuleDescription const& desc = *mcc.moduleDescription();
525  unEstablishModule(desc, "AfterModBeginStream");
526  }
527 
529  establishModule(stream.streamID().value(),
530  mod,
531  s_streamTransitionNames[static_cast<int>(StreamContext::Transition::kBeginRun)]);
532  }
534  unEstablishModule(mod, "AfterModStreamBeginRun");
535  }
536 
538  establishModule(stream.streamID().value(),
539  mod,
540  s_streamTransitionNames[static_cast<int>(StreamContext::Transition::kBeginLuminosityBlock)]);
541  }
543  unEstablishModule(mod, "AfterModStreamBeginLumi");
544  }
545 
548  stream.streamID().value(), mod, s_streamTransitionNames[static_cast<int>(StreamContext::Transition::kEvent)]);
549  }
550 
552  unEstablishModule(mod, "PostModuleEvent");
553  }
554 
557  stream.streamID().value(), mod, s_streamTransitionNames[static_cast<int>(StreamContext::Transition::kEvent)]);
558  }
559 
561  unEstablishModule(mod, "PostModuleEventAcquire");
562  }
563 
565  establishModule(stream.streamID().value(),
566  mod,
567  s_streamTransitionNames[static_cast<int>(StreamContext::Transition::kEndLuminosityBlock)]);
568  }
570  unEstablishModule(mod, "AfterModStreamEndLumi");
571  }
572 
574  establishModule(stream.streamID().value(),
575  mod,
576  s_streamTransitionNames[static_cast<int>(StreamContext::Transition::kEndRun)]); // ChangeLog 13
577  }
579  unEstablishModule(mod, "AfterModStreamEndRun");
580  }
581 
582  //Global
585  mod,
586  s_globalTransitionNames[static_cast<int>(GlobalContext::Transition::kBeginRun)]);
587  }
589  unEstablishModule(mod, "AfterModGlobalBeginRun");
590  }
591 
594  mod,
595  s_globalTransitionNames[static_cast<int>(GlobalContext::Transition::kBeginLuminosityBlock)]);
596  }
598  unEstablishModule(mod, "AfterModGlobalBeginLumi");
599  }
600 
603  mod,
604  s_globalTransitionNames[static_cast<int>(GlobalContext::Transition::kEndLuminosityBlock)]);
605  }
607  unEstablishModule(mod, "AfterModGlobalEndLumi");
608  }
609 
612  mod,
613  s_globalTransitionNames[static_cast<int>(GlobalContext::Transition::kEndRun)]); // ChangeLog 13
614  }
616  unEstablishModule(mod, "AfterModGlobalEndRun");
617  }
618 
620  ModuleDescription const& desc = *mcc.moduleDescription();
621  establishModule(desc, "@endStream"); // ChangeLog 13
622  }
623 
625  ModuleDescription const& desc = *mcc.moduleDescription();
626  unEstablishModule(desc, "AfterModEndStream");
627  }
628 
630  establishModule(desc, "@endJob"); // ChangeLog 13
631  }
633  unEstablishModule(iDescription, "AfterModEndJob");
634  }
635 
636  //
637  // callbacks that don't know about the module
638  //
639 
641  MessageDrop::instance()->runEvent = "BeforeEvents";
642  MessageDrop::instance()->setSinglet("AfterBeginJob"); // Change Log 17
643  }
644 
647  unEstablish("AfterSource");
648  MessageDrop::instance()->runEvent = "AfterSource";
649  }
652 
653  void MessageLogger::preFile(std::string const&, bool) { establish("file_open"); }
654  void MessageLogger::preFileClose(std::string const&, bool) { establish("file_close"); }
655  void MessageLogger::postFile(std::string const&, bool) { unEstablish("AfterFile"); }
656 
657  void MessageLogger::preEvent(StreamContext const& iContext) {
658  std::ostringstream ost;
659  auto const& id = iContext.eventID();
660  ost << "Run: " << id.run() << " Event: " << id.event(); // change log 2
661  assert(iContext.streamID().value() < transitionInfoCache_.size());
662  transitionInfoCache_[iContext.streamID().value()] = ost.str();
663  edm::MessageDrop::instance()->runEvent = ost.str();
664  edm::MessageDrop::instance()->setSinglet("PreEventProcessing"); // changelog 17
665  // Note - module name had not been set here Similarly in other places where
666  // RunEvent carries the new information; we add setSinglet for module name.
667  }
668 
669  void MessageLogger::postEvent(StreamContext const& iContext) {
670  edm::MessageDrop::instance()->runEvent = "PostProcessEvent";
672  }
673 
674  void MessageLogger::preStreamBeginRun(StreamContext const& iContext) // change log 14
675  {
676  std::ostringstream ost;
677  ost << "Run: " << iContext.eventID().run() << " Stream: " << iContext.streamID().value();
678  ;
679  transitionInfoCache_[iContext.streamID().value()] = ost.str();
680  edm::MessageDrop::instance()->runEvent = ost.str();
681  edm::MessageDrop::instance()->setSinglet("PreStreamBeginRun"); // changelog 17
682  }
684  edm::MessageDrop::instance()->runEvent = "PostStreamBeginRun";
685  edm::MessageDrop::instance()->setSinglet("PostStreamBeginRun"); // changelog 17
686  // Note - module name had not been set here
687  }
688 
690  std::ostringstream ost;
691  ost << "End Run: " << iContext.eventID().run() << " Stream: " << iContext.streamID().value();
692  ;
693  transitionInfoCache_[iContext.streamID().value()] = ost.str();
694  edm::MessageDrop::instance()->runEvent = ost.str();
695  edm::MessageDrop::instance()->setSinglet("PreStreamEndRun"); // changelog 17
696  }
697 
699  edm::MessageDrop::instance()->runEvent = "PostStreamEndRun";
700  edm::MessageDrop::instance()->setSinglet("PostStreaEndRun"); // changelog 17
701  }
702 
704  std::ostringstream ost;
705  auto const& id = iContext.eventID();
706  ost << "Run: " << id.run() << " Lumi: " << id.luminosityBlock() << " Stream: " << iContext.streamID().value();
707  transitionInfoCache_[iContext.streamID().value()] = ost.str();
708  edm::MessageDrop::instance()->runEvent = ost.str();
709  edm::MessageDrop::instance()->setSinglet("PreStreamBeginLumi"); // changelog 17
710  }
711 
713  edm::MessageDrop::instance()->runEvent = "PostStreamBeginLumi";
714  edm::MessageDrop::instance()->setSinglet("PostStreamBeginLumi"); // changelog 17
715  }
716 
718  std::ostringstream ost;
719  auto const& id = iContext.eventID();
720  ost << "Run: " << id.run() << " Lumi: " << id.luminosityBlock() << " Stream: " << iContext.streamID().value();
721  ;
722  transitionInfoCache_[iContext.streamID().value()] = ost.str();
723  edm::MessageDrop::instance()->runEvent = ost.str();
724  edm::MessageDrop::instance()->setSinglet("PreStreamEndLumi"); // changelog 17
725  }
727  edm::MessageDrop::instance()->runEvent = "PostStreamEndLumi";
728  edm::MessageDrop::instance()->setSinglet("PostStreamEndLumi"); // changelog 17
729  }
730 
731  void MessageLogger::preGlobalBeginRun(GlobalContext const& iContext) // change log 14
732  {
733  std::ostringstream ost;
734  ost << "Run: " << iContext.luminosityBlockID().run();
735  transitionInfoCache_[runInfoBegin_ + iContext.runIndex()] = ost.str();
736  edm::MessageDrop::instance()->runEvent = ost.str();
737  edm::MessageDrop::instance()->setSinglet("PreGlobalBeginRun"); // changelog 17
738  }
740  edm::MessageDrop::instance()->runEvent = "PostGlobalBeginRun";
741  edm::MessageDrop::instance()->setSinglet("PostGlobalBeginRun"); // changelog 17
742  // Note - module name had not been set here
743  }
744 
745  void MessageLogger::prePathEvent(StreamContext const& stream, PathContext const& iPath) // change log 14
746  {
747  auto messageDrop = edm::MessageDrop::instance();
748  messageDrop->runEvent = transitionInfoCache_[stream.streamID().value()];
749  messageDrop->setPath("PreProcPath ", iPath.pathName());
750  // change log 17
751  }
752 
754  edm::MessageDrop::instance()->setSinglet("PostProcessPath"); // changelog 17
755  }
756 
758  std::ostringstream ost;
759  ost << "End Run: " << iContext.luminosityBlockID().run();
760  transitionInfoCache_[runInfoBegin_ + iContext.runIndex()] = ost.str();
761  edm::MessageDrop::instance()->runEvent = ost.str();
762  edm::MessageDrop::instance()->setSinglet("PreGlobalEndRun"); // changelog 17
763  }
764 
766  edm::MessageDrop::instance()->runEvent = "PostGlobalEndRun";
767  edm::MessageDrop::instance()->setSinglet("PostGlobalEndRun"); // changelog 17
768  }
769 
771  std::ostringstream ost;
772  auto const& id = iContext.luminosityBlockID();
773  ost << "Run: " << id.run() << " Lumi: " << id.luminosityBlock();
774  transitionInfoCache_[lumiInfoBegin_ + iContext.luminosityBlockIndex()] = ost.str();
775  edm::MessageDrop::instance()->runEvent = ost.str();
776  edm::MessageDrop::instance()->setSinglet("PreGlobalBeginLumi"); // changelog 17
777  }
778 
780  edm::MessageDrop::instance()->runEvent = "PostGlobalBeginLumi";
781  edm::MessageDrop::instance()->setSinglet("PostGlobalBeginLumi"); // changelog 17
782  }
783 
785  std::ostringstream ost;
786  auto const& id = iContext.luminosityBlockID();
787  ost << "Run: " << id.run() << " Lumi: " << id.luminosityBlock();
788  transitionInfoCache_[lumiInfoBegin_ + iContext.luminosityBlockIndex()] = ost.str();
789  edm::MessageDrop::instance()->runEvent = ost.str();
790  edm::MessageDrop::instance()->setSinglet("PreGlobalEndLumi"); // changelog 17
791  }
793  edm::MessageDrop::instance()->runEvent = "PostGlobalEndLumi";
794  edm::MessageDrop::instance()->setSinglet("PostGlobalEndLumi"); // changelog 17
795  }
796 
798  SummarizeInJobReport(); // Put summary info into Job Rep // change log 10
799  MessageLoggerQ::MLqSUM(); // trigger summary info. // change log 9
800  }
801 
803  MessageDrop* messageDrop = MessageDrop::instance();
804  messageDrop->setSinglet("jobFailure");
805  SummarizeInJobReport(); // Put summary info into Job Rep // change log 10
806  MessageLoggerQ::MLqSUM(); // trigger summary info. // change log 9
807  }
808 
809  //
810  // Other methods
811  //
812 
814  if (fjrSummaryRequested_) {
815  std::map<std::string, double>* smp = new std::map<std::string, double>();
817  Service<JobReport> reportSvc;
818  reportSvc->reportMessageInfo(*smp);
819  delete smp;
820  }
821  }
822 
823  } // end of namespace service
824 } // end of namespace edm
void preModuleStreamEndLumi(StreamContext const &, ModuleCallingContext const &)
void preModuleEvent(StreamContext const &, ModuleCallingContext const &)
RunNumber_t run() const
Definition: EventID.h:39
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
void watchPostModuleConstruction(PostModuleConstruction::slot_type const &iSlot)
std::string const & pathName() const
Definition: PathContext.h:30
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
T getUntrackedParameter(std::string const &, T const &) const
void postModuleEvent(StreamContext const &, ModuleCallingContext const &)
void preModuleEndJob(ModuleDescription const &)
void postGlobalEndRun(GlobalContext const &)
void watchPreEvent(PreEvent::slot_type const &iSlot)
void postStreamBeginLumi(StreamContext const &)
void preStreamEndLumi(StreamContext const &)
void preStreamBeginLumi(StreamContext const &)
void preModuleGlobalBeginLumi(GlobalContext const &, ModuleCallingContext const &)
void watchPrePathEvent(PrePathEvent::slot_type const &iSlot)
void watchPreallocate(Preallocate::slot_type const &iSlot)
void postModuleConstruction(ModuleDescription const &)
void watchPreModuleEventAcquire(PreModuleEventAcquire::slot_type const &iSlot)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
ModuleCallingContext const * getTopModuleCallingContext() const
void postModuleGlobalBeginLumi(GlobalContext const &, ModuleCallingContext const &)
void watchPostModuleEndStream(PostModuleEndStream::slot_type const &iSlot)
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
void watchPreModuleConstruction(PreModuleConstruction::slot_type const &iSlot)
void preModuleEventAcquire(StreamContext const &, ModuleCallingContext const &)
void postGlobalBeginLumi(GlobalContext const &)
void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const &iSlot)
void preModuleBeginJob(ModuleDescription const &)
void postModuleGlobalBeginRun(GlobalContext const &, ModuleCallingContext const &)
void watchPostEvent(PostEvent::slot_type const &iSlot)
void postGlobalBeginRun(GlobalContext const &)
LuminosityBlockID const & luminosityBlockID() const
Definition: GlobalContext.h:55
void watchPreStreamEndRun(PreStreamEndRun::slot_type const &iSlot)
void watchPreSourceConstruction(PreSourceConstruction::slot_type const &iSlot)
void setModuleWithPhase(std::string const &name, std::string const &label, unsigned int moduleID, const char *phase)
Definition: MessageDrop.cc:177
void watchPostSourceConstruction(PostSourceConstruction::slot_type const &iSlot)
static MessageDrop * instance()
Definition: MessageDrop.cc:59
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
void watchPostStreamEndLumi(PostStreamEndLumi::slot_type const &iSlot)
void preGlobalEndLumi(GlobalContext const &)
std::string const & moduleName() const
void watchPostPathEvent(PostPathEvent::slot_type const &iSlot)
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
unsigned int value() const
Definition: RunIndex.h:44
void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const &iSlot)
static std::string jobMode
Definition: MessageDrop.h:107
void watchPostGlobalBeginLumi(PostGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const &iSlot)
void watchPostSourceEvent(PostSourceEvent::slot_type const &iSlot)
void preSourceConstruction(ModuleDescription const &)
MessageLogger(ParameterSet const &, ActivityRegistry &)
void clearLoggedErrorsSummary(unsigned int iStreamID)
void establishModule(const ModuleDescription &desc, const char *whichPhase)
void setMaxLoggedErrorsSummaryIndicies(unsigned int iMax)
void watchPreModuleBeginStream(PreModuleBeginStream::slot_type const &iSlot)
void watchPreStreamEndLumi(PreStreamEndLumi::slot_type const &iSlot)
void preGlobalBeginLumi(GlobalContext const &)
std::string const & moduleLabel() const
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
void postModuleEventAcquire(StreamContext const &, ModuleCallingContext const &)
void postStreamEndRun(StreamContext const &)
void setSinglet(const char *sing)
Definition: MessageDrop.cc:190
void preModuleBeginStream(StreamContext const &, ModuleCallingContext const &)
void preGlobalBeginRun(GlobalContext const &)
void postModuleGlobalEndLumi(GlobalContext const &, ModuleCallingContext const &)
void watchJobFailure(JobFailure::slot_type const &iSlot)
convenience function for attaching to signal
RunIndex const & runIndex() const
Definition: GlobalContext.h:56
unsigned int maxNumberOfStreams() const
Definition: SystemBounds.h:35
void watchPreOpenFile(PreOpenFile::slot_type const &iSlot)
void preModuleGlobalEndRun(GlobalContext const &, ModuleCallingContext const &)
void watchPostGlobalBeginRun(PostGlobalBeginRun::slot_type const &iSlot)
void postEvent(StreamContext const &)
void watchPostCloseFile(PostCloseFile::slot_type const &iSlot)
void watchPreGlobalEndRun(PreGlobalEndRun::slot_type const &iSlot)
void postModuleStreamEndRun(StreamContext const &, ModuleCallingContext const &)
unsigned int streamID
Definition: MessageDrop.h:101
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
LuminosityBlockIndex const & luminosityBlockIndex() const
Definition: GlobalContext.h:57
void preFileClose(std::string const &, bool)
void watchPostStreamBeginLumi(PostStreamBeginLumi::slot_type const &iSlot)
static void MLqCFG(ParameterSet *p)
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
ModuleDescription const * moduleDescription() const
void prePathEvent(StreamContext const &, PathContext const &)
RunNumber_t run() const
void watchPostModuleEventAcquire(PostModuleEventAcquire::slot_type const &iSlot)
void watchPreModuleEndJob(PreModuleEndJob::slot_type const &iSlot)
unsigned int value() const
void preModuleStreamEndRun(StreamContext const &, ModuleCallingContext const &)
void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const &iSlot)
void postModuleStreamBeginRun(StreamContext const &, ModuleCallingContext const &)
void watchPreSourceRun(PreSourceRun::slot_type const &iSlot)
void preModuleConstruction(ModuleDescription const &)
void postStreamBeginRun(StreamContext const &)
void watchPreModuleBeginJob(PreModuleBeginJob::slot_type const &iSlot)
void watchPostStreamEndRun(PostStreamEndRun::slot_type const &iSlot)
void postModuleStreamEndLumi(StreamContext const &, ModuleCallingContext const &)
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const &iSlot)
StreamID const & streamID() const
Definition: StreamContext.h:54
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const &iSlot)
void postStreamEndLumi(StreamContext const &)
void postPathEvent(StreamContext const &, PathContext const &, HLTPathStatus const &)
void postModuleBeginStream(StreamContext const &, ModuleCallingContext const &)
void watchPostModuleBeginStream(PostModuleBeginStream::slot_type const &iSlot)
std::vector< std::string > transitionInfoCache_
std::map< std::string, ELseverityLevel > suppression_levels_
unsigned int value() const
Definition: StreamID.h:42
unsigned int maxNumberOfConcurrentLuminosityBlocks() const
Definition: SystemBounds.h:37
std::set< std::string > debugEnabledModules_
void watchPostSourceLumi(PostSourceLumi::slot_type const &iSlot)
void watchPreCloseFile(PreCloseFile::slot_type const &iSlot)
void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const &iSlot)
void establish(const char *whichPhase)
void watchPostModuleStreamBeginLumi(PostModuleStreamBeginLumi::slot_type const &iSlot)
void postSourceConstruction(ModuleDescription const &)
void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const &iSlot)
void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const &iSlot)
static void MLqJRS(std::map< std::string, double > *sum_p)
static void MLqMOD(std::string *jm)
void reportMessageInfo(std::map< std::string, double > const &messageData)
Definition: JobReport.cc:555
void unEstablishModule(const ModuleDescription &desc, const char *whichPhase)
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const &iSlot)
void watchPostOpenFile(PostOpenFile::slot_type const &iSlot)
void watchPreModuleEndStream(PreModuleEndStream::slot_type const &iSlot)
void postModuleEndJob(ModuleDescription const &)
void preStreamEndRun(StreamContext const &)
void watchPostStreamBeginRun(PostStreamBeginRun::slot_type const &iSlot)
void unEstablish(const char *whichPhase)
ModuleCallingContext const * previousModuleOnThread() const
HLT enums.
void postModuleBeginJob(ModuleDescription const &)
void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const &iSlot)
void preModuleEndStream(StreamContext const &, ModuleCallingContext const &)
void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const &iSlot)
static void SummarizeInJobReport()
void watchPostModuleBeginJob(PostModuleBeginJob::slot_type const &iSlot)
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
unsigned int maxNumberOfConcurrentRuns() const
Definition: SystemBounds.h:36
void preModuleGlobalEndLumi(GlobalContext const &, ModuleCallingContext const &)
void preFile(std::string const &, bool)
void postGlobalEndLumi(GlobalContext const &)
static void MLqSUM()
void postModuleStreamBeginLumi(StreamContext const &, ModuleCallingContext const &)
EventID const & eventID() const
Definition: StreamContext.h:59
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
void postModuleGlobalEndRun(GlobalContext const &, ModuleCallingContext const &)
void preModuleStreamBeginLumi(StreamContext const &, ModuleCallingContext const &)
std::string runEvent
Definition: MessageDrop.h:100
void preGlobalEndRun(GlobalContext const &)
void preEvent(StreamContext const &)
std::string messageServicePSetValidatationResults_
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
void watchPostModuleEndJob(PostModuleEndJob::slot_type const &iSlot)
void preModuleGlobalBeginRun(GlobalContext const &, ModuleCallingContext const &)
void preStreamBeginRun(StreamContext const &)
void postModuleEndStream(StreamContext const &, ModuleCallingContext const &)
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
unsigned int id() const
void preModuleStreamBeginRun(StreamContext const &, ModuleCallingContext const &)
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
void postFile(std::string const &, bool)