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

#include "RunAuxiliary.h"

Public Member Functions

 RunAuxiliary ()
 
 RunAuxiliary (RunID const &theId, Timestamp const &theTime, Timestamp const &theEndTime)
 
 RunAuxiliary (RunNumber_t const &run, Timestamp const &theTime, Timestamp const &theEndTime)
 
RunAuxiliary duplicateWith (Timestamp beginTime, Timestamp endTime={}) const
 
void write (std::ostream &) const
 
ProcessHistoryID const & processHistoryID () const noexcept
 
void setProcessHistoryID (ProcessHistoryID const &)
 
unsigned rangeSetID () const noexcept
 
void setRangeSetID (unsigned const id) const
 
RunID const & id () const noexcept
 
RunID const & runID () const noexcept
 
void runID (RunID const &)
 
RunNumber_t run () const noexcept
 
Timestamp const & beginTime () const noexcept
 
Timestamp const & endTime () const noexcept
 
bool mergeAuxiliary (RunAuxiliary const &)
 

Static Public Attributes

static constexpr BranchType branch_type = InRun
 

Private Member Functions

void mergeNewTimestampsIntoThis_ (RunAuxiliary const &)
 
 RunAuxiliary (RunID id, Timestamp beginTime, Timestamp endTime, ProcessHistoryID processHistoryID, unsigned rangeSetID)
 

Private Attributes

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

Detailed Description

Definition at line 17 of file RunAuxiliary.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file RunAuxiliary.cc.

References beginTime_, and endTime_.

21  : id_{theId}, beginTime_{theTime}, endTime_{theEndTime}
22  {}
Timestamp beginTime_
Definition: RunAuxiliary.h:63
Timestamp endTime_
Definition: RunAuxiliary.h:64
art::RunAuxiliary::RunAuxiliary ( RunNumber_t const &  run,
Timestamp const &  theTime,
Timestamp const &  theEndTime 
)

Definition at line 24 of file RunAuxiliary.cc.

27  : RunAuxiliary{RunID{run}, theTime, theEndTime}
28  {}
RunNumber_t run() const noexcept
art::RunAuxiliary::RunAuxiliary ( RunID  id,
Timestamp  beginTime,
Timestamp  endTime,
ProcessHistoryID  processHistoryID,
unsigned  rangeSetID 
)
private

Definition at line 31 of file RunAuxiliary.cc.

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

38  , id_{id}
40  , endTime_{endTime}
41  {}
ProcessHistoryID const & processHistoryID() const noexcept
Definition: RunAuxiliary.cc:52
Timestamp const & beginTime() const noexcept
Definition: RunAuxiliary.cc:70
unsigned rangeSetID() const noexcept
Definition: RunAuxiliary.cc:58
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:60
unsigned rangeSetID_
Definition: RunAuxiliary.h:61
Timestamp const & endTime() const noexcept
Definition: RunAuxiliary.cc:76
Timestamp beginTime_
Definition: RunAuxiliary.h:63
Timestamp endTime_
Definition: RunAuxiliary.h:64

Member Function Documentation

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

Definition at line 70 of file RunAuxiliary.cc.

References beginTime_.

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

71  {
72  return beginTime_;
73  }
Timestamp beginTime_
Definition: RunAuxiliary.h:63
RunAuxiliary art::RunAuxiliary::duplicateWith ( Timestamp  beginTime,
Timestamp  endTime = {} 
) const

Definition at line 44 of file RunAuxiliary.cc.

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

46  {
47  return RunAuxiliary{
49  }
Timestamp const & beginTime() const noexcept
Definition: RunAuxiliary.cc:70
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:60
unsigned rangeSetID_
Definition: RunAuxiliary.h:61
Timestamp const & endTime() const noexcept
Definition: RunAuxiliary.cc:76
Timestamp const & art::RunAuxiliary::endTime ( ) const
noexcept

Definition at line 76 of file RunAuxiliary.cc.

References endTime_.

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

77  {
78  return endTime_;
79  }
Timestamp endTime_
Definition: RunAuxiliary.h:64
RunID const & art::RunAuxiliary::id ( ) const
noexcept

Definition at line 64 of file RunAuxiliary.cc.

References id_.

Referenced by mergeAuxiliary(), art::RunPrincipal::runID(), runID(), and setRangeSetID().

65  {
66  return id_;
67  }
bool art::RunAuxiliary::mergeAuxiliary ( RunAuxiliary const &  newAux)

Definition at line 119 of file RunAuxiliary.cc.

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

120  {
122  // Keep the process history ID that is in the preexisting principal
123  // It may have been updated to include the current process.
124  // There is one strange other case where the two ProcessHistoryIDs
125  // could be different which should not be important and we just ignore.
126  // There could have been previous processes which only dropped products.
127  // These processes could have dropped the same branches but had different
128  // process names ... Ignore this.
129  return id_ == newAux.id();
130  }
void mergeNewTimestampsIntoThis_(RunAuxiliary const &)
void art::RunAuxiliary::mergeNewTimestampsIntoThis_ ( RunAuxiliary const &  newAux)
private

Definition at line 133 of file RunAuxiliary.cc.

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

Referenced by mergeAuxiliary().

134  {
136  (newAux.beginTime() == Timestamp::invalidTimestamp())) {
138  } else if (newAux.beginTime() < beginTime_) {
139  beginTime_ = newAux.beginTime();
140  }
142  (newAux.endTime() == Timestamp::invalidTimestamp())) {
144  } else if (newAux.endTime() > endTime_) {
145  endTime_ = newAux.endTime();
146  }
147  }
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:82
Timestamp beginTime_
Definition: RunAuxiliary.h:63
Timestamp endTime_
Definition: RunAuxiliary.h:64
ProcessHistoryID const & art::RunAuxiliary::processHistoryID ( ) const
noexcept

Definition at line 52 of file RunAuxiliary.cc.

References processHistoryID_.

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

53  {
54  return processHistoryID_;
55  }
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:60
unsigned art::RunAuxiliary::rangeSetID ( ) const
noexcept

Definition at line 58 of file RunAuxiliary.cc.

References rangeSetID_.

Referenced by RunAuxiliary().

59  {
60  return rangeSetID_;
61  }
unsigned rangeSetID_
Definition: RunAuxiliary.h:61
RunNumber_t art::RunAuxiliary::run ( ) const
noexcept

Definition at line 100 of file RunAuxiliary.cc.

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

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

101  {
102  return id_.run();
103  }
RunNumber_t run() const
Definition: RunID.h:64
RunID const & art::RunAuxiliary::runID ( ) const
noexcept

Definition at line 88 of file RunAuxiliary.cc.

References id_.

89  {
90  return id_;
91  }
void art::RunAuxiliary::runID ( RunID const &  id)

Definition at line 94 of file RunAuxiliary.cc.

References id(), and id_.

95  {
96  id_ = id;
97  }
RunID const & id() const noexcept
Definition: RunAuxiliary.cc:64
void art::RunAuxiliary::setProcessHistoryID ( ProcessHistoryID const &  phid)

Definition at line 82 of file RunAuxiliary.cc.

References processHistoryID_.

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

83  {
84  processHistoryID_ = phid;
85  }
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:60
void art::RunAuxiliary::setRangeSetID ( unsigned const  id) const

Definition at line 106 of file RunAuxiliary.cc.

References id(), and rangeSetID_.

107  {
108  rangeSetID_ = id;
109  }
unsigned rangeSetID_
Definition: RunAuxiliary.h:61
RunID const & id() const noexcept
Definition: RunAuxiliary.cc:64
void art::RunAuxiliary::write ( std::ostream &  os) const

Definition at line 112 of file RunAuxiliary.cc.

References id_, and processHistoryID_.

Referenced by art::operator<<().

113  {
114  os << "Process History ID = " << processHistoryID_ << endl;
115  os << id_ << endl;
116  }
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:60

Member Data Documentation

Timestamp art::RunAuxiliary::beginTime_ {}
private

Definition at line 63 of file RunAuxiliary.h.

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

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

Definition at line 19 of file RunAuxiliary.h.

Timestamp art::RunAuxiliary::endTime_ {}
private

Definition at line 64 of file RunAuxiliary.h.

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

RunID art::RunAuxiliary::id_ {}
private

Definition at line 62 of file RunAuxiliary.h.

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

ProcessHistoryID art::RunAuxiliary::processHistoryID_ {}
mutableprivate

Definition at line 60 of file RunAuxiliary.h.

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

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

Definition at line 61 of file RunAuxiliary.h.

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


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