CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GlobalContext.cc
Go to the documentation of this file.
3 
4 #include <ostream>
5 
6 namespace edm {
7 
9  LuminosityBlockID const& luminosityBlockID,
10  RunIndex const& runIndex,
11  LuminosityBlockIndex const& luminosityBlockIndex,
12  Timestamp const & timestamp,
13  ProcessContext const* processContext) :
14  transition_(transition),
15  luminosityBlockID_(luminosityBlockID),
16  runIndex_(runIndex),
17  luminosityBlockIndex_(luminosityBlockIndex),
18  timestamp_(timestamp),
19  processContext_(processContext) {
20  }
21 
22  std::ostream& operator<<(std::ostream& os, GlobalContext const& gc) {
23  os << "GlobalContext: transition = ";
24  switch (gc.transition()) {
26  os << "BeginJob";
27  break;
29  os << "BeginRun";
30  break;
32  os << "BeginLuminosityBlock";
33  break;
35  os << "EndLuminosityBlock";
36  break;
38  os << "EndRun";
39  break;
41  os << "EndJob";
42  break;
44  os << "WriteRun";
45  break;
47  os << "WriteLuminosityBlock";
48  break;
49  }
50  os << "\n " << gc.luminosityBlockID()
51  << "\n runIndex = " << gc.runIndex().value()
52  << " luminosityBlockIndex = " << gc.luminosityBlockIndex().value()
53  << " unixTime = " << gc.timestamp().unixTime()
54  << " microsecondOffset = " << gc.timestamp().microsecondOffset() <<"\n";
55  if(gc.processContext()) {
56  os << " " << *gc.processContext();
57  }
58  return os;
59  }
60 }
LuminosityBlockID const & luminosityBlockID() const
Definition: GlobalContext.h:52
unsigned int value() const
Definition: RunIndex.h:50
unsigned int microsecondOffset() const
Microseconds offset within second.
Definition: Timestamp.h:52
Timestamp const & timestamp() const
Definition: GlobalContext.h:55
RunIndex const & runIndex() const
Definition: GlobalContext.h:53
LuminosityBlockIndex const & luminosityBlockIndex() const
Definition: GlobalContext.h:54
unsigned int value() const
unsigned int unixTime() const
Time in seconds since January 1, 1970.
Definition: Timestamp.h:46
GlobalContext(Transition transition, LuminosityBlockID const &luminosityBlockID, RunIndex const &runIndex, LuminosityBlockIndex const &luminosityBlockIndex, Timestamp const &timestamp, ProcessContext const *processContext)
Definition: GlobalContext.cc:8
ProcessContext const * processContext() const
Definition: GlobalContext.h:56
Transition transition() const
Definition: GlobalContext.h:51
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.