CMS 3D CMS Logo

GlobalContext.h
Go to the documentation of this file.
1 #ifndef FWCore_ServiceRegistry_GlobalContext_h
2 #define FWCore_ServiceRegistry_GlobalContext_h
3 
14 //
15 // Original Author: W. David Dagenhart
16 // Created: 7/10/2013
17 
22 
23 #include <iosfwd>
24 #include <string_view>
25 
26 namespace cms {
27  class Exception;
28 }
29 
30 namespace edm {
31 
32  class ProcessContext;
33 
34  class GlobalContext {
35  public:
36  enum class Transition {
37  kBeginJob,
40  kBeginRun,
43  kEndRun,
45  kEndJob,
47  kWriteRun,
49  };
50 
53  RunIndex const& runIndex,
55  Timestamp const& timestamp,
58 
59  Transition transition() const { return transition_; }
60  bool isAtEndTransition() const {
64  }
65 
67  RunIndex const& runIndex() const { return runIndex_; }
69  Timestamp const& timestamp() const { return timestamp_; }
70  ProcessContext const* processContext() const { return processContext_; }
71 
72  private:
79  };
80 
81  void exceptionContext(std::ostream&, GlobalContext const&);
82  std::ostream& operator<<(std::ostream&, GlobalContext const&);
83  void exceptionContext(cms::Exception&, GlobalContext const&, char const* context);
84 
85  std::string_view transitionName(GlobalContext::Transition);
86 } // namespace edm
87 #endif
std::string_view transitionName(GlobalContext::Transition)
void exceptionContext(cms::Exception &, ESModuleCallingContext const &)
ProcessContext const * processContext_
Definition: GlobalContext.h:78
Transition transition_
Definition: GlobalContext.h:73
LuminosityBlockID luminosityBlockID_
Definition: GlobalContext.h:74
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
Transition
Definition: Transition.h:12
GlobalContext(Transition transition, LuminosityBlockID const &luminosityBlockID, RunIndex const &runIndex, LuminosityBlockIndex const &luminosityBlockIndex, Timestamp const &timestamp, ProcessContext const *processContext)
LuminosityBlockIndex const & luminosityBlockIndex() const
Definition: GlobalContext.h:68
LuminosityBlockIndex luminosityBlockIndex_
Definition: GlobalContext.h:76
ProcessContext const * processContext() const
Definition: GlobalContext.h:70
LuminosityBlockID const & luminosityBlockID() const
Definition: GlobalContext.h:66
Timestamp const & timestamp() const
Definition: GlobalContext.h:69
Namespace of DDCMS conversion namespace.
bool isAtEndTransition() const
Definition: GlobalContext.h:60
Timestamp timestamp_
Definition: GlobalContext.h:77
Transition transition() const
Definition: GlobalContext.h:59
RunIndex const & runIndex() const
Definition: GlobalContext.h:67
HLT enums.
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger table.