LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
SubRun.cc
Go to the documentation of this file.
2 // vim: set sw=2 expandtab :
3 
8 
9 namespace art {
10 
11  SubRun::~SubRun() = default;
12 
14  ModuleContext const& mc,
15  std::optional<ProductInserter> inserter,
16  RangeSet const& rs /* = RangeSet::invalid() */)
17  : ProductRetriever{InSubRun, srp, mc, false}
18  , inserter_{std::move(inserter)}
19  , subRunPrincipal_{srp}
20  , run_{srp.runPrincipal().makeRun(mc)}
21  , rangeSet_{rs}
22  {}
23 
24  SubRunID
25  SubRun::id() const
26  {
27  return subRunPrincipal_.subRunID();
28  }
29 
31  SubRun::run() const
32  {
33  return id().run();
34  }
35 
38  {
39  return id().subRun();
40  }
41 
42  Timestamp const&
44  {
45  return subRunPrincipal_.beginTime();
46  }
47 
48  Timestamp const&
50  {
51  return subRunPrincipal_.endTime();
52  }
53 
54  ProcessHistory const&
56  {
58  }
59 
60  Run const&
62  {
63  return run_;
64  }
65 
66  void
68  {
69  assert(inserter_);
70  inserter_->commitProducts();
71  }
72 
73 } // namespace art
SubRun(SubRunPrincipal const &srp, ModuleContext const &mc, std::optional< ProductInserter > inserter=std::nullopt, RangeSet const &rs=RangeSet::invalid())
Definition: SubRun.cc:13
SubRunPrincipal const & subRunPrincipal_
Definition: SubRun.h:117
RangeSet rangeSet_
Definition: SubRun.h:121
Definition: Run.h:37
ProcessHistory const & processHistory() const
Definition: SubRun.cc:55
Run const & getRun() const
Definition: SubRun.cc:61
RunNumber_t run() const
Definition: SubRunID.h:85
ProcessHistory const & processHistory() const
Definition: Principal.cc:247
Run const run_
Definition: SubRun.h:118
SubRunNumber_t subRun() const
Definition: SubRun.cc:37
Timestamp const & endTime() const
Definition: SubRun.cc:49
void commitProducts()
Definition: SubRun.cc:67
SubRunID id() const
Definition: SubRun.cc:25
Definition: MVAAlg.h:12
SubRunNumber_t subRun() const
Definition: SubRunID.h:91
Timestamp const & endTime() const
Timestamp const & beginTime() const
Definition: SubRun.cc:43
Timestamp const & beginTime() const
SubRunID subRunID() const
RunNumber_t run() const
Definition: SubRun.cc:31
std::optional< ProductInserter > inserter_
Definition: SubRun.h:116
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:120