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&,
37  bool const parentageEnabled = true,
38  bool const rangesEnabled = true,
39  std::unique_ptr<BranchMapper>&& = std::make_unique<BranchMapper>(),
40  std::unique_ptr<DelayedReader>&& = std::make_unique<NoDelayedReader>());
41 
42  RunPrincipal const& runPrincipal() const;
43 
46  {
47  return runPrincipal_;
48  }
49  void
51  {
52  runPrincipal_ = rp;
53  }
54 
55  SubRunAuxiliary const&
56  aux() const
57  {
58  return aux_;
59  }
60  SubRunID
61  id() const
62  {
63  return aux().id();
64  }
66  run() const
67  {
68  return aux().run();
69  }
71  subRun() const
72  {
73  return aux().subRun();
74  }
75  Timestamp const&
76  beginTime() const
77  {
78  return aux().beginTime();
79  }
80  Timestamp const&
81  endTime() const
82  {
83  return aux().endTime();
84  }
85 
86  void
88  {
89  aux_.setEndTime(time);
90  }
91 
92  void put(std::unique_ptr<EDProduct>&&,
93  BranchDescription const&,
94  std::unique_ptr<ProductProvenance const>&&,
95  RangeSet&&);
96 
97  void fillGroup(BranchDescription const&) override;
98 
99  RangeSet
100  seenRanges() const override
101  {
102  return rangeSet_;
103  }
104  void
106  {
107  rangeSet_ = rs;
108  }
109 
110  BranchType
111  branchType() const override
112  {
113  return branch_type;
114  }
115 
116  bool
117  parentageEnabled() const override
118  {
119  return parentageEnabled_;
120  }
121 
122  bool
123  rangesEnabled() const override
124  {
125  return rangesEnabled_;
126  }
127 
128  private:
129  ProcessHistoryID const& processHistoryID() const override;
130  void setProcessHistoryID(ProcessHistoryID const& phid) override;
131 
135  bool const parentageEnabled_{true};
136  bool const rangesEnabled_{true};
137  };
138 
139 } // namespace art
140 
141 #endif /* art_Framework_Principal_SubRunPrincipal_h */
142 
143 // Local Variables:
144 // mode: c++
145 // 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 &&)
RunPrincipal const & runPrincipal() const
cet::exempt_ptr< RunPrincipal const > runPrincipal_
void setProcessHistoryID(ProcessHistoryID const &phid) override
SubRunID const & id() const
Timestamp const & beginTime() const
SubRunAuxiliary aux_
bool rangesEnabled() const override
Timestamp const & endTime() const
RunNumber_t run() const
RangeSet seenRanges() const override
static RangeSet invalid()
void updateSeenRanges(RangeSet const &rs)
SubRunID id() const
Timestamp const & beginTime() const
bool const parentageEnabled_
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
SubRunPrincipal(SubRunAuxiliary const &, ProcessConfiguration const &, cet::exempt_ptr< ProductTable const > presentProducts, bool const parentageEnabled=true, bool const rangesEnabled=true, std::unique_ptr< BranchMapper > &&=std::make_unique< BranchMapper >(), std::unique_ptr< DelayedReader > &&=std::make_unique< NoDelayedReader >())
BranchType branchType() const override
ProcessHistoryID const & processHistoryID() const override
SubRunNumber_t subRun() const
static constexpr BranchType branch_type
cet::exempt_ptr< RunPrincipal const > runPrincipalExemptPtr() const
BranchType
Definition: BranchType.h:18
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
void setEndTime(Timestamp const &time)
void setEndTime(Timestamp const &time)
bool parentageEnabled() const override
RunNumber_t run() const
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:119