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 
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 
49  StreamContext(StreamID const& streamID,
51  EventID const& eventID,
52  RunIndex const& runIndex,
54  Timestamp const & timestamp,
55  ProcessContext const* processContext);
56 
57  StreamID const& streamID() const { return streamID_; }
58  Transition transition() const { return transition_; }
59  bool isAtEndTransition() const {
62  }
63  EventID const& eventID() const { return eventID_; } // event#==0 is a lumi, event#==0&lumi#==0 is a run
64  RunIndex const& runIndex() const { return runIndex_; }
66  Timestamp const& timestamp() const { return timestamp_; }
67  ProcessContext const* processContext() const { return processContext_; }
68 
70  void setEventID(EventID const& v) { eventID_ = v; }
71  void setRunIndex(RunIndex const& v) { runIndex_ = v; }
73  void setTimestamp(Timestamp const& v) { timestamp_ = v; }
74 
75  private:
78  EventID eventID_; // event#==0 is a lumi, event#==0&lumi#==0 is a run
83  };
84 
85  void exceptionContext(std::ostream&, StreamContext const&);
86  std::ostream& operator<<(std::ostream&, StreamContext const&);
87 }
88 #endif
LuminosityBlockIndex const & luminosityBlockIndex() const
Definition: StreamContext.h:65
void setTimestamp(Timestamp const &v)
Definition: StreamContext.h:73
ProcessContext const * processContext_
Definition: StreamContext.h:82
RunIndex const & runIndex() const
Definition: StreamContext.h:64
void exceptionContext(std::ostream &, GlobalContext const &)
void setTransition(Transition v)
Definition: StreamContext.h:69
Transition transition() const
Definition: StreamContext.h:58
void setLuminosityBlockIndex(LuminosityBlockIndex const &v)
Definition: StreamContext.h:72
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
StreamContext(StreamID const &streamID, ProcessContext const *processContext)
Definition: StreamContext.cc:9
bool isAtEndTransition() const
Definition: StreamContext.h:59
ProcessContext const * processContext() const
Definition: StreamContext.h:67
StreamID const & streamID() const
Definition: StreamContext.h:57
Timestamp timestamp_
Definition: StreamContext.h:81
void setEventID(EventID const &v)
Definition: StreamContext.h:70
HLT enums.
LuminosityBlockIndex luminosityBlockIndex_
Definition: StreamContext.h:80
EventID const & eventID() const
Definition: StreamContext.h:63
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
void setRunIndex(RunIndex const &v)
Definition: StreamContext.h:71
Transition transition_
Definition: StreamContext.h:77
Timestamp const & timestamp() const
Definition: StreamContext.h:66