LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::SubRunAuxiliary Class Reference

#include "SubRunAuxiliary.h"

Public Member Functions

 SubRunAuxiliary ()
 
 SubRunAuxiliary (SubRunID const &theId, Timestamp beginTime, Timestamp endTime)
 
 SubRunAuxiliary (RunNumber_t run, SubRunNumber_t subrun, Timestamp beginTime, Timestamp endTime)
 
SubRunAuxiliary duplicateWith (Timestamp beginTime, Timestamp endTime={}) const
 
void write (std::ostream &os) const
 
ProcessHistoryID const & processHistoryID () const noexcept
 
void setProcessHistoryID (ProcessHistoryID const &phid)
 
SubRunID const & id () const noexcept
 
SubRunID const & subRunID () const noexcept
 
RunID const & runID () const noexcept
 
RunNumber_t run () const noexcept
 
SubRunNumber_t subRun () const noexcept
 
Timestamp const & beginTime () const noexcept
 
Timestamp const & endTime () const noexcept
 
void setRangeSetID (unsigned const id) const
 
unsigned rangeSetID () const noexcept
 
bool mergeAuxiliary (SubRunAuxiliary const &)
 

Static Public Attributes

static constexpr BranchType branch_type = InSubRun
 

Private Member Functions

 SubRunAuxiliary (SubRunID const &id, Timestamp beginTime, Timestamp endTime, ProcessHistoryID processHistoryID, unsigned rangeSetID)
 

Private Attributes

ProcessHistoryID processHistoryID_ {}
 
unsigned rangeSetID_ {-1u}
 
SubRunID id_ {}
 
Timestamp beginTime_ {}
 
Timestamp endTime_ {}
 

Detailed Description

Definition at line 17 of file SubRunAuxiliary.h.

Constructor & Destructor Documentation

art::SubRunAuxiliary::SubRunAuxiliary ( )
default
art::SubRunAuxiliary::SubRunAuxiliary ( SubRunID const &  theId,
Timestamp  beginTime,
Timestamp  endTime 
)

Definition at line 13 of file SubRunAuxiliary.cc.

References beginTime_, and endTime_.

16  : id_{theId}, beginTime_{theTime}, endTime_{theEndTime}
17  {}
art::SubRunAuxiliary::SubRunAuxiliary ( RunNumber_t  run,
SubRunNumber_t  subrun,
Timestamp  beginTime,
Timestamp  endTime 
)

Definition at line 19 of file SubRunAuxiliary.cc.

23  : SubRunAuxiliary{SubRunID{theRun, theSubRun}, theTime, theEndTime}
24  {}
art::SubRunAuxiliary::SubRunAuxiliary ( SubRunID const &  id,
Timestamp  beginTime,
Timestamp  endTime,
ProcessHistoryID  processHistoryID,
unsigned  rangeSetID 
)
private

Definition at line 27 of file SubRunAuxiliary.cc.

References beginTime(), beginTime_, endTime(), endTime_, id_, rangeSetID(), and rangeSetID_.

34  , id_{id}
36  , endTime_{endTime}
37  {}
ProcessHistoryID processHistoryID_
unsigned rangeSetID() const noexcept
Timestamp const & endTime() const noexcept
ProcessHistoryID const & processHistoryID() const noexcept
Timestamp const & beginTime() const noexcept

Member Function Documentation

Timestamp const & art::SubRunAuxiliary::beginTime ( ) const
noexcept

Definition at line 90 of file SubRunAuxiliary.cc.

References beginTime_.

Referenced by art::SubRunPrincipal::beginTime(), duplicateWith(), mergeAuxiliary(), and SubRunAuxiliary().

91  {
92  return beginTime_;
93  }
SubRunAuxiliary art::SubRunAuxiliary::duplicateWith ( Timestamp  beginTime,
Timestamp  endTime = {} 
) const

Definition at line 40 of file SubRunAuxiliary.cc.

References beginTime(), endTime(), id_, processHistoryID_, and rangeSetID_.

42  {
43  return SubRunAuxiliary{
45  }
ProcessHistoryID processHistoryID_
Timestamp const & endTime() const noexcept
Timestamp const & beginTime() const noexcept
Timestamp const & art::SubRunAuxiliary::endTime ( ) const
noexcept

Definition at line 96 of file SubRunAuxiliary.cc.

References endTime_.

Referenced by duplicateWith(), art::SubRunPrincipal::endTime(), mergeAuxiliary(), and SubRunAuxiliary().

97  {
98  return endTime_;
99  }
SubRunID const & art::SubRunAuxiliary::id ( ) const
noexcept

Definition at line 60 of file SubRunAuxiliary.cc.

References id_.

Referenced by mergeAuxiliary(), setRangeSetID(), and art::SubRunPrincipal::subRunID().

61  {
62  return id_;
63  }
bool art::SubRunAuxiliary::mergeAuxiliary ( SubRunAuxiliary const &  newAux)

Definition at line 121 of file SubRunAuxiliary.cc.

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

122  {
124  (newAux.beginTime() == Timestamp::invalidTimestamp())) {
126  } else if (newAux.beginTime() < beginTime_) {
127  beginTime_ = newAux.beginTime();
128  }
130  (newAux.endTime() == Timestamp::invalidTimestamp())) {
132  } else if (newAux.endTime() > endTime_) {
133  endTime_ = newAux.endTime();
134  }
135  // Keep the process history ID that is in the preexisting principal
136  // It may have been updated to include the current process.
137  // There is one strange other case where the two ProcessHistoryIDs
138  // could be different which should not be important and we just ignore.
139  // There could have been previous processes which only dropped products.
140  // These processes could have dropped the same branches but had different
141  // process names ... Ignore this.
142  if (id_ != newAux.id()) {
143  return false;
144  }
145  return true;
146  }
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:82
ProcessHistoryID const & art::SubRunAuxiliary::processHistoryID ( ) const
noexcept

Definition at line 48 of file SubRunAuxiliary.cc.

References processHistoryID_.

Referenced by art::SubRunPrincipal::SubRunPrincipal().

49  {
50  return processHistoryID_;
51  }
ProcessHistoryID processHistoryID_
unsigned art::SubRunAuxiliary::rangeSetID ( ) const
noexcept

Definition at line 108 of file SubRunAuxiliary.cc.

References rangeSetID_.

Referenced by SubRunAuxiliary().

109  {
110  return rangeSetID_;
111  }
RunNumber_t art::SubRunAuxiliary::run ( ) const
noexcept

Definition at line 78 of file SubRunAuxiliary.cc.

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

Referenced by art::SubRunPrincipal::run().

79  {
80  return id_.run();
81  }
RunNumber_t run() const
Definition: SubRunID.h:85
RunID const & art::SubRunAuxiliary::runID ( ) const
noexcept

Definition at line 72 of file SubRunAuxiliary.cc.

References id_, and art::SubRunID::runID().

Referenced by art::SubRunPrincipal::runID().

73  {
74  return id_.runID();
75  }
RunID const & runID() const
Definition: SubRunID.h:79
void art::SubRunAuxiliary::setProcessHistoryID ( ProcessHistoryID const &  phid)

Definition at line 54 of file SubRunAuxiliary.cc.

References processHistoryID_.

Referenced by art::SubRunPrincipal::createGroupsForProducedProducts().

55  {
56  processHistoryID_ = phid;
57  }
ProcessHistoryID processHistoryID_
void art::SubRunAuxiliary::setRangeSetID ( unsigned const  id) const

Definition at line 102 of file SubRunAuxiliary.cc.

References id(), and rangeSetID_.

103  {
104  rangeSetID_ = id;
105  }
SubRunID const & id() const noexcept
SubRunNumber_t art::SubRunAuxiliary::subRun ( ) const
noexcept

Definition at line 84 of file SubRunAuxiliary.cc.

References id_, and art::SubRunID::subRun().

Referenced by art::SubRunPrincipal::subRun().

85  {
86  return id_.subRun();
87  }
SubRunNumber_t subRun() const
Definition: SubRunID.h:91
SubRunID const & art::SubRunAuxiliary::subRunID ( ) const
noexcept

Definition at line 66 of file SubRunAuxiliary.cc.

References id_.

67  {
68  return id_;
69  }
void art::SubRunAuxiliary::write ( std::ostream &  os) const

Definition at line 114 of file SubRunAuxiliary.cc.

References id_, and processHistoryID_.

Referenced by art::operator<<().

115  {
116  os << "Process History ID = " << processHistoryID_ << endl;
117  os << id_ << endl;
118  }
ProcessHistoryID processHistoryID_

Member Data Documentation

Timestamp art::SubRunAuxiliary::beginTime_ {}
private

Definition at line 64 of file SubRunAuxiliary.h.

Referenced by beginTime(), mergeAuxiliary(), and SubRunAuxiliary().

constexpr BranchType art::SubRunAuxiliary::branch_type = InSubRun
static

Definition at line 19 of file SubRunAuxiliary.h.

Timestamp art::SubRunAuxiliary::endTime_ {}
private

Definition at line 65 of file SubRunAuxiliary.h.

Referenced by endTime(), mergeAuxiliary(), and SubRunAuxiliary().

SubRunID art::SubRunAuxiliary::id_ {}
private
ProcessHistoryID art::SubRunAuxiliary::processHistoryID_ {}
mutableprivate

Definition at line 61 of file SubRunAuxiliary.h.

Referenced by duplicateWith(), processHistoryID(), setProcessHistoryID(), and write().

unsigned art::SubRunAuxiliary::rangeSetID_ {-1u}
mutableprivate

Definition at line 62 of file SubRunAuxiliary.h.

Referenced by duplicateWith(), rangeSetID(), setRangeSetID(), and SubRunAuxiliary().


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