00001 #include "DataFormats/Provenance/interface/LuminosityBlockAuxiliary.h" 00002 #include <cassert> 00003 #include <ostream> 00004 00005 /*---------------------------------------------------------------------- 00006 00007 ----------------------------------------------------------------------*/ 00008 00009 namespace edm { 00010 void 00011 LuminosityBlockAuxiliary::write(std::ostream& os) const { 00012 os << "Process History ID = " << processHistoryID_ << std::endl; 00013 os << id_ << std::endl; 00014 } 00015 00016 void 00017 LuminosityBlockAuxiliary::mergeAuxiliary(LuminosityBlockAuxiliary const& newAux) { 00018 assert(id_ == newAux.id_); 00019 if (beginTime_ == Timestamp::invalidTimestamp() || 00020 newAux.beginTime() == Timestamp::invalidTimestamp()) { 00021 beginTime_ = Timestamp::invalidTimestamp(); 00022 } 00023 else if (newAux.beginTime() < beginTime_) { 00024 beginTime_ = newAux.beginTime(); 00025 } 00026 00027 if (endTime_ == Timestamp::invalidTimestamp() || 00028 newAux.endTime() == Timestamp::invalidTimestamp()) { 00029 endTime_ = Timestamp::invalidTimestamp(); 00030 } 00031 else if (newAux.endTime() > endTime_) { 00032 endTime_ = newAux.endTime(); 00033 } 00034 } 00035 }