00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00079
00080 #include "FWCore/MessageService/interface/MessageLogger.h"
00081 #include "FWCore/MessageService/interface/MessageServicePSetValidation.h"
00082
00083 #include "FWCore/MessageLogger/interface/MessageLoggerQ.h"
00084 #include "FWCore/MessageLogger/interface/MessageDrop.h"
00085
00086 #include "DataFormats/Provenance/interface/ModuleDescription.h"
00087
00088 #include "FWCore/MessageLogger/interface/JobReport.h"
00089 #include "FWCore/Utilities/interface/EDMException.h"
00090 #include "FWCore/ServiceRegistry/interface/Service.h"
00091
00092 #include <sstream>
00093
00094 using namespace edm;
00095 using namespace edm::service;
00096
00097 namespace edm {
00098 namespace service {
00099
00100 bool edm::service::MessageLogger::anyDebugEnabled_ = false;
00101 bool edm::service::MessageLogger::everyDebugEnabled_ = false;
00102 bool edm::service::MessageLogger::fjrSummaryRequested_ = false;
00103
00104
00105
00106
00107 edm::service::MessageLogger::
00108 MessageLogger( ParameterSet const & iPS
00109 , ActivityRegistry & iRegistry
00110 )
00111 : debugEnabled_(false)
00112 , messageServicePSetHasBeenValidated_(false)
00113 , messageServicePSetValidatationResults_()
00114 , nonModule_debugEnabled(false)
00115 , nonModule_infoEnabled(true)
00116 , nonModule_warningEnabled(true)
00117 , nonModule_errorEnabled(true)
00118 {
00119
00120 MessageServicePSetValidation validator;
00121 messageServicePSetValidatationResults_ = validator(iPS);
00122
00123 typedef std::vector<std::string> vString;
00124 vString empty_vString;
00125 vString debugModules;
00126 vString suppressDebug;
00127 vString suppressInfo;
00128 vString suppressWarning;
00129 vString suppressError;
00130
00131 try {
00132
00133 fjrSummaryRequested_ =
00134 iPS.getUntrackedParameter<bool>("messageSummaryToJobReport", false);
00135
00136
00137 debugModules =
00138 iPS.getUntrackedParameter<vString>("debugModules", empty_vString);
00139
00140
00141 suppressDebug =
00142 iPS.getUntrackedParameter<vString>("suppressDebug", empty_vString);
00143
00144 suppressInfo =
00145 iPS.getUntrackedParameter<vString>("suppressInfo", empty_vString);
00146
00147 suppressWarning =
00148 iPS.getUntrackedParameter<vString>("suppressWarning", empty_vString);
00149
00150 suppressError =
00151 iPS.getUntrackedParameter<vString>("suppressError", empty_vString);
00152 } catch (cms::Exception& e) {
00153 }
00154
00155
00156
00157
00158 for( vString::const_iterator it = suppressDebug.begin();
00159 it != suppressDebug.end(); ++it ) {
00160 suppression_levels_[*it] = ELseverityLevel::ELsev_success;
00161 }
00162
00163 for( vString::const_iterator it = suppressInfo.begin();
00164 it != suppressInfo.end(); ++it ) {
00165 suppression_levels_[*it] = ELseverityLevel::ELsev_info;
00166 }
00167
00168 for( vString::const_iterator it = suppressWarning.begin();
00169 it != suppressWarning.end(); ++it ) {
00170 suppression_levels_[*it] = ELseverityLevel::ELsev_warning;
00171 }
00172
00173 for( vString::const_iterator it = suppressError.begin();
00174 it != suppressError.end(); ++it ) {
00175 suppression_levels_[*it] = ELseverityLevel::ELsev_error;
00176 }
00177
00178
00179
00180 if ( debugModules.empty()) {
00181 anyDebugEnabled_ = false;
00182 MessageDrop::debugEnabled = false;
00183 } else {
00184 anyDebugEnabled_ = true;
00185 MessageDrop::debugEnabled = false;
00186
00187 }
00188
00189
00190 for( vString::const_iterator it = debugModules.begin();
00191 it != debugModules.end(); ++it ) {
00192 if (*it == "*") {
00193 everyDebugEnabled_ = true;
00194 } else {
00195 debugEnabledModules_.insert(*it);
00196 }
00197 }
00198
00199
00200 std::string jr_name = edm::MessageDrop::instance()->jobreport_name;
00201 if (!jr_name.empty()) {
00202 std::string * jr_name_p = new std::string(jr_name);
00203 MessageLoggerQ::MLqJOB( jr_name_p );
00204 }
00205
00206
00207 std::string jm = edm::MessageDrop::instance()->jobMode;
00208 std::string * jm_p = new std::string(jm);
00209 MessageLoggerQ::MLqMOD( jm_p );
00210
00211 MessageLoggerQ::MLqCFG( new ParameterSet(iPS) );
00212
00213 iRegistry.watchPostBeginJob(this,&MessageLogger::postBeginJob);
00214 iRegistry.watchPostEndJob(this,&MessageLogger::postEndJob);
00215 iRegistry.watchJobFailure(this,&MessageLogger::jobFailure);
00216
00217 iRegistry.watchPreModuleConstruction(this,&MessageLogger::preModuleConstruction);
00218 iRegistry.watchPostModuleConstruction(this,&MessageLogger::postModuleConstruction);
00219
00220
00221 iRegistry.watchPreSourceConstruction(this,&MessageLogger::preSourceConstruction);
00222 iRegistry.watchPostSourceConstruction(this,&MessageLogger::postSourceConstruction);
00223
00224
00225 iRegistry.watchPreModule(this,&MessageLogger::preModule);
00226 iRegistry.watchPostModule(this,&MessageLogger::postModule);
00227
00228 iRegistry.watchPreSource(this,&MessageLogger::preSource);
00229 iRegistry.watchPostSource(this,&MessageLogger::postSource);
00230
00231 iRegistry.watchPreSourceRun(this,&MessageLogger::preSource);
00232 iRegistry.watchPostSourceRun(this,&MessageLogger::postSource);
00233 iRegistry.watchPreSourceLumi(this,&MessageLogger::preSource);
00234 iRegistry.watchPostSourceLumi(this,&MessageLogger::postSource);
00235 iRegistry.watchPreOpenFile(this,&MessageLogger::preFile);
00236 iRegistry.watchPostOpenFile(this,&MessageLogger::postFile);
00237 iRegistry.watchPreCloseFile(this,&MessageLogger::preFileClose);
00238 iRegistry.watchPostCloseFile(this,&MessageLogger::postFile);
00239
00240
00241
00242 iRegistry.watchPreModuleBeginJob(this,&MessageLogger::preModuleBeginJob);
00243 iRegistry.watchPostModuleBeginJob(this,&MessageLogger::postModuleBeginJob);
00244 iRegistry.watchPreModuleEndJob(this,&MessageLogger::preModuleEndJob);
00245 iRegistry.watchPostModuleEndJob(this,&MessageLogger::postModuleEndJob);
00246 iRegistry.watchPreModuleBeginRun(this,&MessageLogger::preModuleBeginRun);
00247 iRegistry.watchPostModuleBeginRun(this,&MessageLogger::postModuleBeginRun);
00248 iRegistry.watchPreModuleEndRun(this,&MessageLogger::preModuleEndRun);
00249 iRegistry.watchPostModuleEndRun(this,&MessageLogger::postModuleEndRun);
00250 iRegistry.watchPreModuleBeginLumi(this,&MessageLogger::preModuleBeginLumi);
00251 iRegistry.watchPostModuleBeginLumi(this,&MessageLogger::postModuleBeginLumi);
00252 iRegistry.watchPreModuleEndLumi(this,&MessageLogger::preModuleEndLumi);
00253 iRegistry.watchPostModuleEndLumi(this,&MessageLogger::postModuleEndLumi);
00254
00255 iRegistry.watchPreProcessEvent(this,&MessageLogger::preEventProcessing);
00256 iRegistry.watchPostProcessEvent(this,&MessageLogger::postEventProcessing);
00257
00258 iRegistry.watchPreBeginRun(this,&MessageLogger::preBeginRun);
00259 iRegistry.watchPostBeginRun(this,&MessageLogger::postBeginRun);
00260 iRegistry.watchPreEndRun(this,&MessageLogger::preEndRun);
00261 iRegistry.watchPostEndRun(this,&MessageLogger::postEndRun);
00262 iRegistry.watchPreBeginLumi(this,&MessageLogger::preBeginLumi);
00263 iRegistry.watchPostBeginLumi(this,&MessageLogger::postBeginLumi);
00264 iRegistry.watchPreEndLumi(this,&MessageLogger::preEndLumi);
00265 iRegistry.watchPostEndLumi(this,&MessageLogger::postEndLumi);
00266
00267 iRegistry.watchPrePathBeginRun(this,&MessageLogger::prePathBeginRun);
00268 iRegistry.watchPostPathBeginRun(this,&MessageLogger::postPathBeginRun);
00269 iRegistry.watchPrePathEndRun(this,&MessageLogger::prePathEndRun);
00270 iRegistry.watchPostPathEndRun(this,&MessageLogger::postPathEndRun);
00271 iRegistry.watchPrePathBeginLumi(this,&MessageLogger::prePathBeginLumi);
00272 iRegistry.watchPostPathBeginLumi(this,&MessageLogger::postPathBeginLumi);
00273 iRegistry.watchPrePathEndLumi(this,&MessageLogger::prePathEndLumi);
00274 iRegistry.watchPostPathEndLumi(this,&MessageLogger::postPathEndLumi);
00275 iRegistry.watchPreProcessPath(this,&MessageLogger::preProcessPath);
00276 iRegistry.watchPostProcessPath(this,&MessageLogger::postProcessPath);
00277
00278 }
00279
00280
00281
00282
00283
00284 void
00285 MessageLogger::establishModule(ModuleDescription const & desc,
00286 const char * whichPhase)
00287 {
00288 MessageDrop* messageDrop = MessageDrop::instance();
00289 nonModule_debugEnabled = messageDrop->debugEnabled;
00290 nonModule_infoEnabled = messageDrop->infoEnabled;
00291 nonModule_warningEnabled = messageDrop->warningEnabled;
00292 nonModule_errorEnabled = messageDrop->errorEnabled;
00293
00294
00295
00296 messageDrop->setModuleWithPhase( desc.moduleName(), desc.moduleLabel(),
00297 &desc, whichPhase );
00298
00299
00300
00301 if (!anyDebugEnabled_) {
00302 messageDrop->debugEnabled = false;
00303 } else if (everyDebugEnabled_) {
00304 messageDrop->debugEnabled = true;
00305 } else {
00306 messageDrop->debugEnabled =
00307 debugEnabledModules_.count(desc.moduleLabel());
00308 }
00309
00310 std::map<const std::string,ELseverityLevel>::const_iterator it =
00311 suppression_levels_.find(desc.moduleLabel());
00312 if ( it != suppression_levels_.end() ) {
00313 messageDrop->debugEnabled = messageDrop->debugEnabled
00314 && (it->second < ELseverityLevel::ELsev_success );
00315 messageDrop->infoEnabled = (it->second < ELseverityLevel::ELsev_info );
00316 messageDrop->warningEnabled = (it->second < ELseverityLevel::ELsev_warning );
00317 messageDrop->errorEnabled = (it->second < ELseverityLevel::ELsev_error );
00318 } else {
00319 messageDrop->infoEnabled = true;
00320 messageDrop->warningEnabled = true;
00321 messageDrop->errorEnabled = true;
00322 }
00323 }
00324
00325 void
00326 MessageLogger::establishModuleCtor(ModuleDescription const & desc,
00327 const char* whichPhase)
00328 {
00329 MessageDrop* messageDrop = MessageDrop::instance();
00330 nonModule_debugEnabled = messageDrop->debugEnabled;
00331 nonModule_infoEnabled = messageDrop->infoEnabled;
00332 nonModule_warningEnabled = messageDrop->warningEnabled;
00333 nonModule_errorEnabled = messageDrop->errorEnabled;
00334
00335
00336
00337 messageDrop->setModuleWithPhase( desc.moduleName(), desc.moduleLabel(),
00338 0, whichPhase );
00339
00340
00341
00342 if (!anyDebugEnabled_) {
00343 messageDrop->debugEnabled = false;
00344 } else if (everyDebugEnabled_) {
00345 messageDrop->debugEnabled = true;
00346 } else {
00347 messageDrop->debugEnabled =
00348 debugEnabledModules_.count(desc.moduleLabel());
00349 }
00350
00351 std::map<const std::string,ELseverityLevel>::const_iterator it =
00352 suppression_levels_.find(desc.moduleLabel());
00353 if ( it != suppression_levels_.end() ) {
00354 messageDrop->debugEnabled = messageDrop->debugEnabled
00355 && (it->second < ELseverityLevel::ELsev_success );
00356 messageDrop->infoEnabled = (it->second < ELseverityLevel::ELsev_info );
00357 messageDrop->warningEnabled = (it->second < ELseverityLevel::ELsev_warning );
00358 messageDrop->errorEnabled = (it->second < ELseverityLevel::ELsev_error );
00359 } else {
00360 messageDrop->infoEnabled = true;
00361 messageDrop->warningEnabled = true;
00362 messageDrop->errorEnabled = true;
00363 }
00364 messageDrop->snapshot();
00365 }
00366
00367 void
00368 MessageLogger::unEstablishModule(ModuleDescription const & ,
00369 const char* state)
00370 {
00371
00372
00373
00374 MessageDrop* messageDrop = MessageDrop::instance();
00375 messageDrop->setSinglet( state );
00376 messageDrop->debugEnabled = nonModule_debugEnabled;
00377 messageDrop->infoEnabled = nonModule_infoEnabled;
00378 messageDrop->warningEnabled = nonModule_warningEnabled;
00379 messageDrop->errorEnabled = nonModule_errorEnabled;
00380 }
00381
00382 void
00383 MessageLogger::establish(const char* state)
00384 {
00385 MessageDrop* messageDrop = MessageDrop::instance();
00386 messageDrop->setSinglet( state );
00387 if (!anyDebugEnabled_) {
00388 messageDrop->debugEnabled = false;
00389 } else if (everyDebugEnabled_) {
00390 messageDrop->debugEnabled = true;
00391 } else {
00392 messageDrop->debugEnabled =
00393 debugEnabledModules_.count(state);
00394 }
00395 std::map<const std::string,ELseverityLevel>::const_iterator it =
00396 suppression_levels_.find(state);
00397 if ( it != suppression_levels_.end() ) {
00398 messageDrop->debugEnabled = messageDrop->debugEnabled
00399 && (it->second < ELseverityLevel::ELsev_success );
00400 messageDrop->infoEnabled = (it->second < ELseverityLevel::ELsev_info );
00401 messageDrop->warningEnabled = (it->second < ELseverityLevel::ELsev_warning );
00402 messageDrop->errorEnabled = (it->second < ELseverityLevel::ELsev_error );
00403 } else {
00404 messageDrop->infoEnabled = true;
00405 messageDrop->warningEnabled = true;
00406 messageDrop->errorEnabled = true;
00407 }
00408 }
00409
00410 void
00411 MessageLogger::unEstablish(const char* state)
00412 {
00413 MessageDrop::instance()->setSinglet( state );
00414 }
00415
00416
00417
00418
00419
00420 void
00421 MessageLogger::preModuleConstruction(const ModuleDescription& desc)
00422 {
00423 if (!messageServicePSetHasBeenValidated_) {
00424 if (!messageServicePSetValidatationResults_.empty() ) {
00425 throw ( edm::Exception
00426 ( edm::errors::Configuration
00427 , messageServicePSetValidatationResults_
00428 ) );
00429 }
00430 messageServicePSetHasBeenValidated_ = true;
00431 }
00432 establishModuleCtor (desc,"@ctor");
00433 }
00434 void MessageLogger::postModuleConstruction(const ModuleDescription& iDescription)
00435 { unEstablishModule (iDescription, "AfterModConstruction"); }
00436
00437 void
00438 MessageLogger::preModuleBeginJob(const ModuleDescription& desc)
00439 {
00440 establishModule (desc,"@beginJob");
00441 }
00442 void MessageLogger::postModuleBeginJob(const ModuleDescription& iDescription)
00443 { unEstablishModule (iDescription, "AfterModBeginJob"); }
00444
00445 void
00446 MessageLogger::preSourceConstruction(const ModuleDescription& desc)
00447 {
00448 if (!messageServicePSetHasBeenValidated_) {
00449 if (!messageServicePSetValidatationResults_.empty() ) {
00450 throw ( edm::Exception
00451 ( edm::errors::Configuration
00452 , messageServicePSetValidatationResults_
00453 ) );
00454 }
00455 messageServicePSetHasBeenValidated_ = true;
00456 }
00457 establishModuleCtor (desc,"@sourceConstruction");
00458 }
00459 void MessageLogger::postSourceConstruction(const ModuleDescription& iDescription)
00460 { unEstablishModule (iDescription, "AfterSourceConstruction"); }
00461
00462 void
00463 MessageLogger::preModuleBeginRun(const ModuleDescription& desc)
00464 {
00465 establishModule (desc,"@beginRun");
00466 }
00467 void MessageLogger::postModuleBeginRun(const ModuleDescription& iDescription)
00468 { unEstablishModule (iDescription, "AfterModBeginRun"); }
00469
00470 void
00471 MessageLogger::preModuleBeginLumi(const ModuleDescription& desc)
00472 {
00473 establishModule (desc,"@beginLumi");
00474 }
00475 void MessageLogger::postModuleBeginLumi(const ModuleDescription& iDescription)
00476 { unEstablishModule (iDescription, "AfterModBeginLumi"); }
00477
00478 void
00479 MessageLogger::preModule(const ModuleDescription& desc)
00480 {
00481 establishModule (desc,"");
00482 moduleStack_.emplace_back(&desc);
00483 }
00484
00485 void MessageLogger::postModule(const ModuleDescription& iDescription)
00486 {
00487
00488 if(moduleStack_.empty()) {
00489 unEstablishModule (iDescription, "PostModule");
00490 } else {
00491 moduleStack_.pop_back();
00492 if(moduleStack_.empty()) {
00493 unEstablishModule (iDescription, "PostModule");
00494 } else {
00495 establishModule(*moduleStack_.back(), "");
00496 }
00497 }
00498 }
00499
00500 void
00501 MessageLogger::preModuleEndLumi(const ModuleDescription& desc)
00502 {
00503 establishModule (desc,"@endLumi");
00504 }
00505 void MessageLogger::postModuleEndLumi(const ModuleDescription& iDescription)
00506 { unEstablishModule (iDescription, "AfterModEndLumi"); }
00507
00508 void
00509 MessageLogger::preModuleEndRun(const ModuleDescription& desc)
00510 {
00511 establishModule (desc,"@endRun");
00512 }
00513 void MessageLogger::postModuleEndRun(const ModuleDescription& iDescription)
00514 { unEstablishModule (iDescription, "AfterModEndRun"); }
00515
00516 void
00517 MessageLogger::preModuleEndJob(const ModuleDescription& desc)
00518 {
00519 establishModule (desc,"@endJob");
00520 }
00521 void MessageLogger::postModuleEndJob(const ModuleDescription& iDescription)
00522 { unEstablishModule (iDescription, "AfterModEndJob"); }
00523
00524
00525
00526
00527
00528 void
00529 MessageLogger::postBeginJob()
00530 {
00531 MessageDrop::instance()->runEvent = "BeforeEvents";
00532 MessageDrop::instance()->setSinglet("AfterBeginJob");
00533 }
00534
00535 void
00536 MessageLogger::preSource()
00537 {
00538 establish("source");
00539 }
00540 void MessageLogger::postSource()
00541 { unEstablish("AfterSource"); }
00542
00543 void MessageLogger::preFile()
00544 { establish("file_open"); }
00545 void MessageLogger::preFileClose( std::string const &, bool )
00546 { establish("file_close"); }
00547 void MessageLogger::postFile()
00548 { unEstablish("AfterFile"); }
00549
00550
00551 void
00552 MessageLogger::preEventProcessing( const edm::EventID& iID
00553 , const edm::Timestamp& )
00554 {
00555 std::ostringstream ost;
00556 curr_event_ = iID;
00557 ost << "Run: " << curr_event_.run()
00558 << " Event: " << curr_event_.event();
00559 edm::MessageDrop::instance()->runEvent = ost.str();
00560 edm::MessageDrop::instance()->setSinglet("PreEventProcessing");
00561
00562
00563 }
00564
00565 void
00566 MessageLogger::postEventProcessing(const Event&, const EventSetup&)
00567 {
00568 edm::MessageDrop::instance()->runEvent = "PostProcessEvent";
00569 }
00570
00571 void
00572 MessageLogger::preBeginRun( const edm::RunID& iID
00573 , const edm::Timestamp& )
00574 {
00575 std::ostringstream ost;
00576 ost << "Run: " << iID.run();
00577 edm::MessageDrop::instance()->runEvent = ost.str();
00578 edm::MessageDrop::instance()->setSinglet("PreBeginRun");
00579 }
00580 void MessageLogger::postBeginRun(const Run&, const EventSetup&)
00581 {
00582 edm::MessageDrop::instance()->runEvent = "PostBeginRun";
00583 edm::MessageDrop::instance()->setSinglet("PostBeginRun");
00584
00585 }
00586
00587 void
00588 MessageLogger::prePathBeginRun( const std::string & pathname )
00589 {
00590 edm::MessageDrop::instance()->setPath( "RPath: ", pathname);
00591 }
00592
00593 void MessageLogger::postPathBeginRun(std::string const&,HLTPathStatus const&)
00594 {
00595 edm::MessageDrop::instance()->setSinglet("PostPathBeginRun");
00596 }
00597
00598 void
00599 MessageLogger::prePathEndRun( const std::string & pathname )
00600 {
00601 edm::MessageDrop::instance()->setPath( "RPathEnd: ", pathname);
00602
00603 }
00604
00605 void MessageLogger::postPathEndRun(std::string const&,HLTPathStatus const&)
00606 {
00607 edm::MessageDrop::instance()->setSinglet("PostPathEndRun");
00608 }
00609
00610 void
00611 MessageLogger::prePathBeginLumi( const std::string & pathname )
00612 {
00613 edm::MessageDrop::instance()->setPath( "LPath: ", pathname);
00614 }
00615
00616 void MessageLogger::postPathBeginLumi(std::string const&,HLTPathStatus const&)
00617 {
00618 edm::MessageDrop::instance()->setSinglet("PostPathBeginLumi");
00619 }
00620
00621 void
00622 MessageLogger::prePathEndLumi( const std::string & pathname )
00623 {
00624 edm::MessageDrop::instance()->setPath( "LPathEnd: ", pathname);
00625
00626 }
00627
00628 void MessageLogger::postPathEndLumi(std::string const&,HLTPathStatus const&)
00629 {
00630 edm::MessageDrop::instance()->setSinglet("PostPathEndLumi");
00631 }
00632
00633 void
00634 MessageLogger::preProcessPath( const std::string & pathname )
00635 {
00636 edm::MessageDrop::instance()->setPath( "PreProcPath ", pathname);
00637
00638 }
00639
00640 void MessageLogger::postProcessPath(std::string const&,HLTPathStatus const&)
00641 {
00642 edm::MessageDrop::instance()->setSinglet("PostProcessPath");
00643 }
00644
00645 void
00646 MessageLogger::preEndRun( const edm::RunID& iID
00647 , const edm::Timestamp& )
00648 {
00649 std::ostringstream ost;
00650 ost << "End Run: " << iID.run();
00651 edm::MessageDrop::instance()->runEvent = ost.str();
00652 edm::MessageDrop::instance()->setSinglet("PreEndRun");
00653 }
00654
00655 void MessageLogger::postEndRun(const Run&, const EventSetup&)
00656 {
00657 edm::MessageDrop::instance()->runEvent = "PostEndRun";
00658 edm::MessageDrop::instance()->setSinglet("PostEndRun");
00659 }
00660
00661 void
00662 MessageLogger::preBeginLumi( const edm::LuminosityBlockID& iID
00663 , const edm::Timestamp& )
00664 {
00665 std::ostringstream ost;
00666 ost << "Run: " << iID.run() << " Lumi: " << iID.luminosityBlock();
00667 edm::MessageDrop::instance()->runEvent = ost.str();
00668 edm::MessageDrop::instance()->setSinglet("PreBeginLumi");
00669 }
00670
00671 void MessageLogger::postBeginLumi(const LuminosityBlock&, const EventSetup&)
00672 {
00673 edm::MessageDrop::instance()->runEvent = "PostBeginLumi";
00674 edm::MessageDrop::instance()->setSinglet("PostBeginLumi");
00675 }
00676
00677 void
00678 MessageLogger::preEndLumi( const edm::LuminosityBlockID& iID
00679 , const edm::Timestamp& )
00680 {
00681 std::ostringstream ost;
00682 ost << "Run: " << iID.run() << " Lumi: " << iID.luminosityBlock();
00683 edm::MessageDrop::instance()->runEvent = ost.str();
00684 edm::MessageDrop::instance()->setSinglet("PreEndLumi");
00685 }
00686 void MessageLogger::postEndLumi(const LuminosityBlock&, const EventSetup&)
00687 {
00688 edm::MessageDrop::instance()->runEvent = "PostEndLumi";
00689 edm::MessageDrop::instance()->setSinglet("PostEndLumi");
00690 }
00691
00692 void
00693 MessageLogger::postEndJob()
00694 {
00695 SummarizeInJobReport();
00696 MessageLoggerQ::MLqSUM ( );
00697 }
00698
00699 void
00700 MessageLogger::jobFailure()
00701 {
00702 MessageDrop* messageDrop = MessageDrop::instance();
00703 messageDrop->moduleName = "jobFailure";
00704 SummarizeInJobReport();
00705 MessageLoggerQ::MLqSUM ( );
00706 }
00707
00708
00709
00710
00711
00712
00713 void
00714 MessageLogger::SummarizeInJobReport() {
00715 if ( fjrSummaryRequested_ ) {
00716 std::map<std::string, double> * smp = new std::map<std::string, double> ();
00717 MessageLoggerQ::MLqJRS ( smp );
00718 Service<JobReport> reportSvc;
00719 reportSvc->reportMessageInfo(*smp);
00720 delete smp;
00721 }
00722 }
00723
00724 }
00725 }