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 preEndJob();
61  void postEndJob();
62  void jobFailure();
63 
66  void preSourceRunLumi();
67  void postSourceRunLumi();
68 
69  void preFile(std::string const&, bool);
70  void preFileClose(std::string const&, bool);
71  void postFile(std::string const&, bool);
72 
75 
78 
81 
84 
89 
94 
99 
104 
105  void preEvent(StreamContext const&);
106  void postEvent(StreamContext const&);
107 
108  void preStreamBeginRun(StreamContext const&);
109  void postStreamBeginRun(StreamContext const&);
110  void preStreamEndRun(StreamContext const&);
111  void postStreamEndRun(StreamContext const&);
112  void preStreamBeginLumi(StreamContext const&);
113  void postStreamBeginLumi(StreamContext const&);
114  void preStreamEndLumi(StreamContext const&);
115  void postStreamEndLumi(StreamContext const&);
116 
121 
126 
127  void preGlobalBeginRun(GlobalContext const&);
128  void postGlobalBeginRun(GlobalContext const&);
129  void preGlobalEndRun(GlobalContext const&);
130  void postGlobalEndRun(GlobalContext const&);
131  void preGlobalBeginLumi(GlobalContext const&);
132  void postGlobalBeginLumi(GlobalContext const&);
133  void preGlobalEndLumi(GlobalContext const&);
134  void postGlobalEndLumi(GlobalContext const&);
135 
136  void prePathEvent(StreamContext const&, PathContext const&);
137  void postPathEvent(StreamContext const&, PathContext const&, HLTPathStatus const&);
138 
139  // set up the module name in the message drop, and the enable/suppress info
140  void establishModule(const ModuleDescription& desc, const char* whichPhase);
141  void unEstablishModule(const ModuleDescription& desc, const char* whichPhase);
142  void establishModule(unsigned int transitionIndex, const ModuleCallingContext& context, const char* whichPhase);
143  void unEstablishModule(const ModuleCallingContext& desc, const char* whichPhase);
144  void establish(const char* whichPhase);
145  void unEstablish(const char* whichPhase);
146 
147  //Cache string description for each active transition
148  // stream info is first in the container
149  // concurrent lumi info is next
150  // concurrent run info is last
151  // The longest possible string needing to be cached is 51 chars
152  std::vector<std::array<char, 64>> transitionInfoCache_;
153  unsigned int lumiInfoBegin_ = 0;
154  unsigned int runInfoBegin_ = 0;
155 
156  std::set<std::string> debugEnabledModules_;
157  std::map<std::string, ELseverityLevel> suppression_levels_;
161 
165 
170 
171  }; // MessageLogger
172 
173  inline bool isProcessWideService(MessageLogger const*) { return true; }
174 
175  } // namespace service
176 
177 } // namespace edm
178 
179 #endif // FWCore_MessageService_MessageLogger_h
void preModuleStreamEndLumi(StreamContext const &, ModuleCallingContext const &)
void preModuleEvent(StreamContext const &, ModuleCallingContext const &)
std::vector< std::array< char, 64 > > transitionInfoCache_
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:98
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::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)