LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
art::SubRunAuxiliary Class Reference

#include "SubRunAuxiliary.h"

Public Member Functions

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

Public Attributes

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

Static Public Attributes

static constexpr BranchType branch_type = InSubRun
 

Detailed Description

Definition at line 18 of file SubRunAuxiliary.h.

Constructor & Destructor Documentation

art::SubRunAuxiliary::SubRunAuxiliary ( )
default
art::SubRunAuxiliary::SubRunAuxiliary ( SubRunID const &  theId,
Timestamp const &  theTime,
Timestamp const &  theEndTime 
)
inline

Definition at line 24 of file SubRunAuxiliary.h.

References beginTime_, and endTime_.

27  : id_{theId}, beginTime_{theTime}, endTime_{theEndTime}
28  {}
art::SubRunAuxiliary::SubRunAuxiliary ( RunNumber_t const  theRun,
SubRunNumber_t const  theSubRun,
Timestamp const &  theTime,
Timestamp const &  theEndTime 
)
inline

Definition at line 30 of file SubRunAuxiliary.h.

References beginTime_, endTime_, and write().

34  : id_{theRun, theSubRun}, beginTime_{theTime}, endTime_{theEndTime}
35  {}

Member Function Documentation

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

Definition at line 73 of file SubRunAuxiliary.h.

References beginTime_.

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

74  {
75  return beginTime_;
76  }
Timestamp const& art::SubRunAuxiliary::endTime ( ) const
inline

Definition at line 79 of file SubRunAuxiliary.h.

References endTime_.

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

80  {
81  return endTime_;
82  }
SubRunID const& art::SubRunAuxiliary::id ( ) const
inline

Definition at line 52 of file SubRunAuxiliary.h.

References id_.

Referenced by art::SubRun::id(), art::SubRunPrincipal::id(), mergeAuxiliary(), setRangeSetID(), and art::RootOutputFile::writeSubRun().

53  {
54  return id_;
55  }
bool art::SubRunAuxiliary::mergeAuxiliary ( SubRunAuxiliary const &  newAux)

Definition at line 12 of file SubRunAuxiliary.cc.

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

Referenced by rangeSetID().

13 {
15  newAux.beginTime() == Timestamp::invalidTimestamp()) {
17  } else if (newAux.beginTime() < beginTime_) {
18  beginTime_ = newAux.beginTime();
19  }
20 
22  newAux.endTime() == Timestamp::invalidTimestamp()) {
24  } else if (newAux.endTime() > endTime_) {
25  endTime_ = newAux.endTime();
26  }
27 
28  // Keep the process history ID that is in the preexisting principal
29  // It may have been updated to include the current process.
30  // There is one strange other case where the two ProcessHistoryIDs
31  // could be different which should not be important and we just ignore.
32  // There could have been previous processes which only dropped products.
33  // These processes could have dropped the same branches but had different
34  // process names ... Ignore this.
35 
36  if (id_ != newAux.id())
37  return false;
38  return true;
39 }
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:83
ProcessHistoryID const& art::SubRunAuxiliary::processHistoryID ( ) const
inline

Definition at line 40 of file SubRunAuxiliary.h.

References processHistoryID_.

41  {
42  return processHistoryID_;
43  }
ProcessHistoryID processHistoryID_
auto art::SubRunAuxiliary::rangeSetID ( ) const
inline

Definition at line 97 of file SubRunAuxiliary.h.

References mergeAuxiliary(), and rangeSetID_.

98  {
99  return rangeSetID_;
100  }
RunNumber_t art::SubRunAuxiliary::run ( ) const
inline

Definition at line 62 of file SubRunAuxiliary.h.

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

Referenced by art::SubRun::run(), and art::SubRunPrincipal::run().

63  {
64  return id_.run();
65  }
RunNumber_t run() const
Definition: SubRunID.h:84
RunID const& art::SubRunAuxiliary::runID ( ) const
inline

Definition at line 57 of file SubRunAuxiliary.h.

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

58  {
59  return id_.runID();
60  }
RunID const & runID() const
Definition: SubRunID.h:78
void art::SubRunAuxiliary::setEndTime ( Timestamp const &  time)
inline

Definition at line 85 of file SubRunAuxiliary.h.

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

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

86  {
88  endTime_ = time;
89  }
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:83
void art::SubRunAuxiliary::setProcessHistoryID ( ProcessHistoryID const &  phid) const
inline

Definition at line 46 of file SubRunAuxiliary.h.

References processHistoryID_.

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

47  {
48  processHistoryID_ = phid;
49  }
ProcessHistoryID processHistoryID_
void art::SubRunAuxiliary::setRangeSetID ( unsigned const  id) const
inline

Definition at line 92 of file SubRunAuxiliary.h.

References id(), and rangeSetID_.

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

93  {
94  rangeSetID_ = id;
95  }
SubRunID const & id() const
SubRunNumber_t art::SubRunAuxiliary::subRun ( ) const
inline

Definition at line 67 of file SubRunAuxiliary.h.

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

Referenced by art::SubRun::subRun(), and art::SubRunPrincipal::subRun().

68  {
69  return id_.subRun();
70  }
SubRunNumber_t subRun() const
Definition: SubRunID.h:90
void art::SubRunAuxiliary::write ( std::ostream &  os) const

Definition at line 5 of file SubRunAuxiliary.cc.

References id_, and processHistoryID_.

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

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

Member Data Documentation

Timestamp art::SubRunAuxiliary::beginTime_ {}

Definition at line 111 of file SubRunAuxiliary.h.

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

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

Definition at line 20 of file SubRunAuxiliary.h.

Timestamp art::SubRunAuxiliary::endTime_ {}

Definition at line 112 of file SubRunAuxiliary.h.

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

SubRunID art::SubRunAuxiliary::id_ {}

Definition at line 109 of file SubRunAuxiliary.h.

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

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

Definition at line 107 of file SubRunAuxiliary.h.

Referenced by rangeSetID(), and setRangeSetID().


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