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

#include <RunAuxiliary.h>

Public Member Functions

 ~RunAuxiliary ()
 
 RunAuxiliary ()
 
 RunAuxiliary (RunID const &theId, Timestamp const &theTime, Timestamp const &theEndTime)
 
 RunAuxiliary (RunNumber_t const &run, Timestamp const &theTime, Timestamp const &theEndTime)
 
 RunAuxiliary (RunAuxiliary const &)
 
 RunAuxiliary (RunAuxiliary &&)
 
RunAuxiliaryoperator= (RunAuxiliary const &)
 
RunAuxiliaryoperator= (RunAuxiliary &&)
 
void write (std::ostream &) const
 
ProcessHistoryIDprocessHistoryID () const noexcept
 
void setProcessHistoryID (ProcessHistoryID const &) 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
 
void beginTime (Timestamp const &)
 
Timestamp const & endTime () const noexcept
 
void endTime (Timestamp const &)
 
bool mergeAuxiliary (RunAuxiliary const &)
 

Static Public Attributes

static constexpr BranchType branch_type = InRun
 

Private Member Functions

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

Private Attributes

ProcessHistoryID processHistoryID_ {}
 
std::set< ProcessHistoryIDallEventsProcessHistories_ {}
 
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 ( )
default
art::RunAuxiliary::RunAuxiliary ( RunID const &  theId,
Timestamp const &  theTime,
Timestamp const &  theEndTime 
)

Definition at line 26 of file RunAuxiliary.cc.

31  , rangeSetID_(-1u)
32  , id_(theId)
33  , beginTime_(theTime)
34  , endTime_(theEndTime)
35  {}
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:78
unsigned rangeSetID_
Definition: RunAuxiliary.h:85
Timestamp beginTime_
Definition: RunAuxiliary.h:87
std::set< ProcessHistoryID > allEventsProcessHistories_
Definition: RunAuxiliary.h:83
Timestamp endTime_
Definition: RunAuxiliary.h:88
art::RunAuxiliary::RunAuxiliary ( RunNumber_t const &  run,
Timestamp const &  theTime,
Timestamp const &  theEndTime 
)

Definition at line 39 of file RunAuxiliary.cc.

44  , rangeSetID_(-1u)
45  , id_(run)
46  , beginTime_(theTime)
47  , endTime_(theEndTime)
48  {}
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:78
unsigned rangeSetID_
Definition: RunAuxiliary.h:85
RunNumber_t run() const noexcept
Timestamp beginTime_
Definition: RunAuxiliary.h:87
std::set< ProcessHistoryID > allEventsProcessHistories_
Definition: RunAuxiliary.h:83
Timestamp endTime_
Definition: RunAuxiliary.h:88
art::RunAuxiliary::RunAuxiliary ( RunAuxiliary const &  )
default
art::RunAuxiliary::RunAuxiliary ( RunAuxiliary &&  )
default

Member Function Documentation

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

Definition at line 85 of file RunAuxiliary.cc.

86  {
87  return beginTime_;
88  }
Timestamp beginTime_
Definition: RunAuxiliary.h:87
void art::RunAuxiliary::beginTime ( Timestamp const &  time)

Definition at line 121 of file RunAuxiliary.cc.

122  {
123  beginTime_ = time;
124  }
Timestamp beginTime_
Definition: RunAuxiliary.h:87
Timestamp const & art::RunAuxiliary::endTime ( ) const
noexcept

Definition at line 91 of file RunAuxiliary.cc.

92  {
93  return endTime_;
94  }
Timestamp endTime_
Definition: RunAuxiliary.h:88
void art::RunAuxiliary::endTime ( Timestamp const &  time)

Definition at line 127 of file RunAuxiliary.cc.

128  {
129  endTime_ = time;
130  }
Timestamp endTime_
Definition: RunAuxiliary.h:88
RunID const & art::RunAuxiliary::id ( ) const
noexcept

Definition at line 79 of file RunAuxiliary.cc.

80  {
81  return id_;
82  }
bool art::RunAuxiliary::mergeAuxiliary ( RunAuxiliary const &  newAux)

Definition at line 146 of file RunAuxiliary.cc.

147  {
150  // Keep the process history ID that is in the preexisting principal
151  // It may have been updated to include the current process.
152  // There is one strange other case where the two ProcessHistoryIDs
153  // could be different which should not be important and we just ignore.
154  // There could have been previous processes which only dropped products.
155  // These processes could have dropped the same branches but had different
156  // process names ... Ignore this.
157  return id_ == newAux.id();
158  }
void mergeNewTimestampsIntoThis_(RunAuxiliary const &)
void mergeNewProcessHistoryIntoThis_(RunAuxiliary const &)
void art::RunAuxiliary::mergeNewProcessHistoryIntoThis_ ( RunAuxiliary const &  newAux)
private

Definition at line 178 of file RunAuxiliary.cc.

179  {
180  allEventsProcessHistories_.insert(newAux.allEventsProcessHistories_.begin(),
181  newAux.allEventsProcessHistories_.end());
182  }
std::set< ProcessHistoryID > allEventsProcessHistories_
Definition: RunAuxiliary.h:83
void art::RunAuxiliary::mergeNewTimestampsIntoThis_ ( RunAuxiliary const &  newAux)
private

Definition at line 161 of file RunAuxiliary.cc.

162  {
164  (newAux.beginTime() == Timestamp::invalidTimestamp())) {
166  } else if (newAux.beginTime() < beginTime_) {
167  beginTime_ = newAux.beginTime();
168  }
170  (newAux.endTime() == Timestamp::invalidTimestamp())) {
172  } else if (newAux.endTime() > endTime_) {
173  endTime_ = newAux.endTime();
174  }
175  }
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:82
Timestamp beginTime_
Definition: RunAuxiliary.h:87
Timestamp endTime_
Definition: RunAuxiliary.h:88
RunAuxiliary & art::RunAuxiliary::operator= ( RunAuxiliary const &  )
default
RunAuxiliary & art::RunAuxiliary::operator= ( RunAuxiliary &&  )
default
ProcessHistoryID & art::RunAuxiliary::processHistoryID ( ) const
noexcept

Definition at line 67 of file RunAuxiliary.cc.

68  {
69  return processHistoryID_;
70  }
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:78
unsigned art::RunAuxiliary::rangeSetID ( ) const
noexcept

Definition at line 73 of file RunAuxiliary.cc.

74  {
75  return rangeSetID_;
76  }
unsigned rangeSetID_
Definition: RunAuxiliary.h:85
RunNumber_t art::RunAuxiliary::run ( ) const
noexcept

Definition at line 115 of file RunAuxiliary.cc.

116  {
117  return id_.run();
118  }
RunNumber_t run() const
Definition: RunID.h:64
RunID const & art::RunAuxiliary::runID ( ) const
noexcept

Definition at line 103 of file RunAuxiliary.cc.

104  {
105  return id_;
106  }
void art::RunAuxiliary::runID ( RunID const &  id)

Definition at line 109 of file RunAuxiliary.cc.

110  {
111  id_ = id;
112  }
RunID const & id() const noexcept
Definition: RunAuxiliary.cc:79
void art::RunAuxiliary::setProcessHistoryID ( ProcessHistoryID const &  phid) const

Definition at line 97 of file RunAuxiliary.cc.

98  {
99  processHistoryID_ = phid;
100  }
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:78
void art::RunAuxiliary::setRangeSetID ( unsigned const  id) const

Definition at line 133 of file RunAuxiliary.cc.

134  {
135  rangeSetID_ = id;
136  }
unsigned rangeSetID_
Definition: RunAuxiliary.h:85
RunID const & id() const noexcept
Definition: RunAuxiliary.cc:79
void art::RunAuxiliary::write ( std::ostream &  os) const

Definition at line 139 of file RunAuxiliary.cc.

140  {
141  os << "Process History ID = " << processHistoryID_ << endl;
142  os << id_ << endl;
143  }
ProcessHistoryID processHistoryID_
Definition: RunAuxiliary.h:78
QTextStream & endl(QTextStream &s)

Member Data Documentation

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

Definition at line 83 of file RunAuxiliary.h.

Timestamp art::RunAuxiliary::beginTime_ {}
private

Definition at line 87 of file RunAuxiliary.h.

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

Definition at line 20 of file RunAuxiliary.h.

Timestamp art::RunAuxiliary::endTime_ {}
private

Definition at line 88 of file RunAuxiliary.h.

RunID art::RunAuxiliary::id_ {}
private

Definition at line 86 of file RunAuxiliary.h.

ProcessHistoryID art::RunAuxiliary::processHistoryID_ {}
mutableprivate

Definition at line 78 of file RunAuxiliary.h.

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

Definition at line 85 of file RunAuxiliary.h.


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