Public Member Functions | Public Attributes | Static Public Attributes | List of all members
art::SubRunAuxiliary Class Reference

#include <SubRunAuxiliary.h>

Public Member Functions

 ~SubRunAuxiliary ()
 
 SubRunAuxiliary ()
 
 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)
 
 SubRunAuxiliary (SubRunAuxiliary const &)
 
 SubRunAuxiliary (SubRunAuxiliary &&)
 
SubRunAuxiliaryoperator= (SubRunAuxiliary const &)
 
SubRunAuxiliaryoperator= (SubRunAuxiliary &&)
 
void write (std::ostream &os) const
 
ProcessHistoryID const & processHistoryID () const noexcept
 
void setProcessHistoryID (ProcessHistoryID const &phid) const
 
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 setEndTime (Timestamp const &time)
 
void setRangeSetID (unsigned const id) const
 
unsigned rangeSetID () const noexcept
 
bool mergeAuxiliary (SubRunAuxiliary const &)
 

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 17 of file SubRunAuxiliary.h.

Constructor & Destructor Documentation

art::SubRunAuxiliary::~SubRunAuxiliary ( )

Definition at line 11 of file SubRunAuxiliary.cc.

11 {}
art::SubRunAuxiliary::SubRunAuxiliary ( )

Definition at line 13 of file SubRunAuxiliary.cc.

15  {}
ProcessHistoryID processHistoryID_
art::SubRunAuxiliary::SubRunAuxiliary ( SubRunID const &  theId,
Timestamp const &  theTime,
Timestamp const &  theEndTime 
)

Definition at line 17 of file SubRunAuxiliary.cc.

21  , rangeSetID_{-1u}
22  , id_{theId}
23  , beginTime_{theTime}
24  , endTime_{theEndTime}
25  {}
ProcessHistoryID processHistoryID_
art::SubRunAuxiliary::SubRunAuxiliary ( RunNumber_t const  theRun,
SubRunNumber_t const  theSubRun,
Timestamp const &  theTime,
Timestamp const &  theEndTime 
)

Definition at line 27 of file SubRunAuxiliary.cc.

32  , rangeSetID_{-1u}
33  , id_{theRun, theSubRun}
34  , beginTime_{theTime}
35  , endTime_{theEndTime}
36  {}
ProcessHistoryID processHistoryID_
art::SubRunAuxiliary::SubRunAuxiliary ( SubRunAuxiliary const &  rhs)

Definition at line 38 of file SubRunAuxiliary.cc.

39  : processHistoryID_{rhs.processHistoryID_}
40  , rangeSetID_{rhs.rangeSetID_}
41  , id_{rhs.id_}
42  , beginTime_{rhs.beginTime_}
43  , endTime_{rhs.endTime_}
44  {}
ProcessHistoryID processHistoryID_
art::SubRunAuxiliary::SubRunAuxiliary ( SubRunAuxiliary &&  rhs)

Definition at line 46 of file SubRunAuxiliary.cc.

47  : processHistoryID_{move(rhs.processHistoryID_)}
48  , rangeSetID_{move(rhs.rangeSetID_)}
49  , id_{move(rhs.id_)}
50  , beginTime_{move(rhs.beginTime_)}
51  , endTime_{move(rhs.endTime_)}
52  {}
ProcessHistoryID processHistoryID_
def move(depos, offset)
Definition: depos.py:107

Member Function Documentation

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

Definition at line 121 of file SubRunAuxiliary.cc.

122  {
123  return beginTime_;
124  }
Timestamp const & art::SubRunAuxiliary::endTime ( ) const
noexcept

Definition at line 127 of file SubRunAuxiliary.cc.

128  {
129  return endTime_;
130  }
SubRunID const & art::SubRunAuxiliary::id ( ) const
noexcept

Definition at line 91 of file SubRunAuxiliary.cc.

92  {
93  return id_;
94  }
bool art::SubRunAuxiliary::mergeAuxiliary ( SubRunAuxiliary const &  newAux)

Definition at line 160 of file SubRunAuxiliary.cc.

161  {
163  (newAux.beginTime() == Timestamp::invalidTimestamp())) {
165  } else if (newAux.beginTime() < beginTime_) {
166  beginTime_ = newAux.beginTime();
167  }
169  (newAux.endTime() == Timestamp::invalidTimestamp())) {
171  } else if (newAux.endTime() > endTime_) {
172  endTime_ = newAux.endTime();
173  }
174  // Keep the process history ID that is in the preexisting principal
175  // It may have been updated to include the current process.
176  // There is one strange other case where the two ProcessHistoryIDs
177  // could be different which should not be important and we just ignore.
178  // There could have been previous processes which only dropped products.
179  // These processes could have dropped the same branches but had different
180  // process names ... Ignore this.
181  if (id_ != newAux.id()) {
182  return false;
183  }
184  return true;
185  }
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:82
SubRunAuxiliary & art::SubRunAuxiliary::operator= ( SubRunAuxiliary const &  rhs)

Definition at line 55 of file SubRunAuxiliary.cc.

56  {
57  if (this != &rhs) {
58  processHistoryID_ = rhs.processHistoryID_;
59  rangeSetID_ = rhs.rangeSetID_;
60  id_ = rhs.id_;
61  beginTime_ = rhs.beginTime_;
62  endTime_ = rhs.endTime_;
63  }
64  return *this;
65  }
ProcessHistoryID processHistoryID_
SubRunAuxiliary & art::SubRunAuxiliary::operator= ( SubRunAuxiliary &&  rhs)

Definition at line 68 of file SubRunAuxiliary.cc.

69  {
70  processHistoryID_ = move(rhs.processHistoryID_);
71  rangeSetID_ = move(rhs.rangeSetID_);
72  id_ = move(rhs.id_);
73  beginTime_ = move(rhs.beginTime_);
74  endTime_ = move(rhs.endTime_);
75  return *this;
76  }
ProcessHistoryID processHistoryID_
def move(depos, offset)
Definition: depos.py:107
ProcessHistoryID const & art::SubRunAuxiliary::processHistoryID ( ) const
noexcept

Definition at line 79 of file SubRunAuxiliary.cc.

80  {
81  return processHistoryID_;
82  }
ProcessHistoryID processHistoryID_
unsigned art::SubRunAuxiliary::rangeSetID ( ) const
noexcept

Definition at line 147 of file SubRunAuxiliary.cc.

148  {
149  return rangeSetID_;
150  }
RunNumber_t art::SubRunAuxiliary::run ( ) const
noexcept

Definition at line 109 of file SubRunAuxiliary.cc.

110  {
111  return id_.run();
112  }
RunNumber_t run() const
Definition: SubRunID.h:85
RunID const & art::SubRunAuxiliary::runID ( ) const
noexcept

Definition at line 103 of file SubRunAuxiliary.cc.

104  {
105  return id_.runID();
106  }
RunID const & runID() const
Definition: SubRunID.h:79
void art::SubRunAuxiliary::setEndTime ( Timestamp const &  time)

Definition at line 133 of file SubRunAuxiliary.cc.

134  {
136  endTime_ = time;
137  }
138  }
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:82
void art::SubRunAuxiliary::setProcessHistoryID ( ProcessHistoryID const &  phid) const

Definition at line 85 of file SubRunAuxiliary.cc.

86  {
87  processHistoryID_ = phid;
88  }
ProcessHistoryID processHistoryID_
void art::SubRunAuxiliary::setRangeSetID ( unsigned const  id) const

Definition at line 141 of file SubRunAuxiliary.cc.

142  {
143  rangeSetID_ = id;
144  }
SubRunID const & id() const noexcept
SubRunNumber_t art::SubRunAuxiliary::subRun ( ) const
noexcept

Definition at line 115 of file SubRunAuxiliary.cc.

116  {
117  return id_.subRun();
118  }
SubRunNumber_t subRun() const
Definition: SubRunID.h:91
SubRunID const & art::SubRunAuxiliary::subRunID ( ) const
noexcept

Definition at line 97 of file SubRunAuxiliary.cc.

98  {
99  return id_;
100  }
void art::SubRunAuxiliary::write ( std::ostream &  os) const

Definition at line 153 of file SubRunAuxiliary.cc.

154  {
155  os << "Process History ID = " << processHistoryID_ << endl;
156  os << id_ << endl;
157  }
ProcessHistoryID processHistoryID_
QTextStream & endl(QTextStream &s)

Member Data Documentation

Timestamp art::SubRunAuxiliary::beginTime_ {}

Definition at line 80 of file SubRunAuxiliary.h.

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

Definition at line 20 of file SubRunAuxiliary.h.

Timestamp art::SubRunAuxiliary::endTime_ {}

Definition at line 82 of file SubRunAuxiliary.h.

SubRunID art::SubRunAuxiliary::id_ {}

Definition at line 78 of file SubRunAuxiliary.h.

ProcessHistoryID art::SubRunAuxiliary::processHistoryID_ {}
mutable

Definition at line 74 of file SubRunAuxiliary.h.

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

Definition at line 76 of file SubRunAuxiliary.h.


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