CMS 3D CMS Logo

MessageLogger.h
Go to the documentation of this file.
1 #ifndef FWCore_MessageService_MessageLogger_h
2 #define FWCore_MessageService_MessageLogger_h
3 
4 // -*- C++ -*-
5 //
6 // Package: Services
7 // Class : MessageLogger
8 //
17 //
18 // Original Author: W. Brown and M. Fischler
19 // Created: Fri Nov 11 16:38:19 CST 2005
20 // Major Split: Tue Feb 14 15:00:00 CST 2006
21 // See FWCore/MessageLogger/MessageLogger.h
22 //
23 
24 // system include files
25 
26 #include <memory>
27 #include <string>
28 #include <set>
29 #include <map>
30 #include <vector>
31 
32 // user include files
33 
39 
40 // forward declarations
41 
42 namespace edm {
43  class ModuleDescription;
44  class ParameterSet;
45  namespace service {
46 
47  class MessageLogger {
48  public:
50 
51  void fillErrorObj(edm::ErrorObj& obj) const;
52  bool debugEnabled() const { return debugEnabled_; }
53 
54  static bool anyDebugEnabled() { return anyDebugEnabled_; }
55 
56  static void SummarizeInJobReport();
57 
58  private:
59  void postBeginJob();
60  void postEndJob();
61  void jobFailure();
62 
65  void preSourceRunLumi();
66  void postSourceRunLumi();
67 
68  void preFile(std::string const&, bool);
69  void preFileClose(std::string const&, bool);
70  void postFile(std::string const&, bool);
71 
74 
77 
80 
83 
88 
93 
98 
103 
104  void preEvent(StreamContext const&);
105  void postEvent(StreamContext const&);
106 
107  void preStreamBeginRun(StreamContext const&);
108  void postStreamBeginRun(StreamContext const&);
109  void preStreamEndRun(StreamContext const&);
110  void postStreamEndRun(StreamContext const&);
111  void preStreamBeginLumi(StreamContext const&);
112  void postStreamBeginLumi(StreamContext const&);
113  void preStreamEndLumi(StreamContext const&);
114  void postStreamEndLumi(StreamContext const&);
115 
120 
125 
126  void preGlobalBeginRun(GlobalContext const&);
127  void postGlobalBeginRun(GlobalContext const&);
128  void preGlobalEndRun(GlobalContext const&);
129  void postGlobalEndRun(GlobalContext const&);
130  void preGlobalBeginLumi(GlobalContext const&);
131  void postGlobalBeginLumi(GlobalContext const&);
132  void preGlobalEndLumi(GlobalContext const&);
133  void postGlobalEndLumi(GlobalContext const&);
134 
135  void prePathEvent(StreamContext const&, PathContext const&);
136  void postPathEvent(StreamContext const&, PathContext const&, HLTPathStatus const&);
137 
138  // set up the module name in the message drop, and the enable/suppress info
139  void establishModule(const ModuleDescription& desc, const char* whichPhase);
140  void unEstablishModule(const ModuleDescription& desc, const char* whichPhase);
141  void establishModule(unsigned int transitionIndex, const ModuleCallingContext& context, const char* whichPhase);
142  void unEstablishModule(const ModuleCallingContext& desc, const char* whichPhase);
143  void establish(const char* whichPhase);
144  void unEstablish(const char* whichPhase);
145 
146  //Cache string description for each active transition
147  // stream info is first in the container
148  // concurrent lumi info is next
149  // concurrent run info is last
150  std::vector<std::string> transitionInfoCache_;
151  unsigned int lumiInfoBegin_ = 0;
152  unsigned int runInfoBegin_ = 0;
153 
154  std::set<std::string> debugEnabledModules_;
155  std::map<std::string, ELseverityLevel> suppression_levels_;
159 
163 
168 
169  }; // MessageLogger
170 
171  inline bool isProcessWideService(MessageLogger const*) { return true; }
172 
173  } // namespace service
174 
175 } // namespace edm
176 
177 #endif // FWCore_MessageService_MessageLogger_h
void preModuleStreamEndLumi(StreamContext const &, ModuleCallingContext const &)
void preModuleEvent(StreamContext const &, ModuleCallingContext const &)
void postModuleEvent(StreamContext const &, ModuleCallingContext const &)
void preModuleEndJob(ModuleDescription const &)
void postGlobalEndRun(GlobalContext const &)
void postStreamBeginLumi(StreamContext const &)
void preStreamEndLumi(StreamContext const &)
void preStreamBeginLumi(StreamContext const &)
void preModuleGlobalBeginLumi(GlobalContext const &, ModuleCallingContext const &)
void postModuleConstruction(ModuleDescription const &)
void postModuleGlobalBeginLumi(GlobalContext const &, ModuleCallingContext const &)
void preModuleEventAcquire(StreamContext const &, ModuleCallingContext const &)
void postGlobalBeginLumi(GlobalContext const &)
void preModuleBeginJob(ModuleDescription const &)
void postModuleGlobalBeginRun(GlobalContext const &, ModuleCallingContext const &)
void postGlobalBeginRun(GlobalContext const &)
bool isProcessWideService(TFileService const *)
Definition: TFileService.h:99
void preGlobalEndLumi(GlobalContext const &)
void preSourceConstruction(ModuleDescription const &)
MessageLogger(ParameterSet const &, ActivityRegistry &)
void establishModule(const ModuleDescription &desc, const char *whichPhase)
void preGlobalBeginLumi(GlobalContext const &)
void postModuleEventAcquire(StreamContext const &, ModuleCallingContext const &)
void postStreamEndRun(StreamContext const &)
void preModuleBeginStream(StreamContext const &, ModuleCallingContext const &)
void preGlobalBeginRun(GlobalContext const &)
void postModuleGlobalEndLumi(GlobalContext const &, ModuleCallingContext const &)
void preModuleGlobalEndRun(GlobalContext const &, ModuleCallingContext const &)
void postEvent(StreamContext const &)
void postModuleStreamEndRun(StreamContext const &, ModuleCallingContext const &)
void preFileClose(std::string const &, bool)
void prePathEvent(StreamContext const &, PathContext const &)
#define CMS_THREAD_SAFE
void preModuleStreamEndRun(StreamContext const &, ModuleCallingContext const &)
void postModuleStreamBeginRun(StreamContext const &, ModuleCallingContext const &)
void preModuleConstruction(ModuleDescription const &)
void fillErrorObj(edm::ErrorObj &obj) const
void postStreamBeginRun(StreamContext const &)
void postModuleStreamEndLumi(StreamContext const &, ModuleCallingContext const &)
void postStreamEndLumi(StreamContext const &)
void postPathEvent(StreamContext const &, PathContext const &, HLTPathStatus const &)
void postModuleBeginStream(StreamContext const &, ModuleCallingContext const &)
std::vector< std::string > transitionInfoCache_
std::map< std::string, ELseverityLevel > suppression_levels_
std::set< std::string > debugEnabledModules_
void establish(const char *whichPhase)
void postSourceConstruction(ModuleDescription const &)
void unEstablishModule(const ModuleDescription &desc, const char *whichPhase)
void postModuleEndJob(ModuleDescription const &)
void preStreamEndRun(StreamContext const &)
void unEstablish(const char *whichPhase)
HLT enums.
void postModuleBeginJob(ModuleDescription const &)
void preModuleEndStream(StreamContext const &, ModuleCallingContext const &)
static void SummarizeInJobReport()
void preModuleGlobalEndLumi(GlobalContext const &, ModuleCallingContext const &)
void preFile(std::string const &, bool)
void postGlobalEndLumi(GlobalContext const &)
void postModuleStreamBeginLumi(StreamContext const &, ModuleCallingContext const &)
void postModuleGlobalEndRun(GlobalContext const &, ModuleCallingContext const &)
void preModuleStreamBeginLumi(StreamContext const &, ModuleCallingContext const &)
void preGlobalEndRun(GlobalContext const &)
void preEvent(StreamContext const &)
std::string messageServicePSetValidatationResults_
void preModuleGlobalBeginRun(GlobalContext const &, ModuleCallingContext const &)
void preStreamBeginRun(StreamContext const &)
void postModuleEndStream(StreamContext const &, ModuleCallingContext const &)
void preModuleStreamBeginRun(StreamContext const &, ModuleCallingContext const &)
void postFile(std::string const &, bool)