CMS 3D CMS Logo

StreamContext.h
Go to the documentation of this file.
1 #ifndef FWCore_ServiceRegistry_StreamContext_h
2 #define FWCore_ServiceRegistry_StreamContext_h
3 
15 //
16 // Original Author: W. David Dagenhart
17 // Created: 7/8/2013
18 
24 
25 #include <iosfwd>
26 #include <string_view>
27 
28 namespace edm {
29 
30  class ProcessContext;
31 
32  class StreamContext {
33  public:
34  enum class Transition {
36  kBeginRun,
38  kEvent,
40  kEndRun,
41  kEndStream,
42  kInvalid
43  };
44 
46 
49  EventID const& eventID,
50  RunIndex const& runIndex,
52  Timestamp const& timestamp,
54 
55  StreamID const& streamID() const { return streamID_; }
56  Transition transition() const { return transition_; }
57  bool isAtEndTransition() const {
59  }
60  EventID const& eventID() const { return eventID_; } // event#==0 is a lumi, event#==0&lumi#==0 is a run
61  RunIndex const& runIndex() const { return runIndex_; }
63  Timestamp const& timestamp() const { return timestamp_; }
64  ProcessContext const* processContext() const { return processContext_; }
65 
67  void setEventID(EventID const& v) { eventID_ = v; }
68  void setRunIndex(RunIndex const& v) { runIndex_ = v; }
70  void setTimestamp(Timestamp const& v) { timestamp_ = v; }
71 
72  private:
75  EventID eventID_; // event#==0 is a lumi, event#==0&lumi#==0 is a run
80  };
81 
82  void exceptionContext(std::ostream&, StreamContext const&);
83  std::ostream& operator<<(std::ostream&, StreamContext const&);
84 
85  std::string_view transitionName(StreamContext::Transition);
86 } // namespace edm
87 #endif
std::string_view transitionName(GlobalContext::Transition)
void setTimestamp(Timestamp const &v)
Definition: StreamContext.h:70
void exceptionContext(cms::Exception &, ESModuleCallingContext const &)
Timestamp const & timestamp() const
Definition: StreamContext.h:63
ProcessContext const * processContext_
Definition: StreamContext.h:79
void setTransition(Transition v)
Definition: StreamContext.h:66
void setLuminosityBlockIndex(LuminosityBlockIndex const &v)
Definition: StreamContext.h:69
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
StreamID const & streamID() const
Definition: StreamContext.h:55
StreamContext(StreamID const &streamID, ProcessContext const *processContext)
Definition: StreamContext.cc:9
Transition
Definition: Transition.h:12
ProcessContext const * processContext() const
Definition: StreamContext.h:64
Transition transition() const
Definition: StreamContext.h:56
bool isAtEndTransition() const
Definition: StreamContext.h:57
LuminosityBlockIndex const & luminosityBlockIndex() const
Definition: StreamContext.h:62
Timestamp timestamp_
Definition: StreamContext.h:78
void setEventID(EventID const &v)
Definition: StreamContext.h:67
HLT enums.
LuminosityBlockIndex luminosityBlockIndex_
Definition: StreamContext.h:77
EventID const & eventID() const
Definition: StreamContext.h:60
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger table.
void setRunIndex(RunIndex const &v)
Definition: StreamContext.h:68
RunIndex const & runIndex() const
Definition: StreamContext.h:61
Transition transition_
Definition: StreamContext.h:74