#include <DataFormats/Provenance/interface/RunAuxiliary.h>
Public Member Functions | |
Timestamp const & | beginTime () const |
Timestamp const & | endTime () const |
RunID const & | id () const |
bool | mergeAuxiliary (RunAuxiliary const &aux) |
ProcessHistoryID & | processHistoryID () const |
RunNumber_t | run () const |
RunAuxiliary (RunNumber_t const &run, Timestamp const &theTime, Timestamp const &theEndTime) | |
RunAuxiliary (RunID const &theId, Timestamp const &theTime, Timestamp const &theEndTime) | |
RunAuxiliary () | |
void | setEndTime (Timestamp const &time) |
void | write (std::ostream &os) const |
~RunAuxiliary () | |
Public Attributes | |
std::set< ProcessHistoryID > | allEventsProcessHistories_ |
Timestamp | beginTime_ |
Timestamp | endTime_ |
RunID | id_ |
ProcessHistoryID | processHistoryID_ |
Private Member Functions | |
void | mergeNewProcessHistoryIntoThis_ (RunAuxiliary const &newAux) |
void | mergeNewTimestampsIntoThis_ (RunAuxiliary const &newAux) |
Definition at line 15 of file RunAuxiliary.h.
edm::RunAuxiliary::RunAuxiliary | ( | ) | [inline] |
Definition at line 16 of file RunAuxiliary.h.
00016 : 00017 processHistoryID_(), 00018 allEventsProcessHistories_(), 00019 id_(), 00020 beginTime_(), 00021 endTime_() {} RunAuxiliary(RunID const& theId, Timestamp const& theTime, Timestamp const& theEndTime) :
edm::RunAuxiliary::RunAuxiliary | ( | RunID const & | theId, | |
Timestamp const & | theTime, | |||
Timestamp const & | theEndTime | |||
) | [inline] |
Definition at line 22 of file RunAuxiliary.h.
00022 : 00023 processHistoryID_(), 00024 allEventsProcessHistories_(), 00025 id_(theId), 00026 beginTime_(theTime), 00027 endTime_(theEndTime) {} RunAuxiliary(RunNumber_t const& run, Timestamp const& theTime, Timestamp const& theEndTime) :
edm::RunAuxiliary::RunAuxiliary | ( | RunNumber_t const & | run, | |
Timestamp const & | theTime, | |||
Timestamp const & | theEndTime | |||
) | [inline] |
Definition at line 28 of file RunAuxiliary.h.
00028 : 00029 processHistoryID_(), 00030 allEventsProcessHistories_(), 00031 id_(run), 00032 beginTime_(theTime), 00033 endTime_(theEndTime) {} ~RunAuxiliary() {}
edm::RunAuxiliary::~RunAuxiliary | ( | ) | [inline] |
Timestamp const& edm::RunAuxiliary::beginTime | ( | ) | const [inline] |
Definition at line 38 of file RunAuxiliary.h.
References beginTime_.
Referenced by edm::RunPrincipal::beginTime(), edm::Run::beginTime(), mergeNewTimestampsIntoThis_(), and edm::RootFile::readRun().
00038 {return beginTime_;}
Timestamp const& edm::RunAuxiliary::endTime | ( | ) | const [inline] |
Definition at line 39 of file RunAuxiliary.h.
References endTime_.
Referenced by edm::Run::endTime(), edm::RunPrincipal::endTime(), and mergeNewTimestampsIntoThis_().
00039 {return endTime_;}
Definition at line 37 of file RunAuxiliary.h.
References id_.
Referenced by edm::RunPrincipal::id(), edm::Run::id(), and mergeAuxiliary().
00037 {return id_;}
bool edm::RunAuxiliary::mergeAuxiliary | ( | RunAuxiliary const & | aux | ) |
Definition at line 18 of file RunAuxiliary.cc.
References id(), id_, mergeNewProcessHistoryIntoThis_(), and mergeNewTimestampsIntoThis_().
Referenced by edm::RunPrincipal::mergeRun().
00018 { 00019 00020 mergeNewTimestampsIntoThis_(newAux); 00021 mergeNewProcessHistoryIntoThis_(newAux); 00022 00023 // Keep the process history ID that is in the preexisting principal 00024 // It may have been updated to include the current process. 00025 // There is one strange other case where the two ProcessHistoryIDs 00026 // could be different which should not be important and we just ignore. 00027 // There could have been previous processes which only dropped products. 00028 // These processes could have dropped the same branches but had different 00029 // process names ... Ignore this. 00030 00031 return id_ == newAux.id(); 00032 // if (id_ != newAux.id()) return false; 00033 // return true; 00034 }
void edm::RunAuxiliary::mergeNewProcessHistoryIntoThis_ | ( | RunAuxiliary const & | newAux | ) | [private] |
Definition at line 56 of file RunAuxiliary.cc.
References allEventsProcessHistories_.
Referenced by mergeAuxiliary().
00057 { 00058 allEventsProcessHistories_.insert(newAux.allEventsProcessHistories_.begin(), 00059 newAux.allEventsProcessHistories_.end()); 00060 00061 }
void edm::RunAuxiliary::mergeNewTimestampsIntoThis_ | ( | RunAuxiliary const & | newAux | ) | [private] |
Definition at line 37 of file RunAuxiliary.cc.
References beginTime(), beginTime_, endTime(), endTime_, and edm::Timestamp::invalidTimestamp().
Referenced by mergeAuxiliary().
00037 { 00038 if (beginTime_ == Timestamp::invalidTimestamp() || 00039 newAux.beginTime() == Timestamp::invalidTimestamp()) { 00040 beginTime_ = Timestamp::invalidTimestamp(); 00041 } 00042 else if (newAux.beginTime() < beginTime_) { 00043 beginTime_ = newAux.beginTime(); 00044 } 00045 00046 if (endTime_ == Timestamp::invalidTimestamp() || 00047 newAux.endTime() == Timestamp::invalidTimestamp()) { 00048 endTime_ = Timestamp::invalidTimestamp(); 00049 } 00050 else if (newAux.endTime() > endTime_) { 00051 endTime_ = newAux.endTime(); 00052 } 00053 }
ProcessHistoryID& edm::RunAuxiliary::processHistoryID | ( | ) | const [inline] |
Definition at line 36 of file RunAuxiliary.h.
References processHistoryID_.
00036 {return processHistoryID_;}
RunNumber_t edm::RunAuxiliary::run | ( | ) | const [inline] |
Definition at line 40 of file RunAuxiliary.h.
References id_, and edm::RunID::run().
Referenced by edm::RootFile::fillFileIndex(), edm::RootFile::readRun(), edm::Run::run(), edm::RunPrincipal::run(), and edm::RootOutputFile::writeRun().
00040 {return id_.run();}
Definition at line 41 of file RunAuxiliary.h.
References endTime_, and edm::Timestamp::invalidTimestamp().
Referenced by edm::RunPrincipal::setEndTime().
00041 { 00042 if (endTime_ == Timestamp::invalidTimestamp()) endTime_ = time; 00043 }
void edm::RunAuxiliary::write | ( | std::ostream & | os | ) | const |
Definition at line 12 of file RunAuxiliary.cc.
References lat::endl(), id_, and processHistoryID_.
Referenced by edm::operator<<().
00012 { 00013 os << "Process History ID = " << processHistoryID_ << std::endl; 00014 os << id_ << std::endl; 00015 }
Definition at line 57 of file RunAuxiliary.h.
Referenced by beginTime(), edm::conversion(), mergeNewTimestampsIntoThis_(), and edm::RootFile::readRun().
Definition at line 58 of file RunAuxiliary.h.
Referenced by edm::conversion(), endTime(), mergeNewTimestampsIntoThis_(), edm::RootFile::readRun(), and setEndTime().
Definition at line 55 of file RunAuxiliary.h.
Referenced by edm::conversion(), id(), mergeAuxiliary(), edm::RootFile::readRun(), run(), and write().
Definition at line 48 of file RunAuxiliary.h.
Referenced by edm::RunPrincipal::aux(), edm::conversion(), processHistoryID(), edm::RootFile::readRun(), and write().