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  public:
33  enum class Transition {
35  kBeginRun,
37  kEvent,
39  kEndRun,
40  kEndStream,
41  kInvalid
42  };
43 
45 
48  EventID const& eventID,
49  RunIndex const& runIndex,
51  Timestamp const& timestamp,
53 
54  StreamID const& streamID() const { return streamID_; }
55  Transition transition() const { return transition_; }
56  bool isAtEndTransition() const {
58  }
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  void exceptionContext(std::ostream&, StreamContext const&);
82  std::ostream& operator<<(std::ostream&, StreamContext const&);
83 } // namespace edm
84 #endif
void setTimestamp(Timestamp const &v)
Definition: StreamContext.h:69
void exceptionContext(cms::Exception &, ESModuleCallingContext const &)
Timestamp const & timestamp() const
Definition: StreamContext.h:62
ProcessContext const * processContext_
Definition: StreamContext.h:78
void setTransition(Transition v)
Definition: StreamContext.h:65
void setLuminosityBlockIndex(LuminosityBlockIndex const &v)
Definition: StreamContext.h:68
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:54
StreamContext(StreamID const &streamID, ProcessContext const *processContext)
Definition: StreamContext.cc:9
Transition
Definition: Transition.h:12
ProcessContext const * processContext() const
Definition: StreamContext.h:63
Transition transition() const
Definition: StreamContext.h:55
bool isAtEndTransition() const
Definition: StreamContext.h:56
LuminosityBlockIndex const & luminosityBlockIndex() const
Definition: StreamContext.h:61
Timestamp timestamp_
Definition: StreamContext.h:77
void setEventID(EventID const &v)
Definition: StreamContext.h:66
HLT enums.
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
RunIndex const & runIndex() const
Definition: StreamContext.h:60
Transition transition_
Definition: StreamContext.h:73