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 
49 public:
51 
52  void fillErrorObj(edm::ErrorObj& obj) const;
53  bool debugEnabled() const { return debugEnabled_; }
54 
55  static
56  bool anyDebugEnabled() { return anyDebugEnabled_; }
57 
58  static
59  void SummarizeInJobReport();
60 
61 private:
62 
63  void postBeginJob();
64  void postEndJob();
65  void jobFailure();
66 
67  void preSourceEvent ( StreamID );
68  void postSourceEvent ( StreamID );
69  void preSourceRunLumi ();
70  void postSourceRunLumi ();
71 
72  void preFile ( std::string const&, bool );
73  void preFileClose ( std::string const&, bool );
74  void postFile ( std::string const&, bool );
75 
78 
81 
82  void preModuleEvent ( StreamContext const&, ModuleCallingContext const& );
83  void postModuleEvent( StreamContext const&, ModuleCallingContext const& );
84 
87 
88  void preModuleBeginJob ( ModuleDescription const & );
89  void postModuleBeginJob ( ModuleDescription const & );
90  void preModuleEndJob ( ModuleDescription const & );
91  void postModuleEndJob ( ModuleDescription const & );
92 
97 
102 
107 
108  void preEvent ( StreamContext const& );
109  void postEvent( StreamContext const& );
110 
111  void preStreamBeginRun ( StreamContext const& );
112  void postStreamBeginRun ( StreamContext const& );
113  void preStreamEndRun ( StreamContext const& );
114  void postStreamEndRun ( StreamContext const& );
115  void preStreamBeginLumi ( StreamContext const& );
116  void postStreamBeginLumi ( StreamContext const& );
117  void preStreamEndLumi ( StreamContext const& );
118  void postStreamEndLumi ( StreamContext const& );
119 
124 
129 
130  void preGlobalBeginRun ( GlobalContext const& );
131  void postGlobalBeginRun ( GlobalContext const& );
132  void preGlobalEndRun ( GlobalContext const& );
133  void postGlobalEndRun ( GlobalContext const& );
134  void preGlobalBeginLumi ( GlobalContext const& );
135  void postGlobalBeginLumi ( GlobalContext const& );
136  void preGlobalEndLumi ( GlobalContext const& );
137  void postGlobalEndLumi ( GlobalContext const& );
138 
139  void prePathEvent ( StreamContext const&, PathContext const& );
140  void postPathEvent ( StreamContext const&, PathContext const&, HLTPathStatus const&);
141 
142  // set up the module name in the message drop, and the enable/suppress info
143  void establishModule ( const ModuleDescription& desc,
144  const char* whichPhase );
145  void unEstablishModule ( const ModuleDescription& desc,
146  const char* whichPhase );
147  void establishModule (unsigned int transitionIndex,
148  const ModuleCallingContext& context,
149  const char* whichPhase );
150  void unEstablishModule (const ModuleCallingContext& desc,
151  const char* whichPhase );
152  void establish ( const char* whichPhase );
153  void unEstablish ( const char* whichPhase );
154 
155  //Cache string description for each active transition
156  // stream info is first in the container
157  // concurrent lumi info is next
158  // concurrent run info is last
159  std::vector<std::string> transitionInfoCache_;
160  unsigned int lumiInfoBegin_=0;
161  unsigned int runInfoBegin_=0;
162 
163  std::set<std::string> debugEnabledModules_;
164  std::map<std::string,ELseverityLevel> suppression_levels_;
168 
172 
177 
178 }; // MessageLogger
179 
180  inline
182  return true;
183  }
184 
185 } // namespace service
186 
187 } // namespace edm
188 
189 
190 
191 #endif // FWCore_MessageService_MessageLogger_h
192 
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::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_
std::map< std::string, ELseverityLevel > suppression_levels_
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)