RunPrincipal.h
Go to the documentation of this file.
1 #ifndef art_Framework_Principal_RunPrincipal_h
2 #define art_Framework_Principal_RunPrincipal_h
3 // vim: set sw=2:
4 
5 //
6 // RunPrincipal
7 //
8 // Manages per-run data products.
9 //
10 // This is not visible to modules, instead they use the Run class,
11 // which is a proxy for this class.
12 //
13 
21 #include "cetlib/exempt_ptr.h"
22 
23 #include <memory>
24 #include <vector>
25 
26 namespace art {
27 
28  class RunPrincipal final : public Principal {
29  public:
32 
34  RunAuxiliary 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  RunAuxiliary const&
43  aux() const
44  {
45  return aux_;
46  }
47  RunID const&
48  id() const
49  {
50  return aux().id();
51  }
53  run() const
54  {
55  return aux().run();
56  }
57 
58  Timestamp const&
59  beginTime() const
60  {
61  return aux().beginTime();
62  }
63  Timestamp const&
64  endTime() const
65  {
66  return aux().endTime();
67  }
68 
69  void
71  {
72  aux_.setEndTime(time);
73  }
74 
76  branchType() const override
77  {
78  return branch_type;
79  }
80 
81  void fillGroup(BranchDescription const&) override;
82 
83  void put(std::unique_ptr<EDProduct>&&,
84  BranchDescription const&,
85  std::unique_ptr<ProductProvenance const>&&,
86  RangeSet&&);
87 
88  RangeSet
89  seenRanges() const override
90  {
91  return seenRangeSet_;
92  }
93  void
95  {
96  seenRangeSet_ = rs;
97  }
98  RangeSetHandler const& rangeSetHandler() const;
100 
101  bool
102  parentageEnabled() const override
103  {
104  return parentageEnabled_;
105  }
106 
107  bool
108  rangesEnabled() const override
109  {
110  return rangesEnabled_;
111  }
112 
113  private:
114  ProcessHistoryID const& processHistoryID() const override;
115  void setProcessHistoryID(ProcessHistoryID const&) override;
116 
119  bool const parentageEnabled_{true};
120  bool const rangesEnabled_{true};
121  };
122 
123 } // namespace art
124 
125 // Local Variables:
126 // mode: c++
127 // End:
128 #endif /* art_Framework_Principal_RunPrincipal_h */
static constexpr BranchType branch_type
Definition: RunPrincipal.h:31
RunID const & id() const
Definition: RunAuxiliary.h:51
void put(std::unique_ptr< EDProduct > &&, BranchDescription const &, std::unique_ptr< ProductProvenance const > &&, RangeSet &&)
Timestamp const & endTime() const
Definition: RunPrincipal.h:64
Timestamp const & beginTime() const
Definition: RunPrincipal.h:59
bool rangesEnabled() const override
Definition: RunPrincipal.h:108
RunAuxiliary aux_
Definition: RunPrincipal.h:117
bool parentageEnabled() const override
Definition: RunPrincipal.h:102
static RangeSet invalid()
Timestamp const & endTime() const
Definition: RunAuxiliary.h:63
ProcessHistoryID const & processHistoryID() const override
RunNumber_t run() const
Definition: RunPrincipal.h:53
RangeSetHandler const & rangeSetHandler() const
RunPrincipal(RunAuxiliary 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 >())
bool const rangesEnabled_
Definition: RunPrincipal.h:120
RangeSet seenRanges() const override
Definition: RunPrincipal.h:89
RunNumber_t run() const
Definition: RunAuxiliary.h:74
void setEndTime(Timestamp const &time)
Definition: RunPrincipal.h:70
BranchType branchType() const override
Definition: RunPrincipal.h:76
void setProcessHistoryID(ProcessHistoryID const &) override
RangeSet seenRangeSet_
Definition: RunPrincipal.h:118
void setEndTime(Timestamp const &time)
Definition: RunAuxiliary.h:80
RunID const & id() const
Definition: RunPrincipal.h:48
bool const parentageEnabled_
Definition: RunPrincipal.h:119
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:43
BranchType
Definition: BranchType.h:18
void fillGroup(BranchDescription const &) override
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
Timestamp const & beginTime() const
Definition: RunAuxiliary.h:57
void updateSeenRanges(RangeSet const &rs)
Definition: RunPrincipal.h:94
static constexpr BranchType branch_type
Definition: RunAuxiliary.h:20
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:119