CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
27 namespace edm {
28 
29  class ProcessContext;
30 
31  class StreamContext {
32 
33  public:
34 
35  enum class Transition {
37  kBeginRun,
39  kEvent,
41  kEndRun,
42  kEndStream,
43  kInvalid
44  };
45 
48 
51  EventID const& eventID,
52  RunIndex const& runIndex,
54  Timestamp const & timestamp,
56 
57  StreamID const& streamID() const { return streamID_; }
58  Transition transition() const { return transition_; }
59  EventID const& eventID() const { return eventID_; } // event#==0 is a lumi, event#==0&lumi#==0 is a run
60  RunIndex const& runIndex() const { return runIndex_; }
62  Timestamp const& timestamp() const { return timestamp_; }
63  ProcessContext const* processContext() const { return processContext_; }
64 
66  void setEventID(EventID const& v) { eventID_ = v; }
67  void setRunIndex(RunIndex const& v) { runIndex_ = v; }
69  void setTimestamp(Timestamp const& v) { timestamp_ = v; }
70 
71  private:
74  EventID eventID_; // event#==0 is a lumi, event#==0&lumi#==0 is a run
79  };
80 
81  std::ostream& operator<<(std::ostream&, StreamContext const&);
82 }
83 #endif
LuminosityBlockIndex const & luminosityBlockIndex() const
Definition: StreamContext.h:61
void setTimestamp(Timestamp const &v)
Definition: StreamContext.h:69
ProcessContext const * processContext_
Definition: StreamContext.h:78
RunIndex const & runIndex() const
Definition: StreamContext.h:60
void setTransition(Transition v)
Definition: StreamContext.h:65
Transition transition() const
Definition: StreamContext.h:58
void setLuminosityBlockIndex(LuminosityBlockIndex const &v)
Definition: StreamContext.h:68
StreamContext(StreamID const &streamID, ProcessContext const *processContext)
Definition: StreamContext.cc:8
ProcessContext const * processContext() const
Definition: StreamContext.h:63
StreamID const & streamID() const
Definition: StreamContext.h:57
Timestamp timestamp_
Definition: StreamContext.h:77
void setEventID(EventID const &v)
Definition: StreamContext.h:66
LuminosityBlockIndex luminosityBlockIndex_
Definition: StreamContext.h:76
EventID const & eventID() const
Definition: StreamContext.h:59
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
void setRunIndex(RunIndex const &v)
Definition: StreamContext.h:67
Transition transition_
Definition: StreamContext.h:73
Timestamp const & timestamp() const
Definition: StreamContext.h:62