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 }
00483 void MessageLogger::postModule(const ModuleDescription& iDescription)
00484 { unEstablishModule (iDescription, "PostModule"); }
00485
00486 void
00487 MessageLogger::preModuleEndLumi(const ModuleDescription& desc)
00488 {
00489 establishModule (desc,"@endLumi");
00490 }
00491 void MessageLogger::postModuleEndLumi(const ModuleDescription& iDescription)
00492 { unEstablishModule (iDescription, "AfterModEndLumi"); }
00493
00494 void
00495 MessageLogger::preModuleEndRun(const ModuleDescription& desc)
00496 {
00497 establishModule (desc,"@endRun");
00498 }
00499 void MessageLogger::postModuleEndRun(const ModuleDescription& iDescription)
00500 { unEstablishModule (iDescription, "AfterModEndRun"); }
00501
00502 void
00503 MessageLogger::preModuleEndJob(const ModuleDescription& desc)
00504 {
00505 establishModule (desc,"@endJob");
00506 }
00507 void MessageLogger::postModuleEndJob(const ModuleDescription& iDescription)
00508 { unEstablishModule (iDescription, "AfterModEndJob"); }
00509
00510
00511
00512
00513
00514 void
00515 MessageLogger::postBeginJob()
00516 {
00517 MessageDrop::instance()->runEvent = "BeforeEvents";
00518 MessageDrop::instance()->setSinglet("AfterBeginJob");
00519 }
00520
00521 void
00522 MessageLogger::preSource()
00523 {
00524 establish("source");
00525 }
00526 void MessageLogger::postSource()
00527 { unEstablish("AfterSource"); }
00528
00529 void MessageLogger::preFile()
00530 { establish("file_open"); }
00531 void MessageLogger::preFileClose()
00532 { establish("file_close"); }
00533 void MessageLogger::postFile()
00534 { unEstablish("AfterFile"); }
00535
00536
00537 void
00538 MessageLogger::preEventProcessing( const edm::EventID& iID
00539 , const edm::Timestamp& )
00540 {
00541 std::ostringstream ost;
00542 curr_event_ = iID;
00543 ost << "Run: " << curr_event_.run()
00544 << " Event: " << curr_event_.event();
00545 edm::MessageDrop::instance()->runEvent = ost.str();
00546 edm::MessageDrop::instance()->setSinglet("PreEventProcessing");
00547
00548
00549 }
00550
00551 void
00552 MessageLogger::postEventProcessing(const Event&, const EventSetup&)
00553 {
00554 edm::MessageDrop::instance()->runEvent = "PostProcessEvent";
00555 }
00556
00557 void
00558 MessageLogger::preBeginRun( const edm::RunID& iID
00559 , const edm::Timestamp& )
00560 {
00561 std::ostringstream ost;
00562 ost << "Run: " << iID.run();
00563 edm::MessageDrop::instance()->runEvent = ost.str();
00564 edm::MessageDrop::instance()->setSinglet("PreBeginRun");
00565 }
00566 void MessageLogger::postBeginRun(const Run&, const EventSetup&)
00567 {
00568 edm::MessageDrop::instance()->runEvent = "PostBeginRun";
00569 edm::MessageDrop::instance()->setSinglet("PostBeginRun");
00570
00571 }
00572
00573 void
00574 MessageLogger::prePathBeginRun( const std::string & pathname )
00575 {
00576 edm::MessageDrop::instance()->setPath( "RPath: ", pathname);
00577 }
00578
00579 void MessageLogger::postPathBeginRun(std::string const&,HLTPathStatus const&)
00580 {
00581 edm::MessageDrop::instance()->setSinglet("PostPathBeginRun");
00582 }
00583
00584 void
00585 MessageLogger::prePathEndRun( const std::string & pathname )
00586 {
00587 edm::MessageDrop::instance()->setPath( "RPathEnd: ", pathname);
00588
00589 }
00590
00591 void MessageLogger::postPathEndRun(std::string const&,HLTPathStatus const&)
00592 {
00593 edm::MessageDrop::instance()->setSinglet("PostPathEndRun");
00594 }
00595
00596 void
00597 MessageLogger::prePathBeginLumi( const std::string & pathname )
00598 {
00599 edm::MessageDrop::instance()->setPath( "LPath: ", pathname);
00600 }
00601
00602 void MessageLogger::postPathBeginLumi(std::string const&,HLTPathStatus const&)
00603 {
00604 edm::MessageDrop::instance()->setSinglet("PostPathBeginLumi");
00605 }
00606
00607 void
00608 MessageLogger::prePathEndLumi( const std::string & pathname )
00609 {
00610 edm::MessageDrop::instance()->setPath( "LPathEnd: ", pathname);
00611
00612 }
00613
00614 void MessageLogger::postPathEndLumi(std::string const&,HLTPathStatus const&)
00615 {
00616 edm::MessageDrop::instance()->setSinglet("PostPathEndLumi");
00617 }
00618
00619 void
00620 MessageLogger::preProcessPath( const std::string & pathname )
00621 {
00622 edm::MessageDrop::instance()->setPath( "PreProcPath ", pathname);
00623
00624 }
00625
00626 void MessageLogger::postProcessPath(std::string const&,HLTPathStatus const&)
00627 {
00628 edm::MessageDrop::instance()->setSinglet("PostProcessPath");
00629 }
00630
00631 void
00632 MessageLogger::preEndRun( const edm::RunID& iID
00633 , const edm::Timestamp& )
00634 {
00635 std::ostringstream ost;
00636 ost << "End Run: " << iID.run();
00637 edm::MessageDrop::instance()->runEvent = ost.str();
00638 edm::MessageDrop::instance()->setSinglet("PreEndRun");
00639 }
00640
00641 void MessageLogger::postEndRun(const Run&, const EventSetup&)
00642 {
00643 edm::MessageDrop::instance()->runEvent = "PostEndRun";
00644 edm::MessageDrop::instance()->setSinglet("PostEndRun");
00645 }
00646
00647 void
00648 MessageLogger::preBeginLumi( const edm::LuminosityBlockID& iID
00649 , const edm::Timestamp& )
00650 {
00651 std::ostringstream ost;
00652 ost << "Run: " << iID.run() << " Lumi: " << iID.luminosityBlock();
00653 edm::MessageDrop::instance()->runEvent = ost.str();
00654 edm::MessageDrop::instance()->setSinglet("PreBeginLumi");
00655 }
00656
00657 void MessageLogger::postBeginLumi(const LuminosityBlock&, const EventSetup&)
00658 {
00659 edm::MessageDrop::instance()->runEvent = "PostBeginLumi";
00660 edm::MessageDrop::instance()->setSinglet("PostBeginLumi");
00661 }
00662
00663 void
00664 MessageLogger::preEndLumi( const edm::LuminosityBlockID& iID
00665 , const edm::Timestamp& )
00666 {
00667 std::ostringstream ost;
00668 ost << "Run: " << iID.run() << " Lumi: " << iID.luminosityBlock();
00669 edm::MessageDrop::instance()->runEvent = ost.str();
00670 edm::MessageDrop::instance()->setSinglet("PreEndLumi");
00671 }
00672 void MessageLogger::postEndLumi(const LuminosityBlock&, const EventSetup&)
00673 {
00674 edm::MessageDrop::instance()->runEvent = "PostEndLumi";
00675 edm::MessageDrop::instance()->setSinglet("PostEndLumi");
00676 }
00677
00678 void
00679 MessageLogger::postEndJob()
00680 {
00681 SummarizeInJobReport();
00682 MessageLoggerQ::MLqSUM ( );
00683 }
00684
00685 void
00686 MessageLogger::jobFailure()
00687 {
00688 MessageDrop* messageDrop = MessageDrop::instance();
00689 messageDrop->moduleName = "jobFailure";
00690 SummarizeInJobReport();
00691 MessageLoggerQ::MLqSUM ( );
00692 }
00693
00694
00695
00696
00697
00698
00699 void
00700 MessageLogger::SummarizeInJobReport() {
00701 if ( fjrSummaryRequested_ ) {
00702 std::map<std::string, double> * smp = new std::map<std::string, double> ();
00703 MessageLoggerQ::MLqJRS ( smp );
00704 Service<JobReport> reportSvc;
00705 reportSvc->reportMessageInfo(*smp);
00706 delete smp;
00707 }
00708 }
00709
00710 }
00711 }