Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:32

0001 #include "DataFormats/Provenance/interface/LuminosityBlockAuxiliary.h"
0002 #include <cassert>
0003 #include <ostream>
0004 
0005 /*----------------------------------------------------------------------
0006 
0007 ----------------------------------------------------------------------*/
0008 
0009 namespace edm {
0010   void LuminosityBlockAuxiliary::write(std::ostream& os) const {
0011     os << "Process History ID = " << processHistoryID_ << std::endl;
0012     os << id_ << std::endl;
0013   }
0014 
0015   void LuminosityBlockAuxiliary::mergeAuxiliary(LuminosityBlockAuxiliary const& newAux) {
0016     assert(id_ == newAux.id_);
0017     if (beginTime_ == Timestamp::invalidTimestamp() || newAux.beginTime() == Timestamp::invalidTimestamp()) {
0018       beginTime_ = Timestamp::invalidTimestamp();
0019     } else if (newAux.beginTime() < beginTime_) {
0020       beginTime_ = newAux.beginTime();
0021     }
0022 
0023     if (endTime_ == Timestamp::invalidTimestamp() || newAux.endTime() == Timestamp::invalidTimestamp()) {
0024       endTime_ = Timestamp::invalidTimestamp();
0025     } else if (newAux.endTime() > endTime_) {
0026       endTime_ = newAux.endTime();
0027     }
0028   }
0029 }  // namespace edm