CMS 3D CMS Logo

LuminosityBlockAuxiliary.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_LuminosityBlockAuxiliary_h
2 #define DataFormats_Provenance_LuminosityBlockAuxiliary_h
3 
4 #include <iosfwd>
5 
10 
11 // Auxiliary luminosity block data that is persistent
12 
13 namespace edm {
14  class LuminosityBlockAux;
16  public:
20  id_(),
21  beginTime_(),
22  endTime_() {}
24  Timestamp const& theTime,
25  Timestamp const& theEndTime) :
27  id_(theId),
28  beginTime_(theTime),
29  endTime_(theEndTime) {}
31  LuminosityBlockNumber_t const& theLumi,
32  Timestamp const& theTime,
33  Timestamp const& theEndTime) :
35  id_(theRun, theLumi),
36  beginTime_(theTime),
37  endTime_(theEndTime) {}
39  void write(std::ostream& os) const;
43  RunNumber_t run() const {return id().run();}
44  LuminosityBlockID const& id() const {return id_;}
45  LuminosityBlockID& id() {return id_;}
46  Timestamp const& beginTime() const {return beginTime_;}
47  void setBeginTime(Timestamp const& time) {
49  }
50  Timestamp const& endTime() const {return endTime_;}
51  void setEndTime(Timestamp const& time) {
53  }
54  void mergeAuxiliary(LuminosityBlockAuxiliary const& newAux);
55 
56  bool sameIdentity(LuminosityBlockAuxiliary const& iRHS) const {
57  return iRHS.processHistoryID_ == processHistoryID_ &&
58  iRHS.id_ == id_;
59  }
60  private:
61  // This is the ID of the full process history (not the reduced process history).
62  // In cases where LuminosityBlock's are merged, the ID of the first process history encountered
63  // is stored here.
65  // LuminosityBlock ID
67  // Times from DAQ
70  };
71 
72  inline
73  std::ostream&
74  operator<<(std::ostream& os, const LuminosityBlockAuxiliary& p) {
75  p.write(os);
76  return os;
77  }
78 
79 }
80 #endif
static Timestamp invalidTimestamp()
Definition: Timestamp.h:101
ProcessHistoryID const & processHistoryID() const
void setEndTime(Timestamp const &time)
LuminosityBlockAuxiliary(LuminosityBlockID const &theId, Timestamp const &theTime, Timestamp const &theEndTime)
void write(std::ostream &os) const
void setBeginTime(Timestamp const &time)
unsigned int LuminosityBlockNumber_t
friend void conversion(LuminosityBlockAux const &, LuminosityBlockAuxiliary &)
void mergeAuxiliary(LuminosityBlockAuxiliary const &newAux)
RunNumber_t run() const
Timestamp const & endTime() const
Timestamp const & beginTime() const
void setProcessHistoryID(ProcessHistoryID const &phid)
LuminosityBlockNumber_t luminosityBlock() const
LuminosityBlockNumber_t luminosityBlock() const
HLT enums.
LuminosityBlockAuxiliary(RunNumber_t const &theRun, LuminosityBlockNumber_t const &theLumi, Timestamp const &theTime, Timestamp const &theEndTime)
unsigned int RunNumber_t
bool sameIdentity(LuminosityBlockAuxiliary const &iRHS) const
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
LuminosityBlockID const & id() const