LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
art::RunAuxiliary Class Reference

#include "RunAuxiliary.h"

Public Member Functions

 RunAuxiliary ()=default
 
 RunAuxiliary (RunID const &theId, Timestamp const &theTime, Timestamp const &theEndTime)
 
 RunAuxiliary (RunNumber_t const run, Timestamp const &theTime, Timestamp const &theEndTime)
 
void write (std::ostream &os) const
 
ProcessHistoryID const & processHistoryID () const
 
void setProcessHistoryID (ProcessHistoryID const &phid) const
 
RunID const & id () const
 
Timestamp const & beginTime () const
 
Timestamp const & endTime () const
 
RunID const & runID () const
 
RunNumber_t run () const
 
void setEndTime (Timestamp const &time)
 
void setRangeSetID (unsigned const id) const
 
auto rangeSetID () const
 
bool mergeAuxiliary (RunAuxiliary const &aux)
 

Public Attributes

ProcessHistoryID processHistoryID_ {}
 
std::set< ProcessHistoryIDallEventsProcessHistories_ {}
 
unsigned rangeSetID_ {-1u}
 
RunID id_ {}
 
Timestamp beginTime_ {}
 
Timestamp endTime_ {}
 

Static Public Attributes

static constexpr BranchType branch_type = InRun
 

Private Member Functions

void mergeNewTimestampsIntoThis_ (RunAuxiliary const &newAux)
 
void mergeNewProcessHistoryIntoThis_ (RunAuxiliary const &newAux)
 

Detailed Description

Definition at line 18 of file RunAuxiliary.h.

Constructor & Destructor Documentation

art::RunAuxiliary::RunAuxiliary ( )
default
art::RunAuxiliary::RunAuxiliary ( RunID const &  theId,
Timestamp const &  theTime,
Timestamp const &  theEndTime 
)
inline

Definition at line 24 of file RunAuxiliary.h.

References beginTime_, and endTime_.

27  : id_{theId}, beginTime_{theTime}, endTime_{theEndTime}
28  {}
Timestamp beginTime_
Definition: RunAuxiliary.h:111
Timestamp endTime_
Definition: RunAuxiliary.h:112
art::RunAuxiliary::RunAuxiliary ( RunNumber_t const  run,
Timestamp const &  theTime,
Timestamp const &  theEndTime 
)
inline

Definition at line 30 of file RunAuxiliary.h.

References beginTime_, endTime_, and write().

33  : id_{run}, beginTime_{theTime}, endTime_{theEndTime}
34  {}
RunNumber_t run() const
Definition: RunAuxiliary.h:74
Timestamp beginTime_
Definition: RunAuxiliary.h:111
Timestamp endTime_
Definition: RunAuxiliary.h:112

Member Function Documentation

Timestamp const& art::RunAuxiliary::beginTime ( ) const
inline

Definition at line 57 of file RunAuxiliary.h.

References beginTime_.

Referenced by art::Run::beginTime(), art::RunPrincipal::beginTime(), and mergeNewTimestampsIntoThis_().

58  {
59  return beginTime_;
60  }
Timestamp beginTime_
Definition: RunAuxiliary.h:111
Timestamp const& art::RunAuxiliary::endTime ( ) const
inline

Definition at line 63 of file RunAuxiliary.h.

References endTime_.

Referenced by art::Run::endTime(), art::RunPrincipal::endTime(), and mergeNewTimestampsIntoThis_().

64  {
65  return endTime_;
66  }
Timestamp endTime_
Definition: RunAuxiliary.h:112
RunID const& art::RunAuxiliary::id ( ) const
inline

Definition at line 51 of file RunAuxiliary.h.

References id_.

Referenced by art::Run::id(), art::RunPrincipal::id(), mergeAuxiliary(), setRangeSetID(), and art::RootOutputFile::writeRun().

52  {
53  return id_;
54  }
bool art::RunAuxiliary::mergeAuxiliary ( RunAuxiliary const &  aux)

Definition at line 12 of file RunAuxiliary.cc.

References id(), id_, mergeNewProcessHistoryIntoThis_(), and mergeNewTimestampsIntoThis_().

Referenced by rangeSetID().

13 {
14 
17 
18  // Keep the process history ID that is in the preexisting principal
19  // It may have been updated to include the current process.
20  // There is one strange other case where the two ProcessHistoryIDs
21  // could be different which should not be important and we just ignore.
22  // There could have been previous processes which only dropped products.
23  // These processes could have dropped the same branches but had different
24  // process names ... Ignore this.
25 
26  return id_ == newAux.id();
27  // if (id_ != newAux.id()) return false;
28  // return true;
29 }
void mergeNewTimestampsIntoThis_(RunAuxiliary const &newAux)
Definition: RunAuxiliary.cc:32
void mergeNewProcessHistoryIntoThis_(RunAuxiliary const &newAux)
Definition: RunAuxiliary.cc:50
void art::RunAuxiliary::mergeNewProcessHistoryIntoThis_ ( RunAuxiliary const &  newAux)
private

Definition at line 50 of file RunAuxiliary.cc.

References allEventsProcessHistories_.

Referenced by mergeAuxiliary().

51 {
52  allEventsProcessHistories_.insert(newAux.allEventsProcessHistories_.begin(),
53  newAux.allEventsProcessHistories_.end());
54 }
std::set< ProcessHistoryID > allEventsProcessHistories_
Definition: RunAuxiliary.h:105
void art::RunAuxiliary::mergeNewTimestampsIntoThis_ ( RunAuxiliary const &  newAux)
private

Definition at line 32 of file RunAuxiliary.cc.

References beginTime(), beginTime_, endTime(), endTime_, and art::Timestamp::invalidTimestamp().

Referenced by mergeAuxiliary().

33 {
35  newAux.beginTime() == Timestamp::invalidTimestamp()) {
37  } else if (newAux.beginTime() < beginTime_) {
38  beginTime_ = newAux.beginTime();
39  }
40 
42  newAux.endTime() == Timestamp::invalidTimestamp()) {
44  } else if (newAux.endTime() > endTime_) {
45  endTime_ = newAux.endTime();
46  }
47 }
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:83
Timestamp beginTime_
Definition: RunAuxiliary.h:111
Timestamp endTime_
Definition: RunAuxiliary.h:112
ProcessHistoryID const& art::RunAuxiliary::processHistoryID ( ) const
inline

Definition at line 39 of file RunAuxiliary.h.

References processHistoryID_.

40  {
41  return processHistoryID_;
42  }
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:101
auto art::RunAuxiliary::rangeSetID ( ) const
inline

Definition at line 92 of file RunAuxiliary.h.

References mergeAuxiliary(), and rangeSetID_.

93  {
94  return rangeSetID_;
95  }
unsigned rangeSetID_
Definition: RunAuxiliary.h:107
RunNumber_t art::RunAuxiliary::run ( ) const
inline

Definition at line 74 of file RunAuxiliary.h.

References id_, and art::RunID::run().

Referenced by art::Run::run(), and art::RunPrincipal::run().

75  {
76  return id_.run();
77  }
RunNumber_t run() const
Definition: RunID.h:63
RunID const& art::RunAuxiliary::runID ( ) const
inline

Definition at line 69 of file RunAuxiliary.h.

References id_.

70  {
71  return id_;
72  }
void art::RunAuxiliary::setEndTime ( Timestamp const &  time)
inline

Definition at line 80 of file RunAuxiliary.h.

References endTime_, and art::Timestamp::invalidTimestamp().

Referenced by art::RunPrincipal::setEndTime().

81  {
83  endTime_ = time;
84  }
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:83
Timestamp endTime_
Definition: RunAuxiliary.h:112
void art::RunAuxiliary::setProcessHistoryID ( ProcessHistoryID const &  phid) const
inline

Definition at line 45 of file RunAuxiliary.h.

References processHistoryID_.

Referenced by art::RunPrincipal::setProcessHistoryID().

46  {
47  processHistoryID_ = phid;
48  }
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:101
void art::RunAuxiliary::setRangeSetID ( unsigned const  id) const
inline

Definition at line 87 of file RunAuxiliary.h.

References id(), and rangeSetID_.

Referenced by art::RootOutputFile::writeRun().

88  {
89  rangeSetID_ = id;
90  }
RunID const & id() const
Definition: RunAuxiliary.h:51
unsigned rangeSetID_
Definition: RunAuxiliary.h:107
void art::RunAuxiliary::write ( std::ostream &  os) const

Definition at line 5 of file RunAuxiliary.cc.

References id_, and processHistoryID_.

Referenced by operator<<(), and RunAuxiliary().

6 {
7  os << "Process History ID = " << processHistoryID_ << std::endl;
8  os << id_ << std::endl;
9 }
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:101

Member Data Documentation

std::set<ProcessHistoryID> art::RunAuxiliary::allEventsProcessHistories_ {}

Definition at line 105 of file RunAuxiliary.h.

Referenced by mergeNewProcessHistoryIntoThis_().

Timestamp art::RunAuxiliary::beginTime_ {}

Definition at line 111 of file RunAuxiliary.h.

Referenced by beginTime(), mergeNewTimestampsIntoThis_(), and RunAuxiliary().

constexpr BranchType art::RunAuxiliary::branch_type = InRun
static

Definition at line 20 of file RunAuxiliary.h.

Timestamp art::RunAuxiliary::endTime_ {}

Definition at line 112 of file RunAuxiliary.h.

Referenced by endTime(), mergeNewTimestampsIntoThis_(), RunAuxiliary(), and setEndTime().

RunID art::RunAuxiliary::id_ {}

Definition at line 109 of file RunAuxiliary.h.

Referenced by id(), mergeAuxiliary(), run(), runID(), and write().

ProcessHistoryID art::RunAuxiliary::processHistoryID_ {}
mutable
unsigned art::RunAuxiliary::rangeSetID_ {-1u}
mutable

Definition at line 107 of file RunAuxiliary.h.

Referenced by rangeSetID(), and setRangeSetID().


The documentation for this class was generated from the following files: