00001 #ifndef FWCore_MessageService_MessageLogger_h 00002 #define FWCore_MessageService_MessageLogger_h 00003 00004 // -*- C++ -*- 00005 // 00006 // Package: Services 00007 // Class : MessageLogger 00008 // 00017 // 00018 // Original Author: W. Brown and M. Fischler 00019 // Created: Fri Nov 11 16:38:19 CST 2005 00020 // Major Split: Tue Feb 14 15:00:00 CST 2006 00021 // See FWCore/MessageLogger/MessageLogger.h 00022 // $Id: MessageLogger.h,v 1.10 2008/06/20 20:55:47 fischler Exp $ 00023 // 00024 00025 // system include files 00026 00027 #include <memory> 00028 #include <string> 00029 #include <set> 00030 #include <map> 00031 00032 // user include files 00033 00034 #include "FWCore/MessageLogger/interface/ErrorObj.h" 00035 00036 #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h" 00037 #include "DataFormats/Provenance/interface/EventID.h" 00038 #include "FWCore/MessageLogger/interface/ELseverityLevel.h" 00039 00040 // forward declarations 00041 00042 namespace edm { 00043 class ParameterSet; 00044 namespace service { 00045 00046 00047 class MessageLogger 00048 { 00049 public: 00050 MessageLogger( ParameterSet const &, ActivityRegistry & ); 00051 00052 void postBeginJob(); 00053 void postEndJob(); 00054 00055 void preEventProcessing ( edm::EventID const &, edm::Timestamp const & ); 00056 void postEventProcessing( Event const &, EventSetup const & ); 00057 00058 void preModuleConstruction ( ModuleDescription const & ); 00059 void postModuleConstruction( ModuleDescription const & ); 00060 00061 void preSourceConstruction ( ModuleDescription const & ); 00062 void postSourceConstruction( ModuleDescription const & ); 00063 00064 void preSource (); 00065 void postSource (); 00066 00067 void preModule ( ModuleDescription const & ); 00068 void postModule( ModuleDescription const & ); 00069 00070 void fillErrorObj(edm::ErrorObj& obj) const; 00071 bool debugEnabled() const { return debugEnabled_; } 00072 00073 static 00074 bool anyDebugEnabled() { return anyDebugEnabled_; } 00075 00076 static 00077 void SummarizeInJobReport(); 00078 00079 private: 00080 // put an ErrorLog object here, and maybe more 00081 00082 edm::EventID curr_event_; 00083 std::string curr_module_; 00084 00085 std::set<std::string> debugEnabledModules_; 00086 std::map<std::string,ELseverityLevel> suppression_levels_; 00087 bool debugEnabled_; 00088 //this is a cache which profiling has shown to be helpful 00089 std::map<const ModuleDescription*, std::string> descToCalcName_; 00090 static bool anyDebugEnabled_; 00091 static bool everyDebugEnabled_; 00092 00093 static bool fjrSummaryRequested_; 00094 00095 }; // MessageLogger 00096 00097 00098 } // namespace service 00099 00100 } // namespace edm 00101 00102 00103 00104 #endif // FWCore_MessageService_MessageLogger_h 00105