LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
SubRunPrincipal.h
Go to the documentation of this file.
1 #ifndef art_Framework_Principal_SubRunPrincipal_h
2 #define art_Framework_Principal_SubRunPrincipal_h
3 // vim: set sw=2:
4 
5 // SubRunPrincipal
6 //
7 // Manages per-subRun data products.
8 //
9 // This is not visible to modules, instead they use the SubRun class,
10 // which is a proxy for this class.
11 
21 #include "cetlib/exempt_ptr.h"
22 
23 #include <memory>
24 #include <vector>
25 
26 namespace art {
27 
28  class SubRunPrincipal final : public Principal {
29  public:
32 
34  SubRunAuxiliary const&,
35  ProcessConfiguration const&,
36  cet::exempt_ptr<ProductTable const> presentProducts,
37  std::unique_ptr<BranchMapper>&& = std::make_unique<BranchMapper>(),
38  std::unique_ptr<DelayedReader>&& = std::make_unique<NoDelayedReader>());
39 
40  RunPrincipal const& runPrincipal() const;
41 
42  cet::exempt_ptr<RunPrincipal const>
44  {
45  return runPrincipal_;
46  }
47  void
48  setRunPrincipal(cet::exempt_ptr<RunPrincipal const> rp)
49  {
50  runPrincipal_ = rp;
51  }
52 
53  SubRunAuxiliary const&
54  aux() const
55  {
56  return aux_;
57  }
58  SubRunID
59  id() const
60  {
61  return aux().id();
62  }
64  run() const
65  {
66  return aux().run();
67  }
69  subRun() const
70  {
71  return aux().subRun();
72  }
73  Timestamp const&
74  beginTime() const
75  {
76  return aux().beginTime();
77  }
78  Timestamp const&
79  endTime() const
80  {
81  return aux().endTime();
82  }
83 
84  void
85  setEndTime(Timestamp const& time)
86  {
87  aux_.setEndTime(time);
88  }
89 
90  void put(std::unique_ptr<EDProduct>&&,
91  BranchDescription const&,
92  std::unique_ptr<ProductProvenance const>&&,
93  RangeSet&&);
94 
95  void fillGroup(BranchDescription const&) override;
96 
97  RangeSet
98  seenRanges() const override
99  {
100  return rangeSet_;
101  }
102  void
104  {
105  rangeSet_ = rs;
106  }
107 
108  BranchType
109  branchType() const override
110  {
111  return branch_type;
112  }
113 
114  private:
115  ProcessHistoryID const& processHistoryID() const override;
116  void setProcessHistoryID(ProcessHistoryID const& phid) override;
117 
119  cet::exempt_ptr<RunPrincipal const> runPrincipal_{nullptr};
121  };
122 
123 } // namespace art
124 
125 #endif /* art_Framework_Principal_SubRunPrincipal_h */
126 
127 // Local Variables:
128 // mode: c++
129 // End:
void setRunPrincipal(cet::exempt_ptr< RunPrincipal const > rp)
Timestamp const & endTime() const
void put(std::unique_ptr< EDProduct > &&, BranchDescription const &, std::unique_ptr< ProductProvenance const > &&, RangeSet &&)
SubRunPrincipal(SubRunAuxiliary const &, ProcessConfiguration const &, cet::exempt_ptr< ProductTable const > presentProducts, std::unique_ptr< BranchMapper > &&=std::make_unique< BranchMapper >(), std::unique_ptr< DelayedReader > &&=std::make_unique< NoDelayedReader >())
ProcessHistoryID const & processHistoryID() const override
cet::exempt_ptr< RunPrincipal const > runPrincipal_
void setProcessHistoryID(ProcessHistoryID const &phid) override
SubRunID const & id() const
Timestamp const & beginTime() const
SubRunAuxiliary aux_
Timestamp const & endTime() const
RunNumber_t run() const
RangeSet seenRanges() const override
void updateSeenRanges(RangeSet const &rs)
RunPrincipal const & runPrincipal() const
SubRunID id() const
Timestamp const & beginTime() const
static constexpr BranchType branch_type
IDNumber_t< Level::SubRun > SubRunNumber_t
Definition: IDNumber.h:118
SubRunNumber_t subRun() const
SubRunAuxiliary const & aux() const
void fillGroup(BranchDescription const &) override
BranchType branchType() const override
SubRunNumber_t subRun() const
static constexpr BranchType branch_type
static RangeSet invalid()
Definition: RangeSet.cc:46
cet::exempt_ptr< RunPrincipal const > runPrincipalExemptPtr() const
BranchType
Definition: BranchType.h:18
HLT enums.
void setEndTime(Timestamp const &time)
void setEndTime(Timestamp const &time)
RunNumber_t run() const
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:119