CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/DataFormats/Provenance/src/LuminosityBlockAuxiliary.cc

Go to the documentation of this file.
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     assert(processHistoryID_ == newAux.processHistoryID_);
00020     if (beginTime_ == Timestamp::invalidTimestamp() ||
00021         newAux.beginTime() == Timestamp::invalidTimestamp()) {
00022       beginTime_ = Timestamp::invalidTimestamp();
00023     }
00024     else if (newAux.beginTime() < beginTime_) {
00025       beginTime_ = newAux.beginTime();
00026     }
00027    
00028     if (endTime_ == Timestamp::invalidTimestamp() ||
00029         newAux.endTime() == Timestamp::invalidTimestamp()) {
00030       endTime_ = Timestamp::invalidTimestamp();
00031     }
00032     else if (newAux.endTime() > endTime_) {
00033       endTime_ = newAux.endTime();
00034     }
00035 
00036   }
00037 }