CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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:
19  LuminosityBlockAuxiliary(LuminosityBlockID const& theId, Timestamp const& theTime, Timestamp const& theEndTime)
20  : processHistoryID_(), id_(theId), beginTime_(theTime), endTime_(theEndTime) {}
23  Timestamp const& theTime,
24  Timestamp const& theEndTime)
25  : processHistoryID_(), id_(theRun, theLumi), beginTime_(theTime), endTime_(theEndTime) {}
31  void write(std::ostream& os) const;
35  RunNumber_t run() const { return id().run(); }
36  LuminosityBlockID const& id() const { return id_; }
37  LuminosityBlockID& id() { return id_; }
38  Timestamp const& beginTime() const { return beginTime_; }
39  void setBeginTime(Timestamp const& time) {
41  beginTime_ = time;
42  }
43  Timestamp const& endTime() const { return endTime_; }
44  void setEndTime(Timestamp const& time) {
46  endTime_ = time;
47  }
48  void mergeAuxiliary(LuminosityBlockAuxiliary const& newAux);
49 
50  bool sameIdentity(LuminosityBlockAuxiliary const& iRHS) const {
51  return iRHS.processHistoryID_ == processHistoryID_ && iRHS.id_ == id_;
52  }
53 
54  private:
55  // This is the ID of the full process history (not the reduced process history).
56  // In cases where LuminosityBlock's are merged, the ID of the first process history encountered
57  // is stored here.
59  // LuminosityBlock ID
61  // Times from DAQ
64  };
65 
66  inline std::ostream& operator<<(std::ostream& os, const LuminosityBlockAuxiliary& p) {
67  p.write(os);
68  return os;
69  }
70 
71 } // namespace edm
72 #endif
static Timestamp invalidTimestamp()
Definition: Timestamp.h:82
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 &)
LuminosityBlockAuxiliary & operator=(LuminosityBlockAuxiliary &&)=default
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
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