LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
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&,
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  RunAuxiliary const&
41  aux() const
42  {
43  return aux_;
44  }
45  RunID const&
46  id() const
47  {
48  return aux().id();
49  }
51  run() const
52  {
53  return aux().run();
54  }
55 
56  Timestamp const&
57  beginTime() const
58  {
59  return aux().beginTime();
60  }
61  Timestamp const&
62  endTime() const
63  {
64  return aux().endTime();
65  }
66 
67  void
68  setEndTime(Timestamp const& time)
69  {
70  aux_.setEndTime(time);
71  }
72 
74  branchType() const override
75  {
76  return branch_type;
77  }
78 
79  void fillGroup(BranchDescription const&) override;
80 
81  void put(std::unique_ptr<EDProduct>&&,
82  BranchDescription const&,
83  std::unique_ptr<ProductProvenance const>&&,
84  RangeSet&&);
85 
86  RangeSet
87  seenRanges() const override
88  {
89  return seenRangeSet_;
90  }
91  void
93  {
94  seenRangeSet_ = rs;
95  }
96  RangeSetHandler const& rangeSetHandler() const;
98 
99  private:
100  ProcessHistoryID const& processHistoryID() const override;
101  void setProcessHistoryID(ProcessHistoryID const&) override;
102 
105  };
106 
107 } // namespace art
108 
109 // Local Variables:
110 // mode: c++
111 // End:
112 #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 &&)
Definition: RunPrincipal.cc:51
Timestamp const & endTime() const
Definition: RunPrincipal.h:62
Timestamp const & beginTime() const
Definition: RunPrincipal.h:57
RunAuxiliary aux_
Definition: RunPrincipal.h:103
ProcessHistoryID const & processHistoryID() const override
Definition: RunPrincipal.cc:32
Timestamp const & endTime() const
Definition: RunAuxiliary.h:63
RunNumber_t run() const
Definition: RunPrincipal.h:51
RangeSetHandler const & rangeSetHandler() const
RunPrincipal(RunAuxiliary 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 >())
Definition: RunPrincipal.cc:11
RangeSet seenRanges() const override
Definition: RunPrincipal.h:87
RunNumber_t run() const
Definition: RunAuxiliary.h:74
void setEndTime(Timestamp const &time)
Definition: RunPrincipal.h:68
BranchType branchType() const override
Definition: RunPrincipal.h:74
void setProcessHistoryID(ProcessHistoryID const &) override
Definition: RunPrincipal.cc:38
RangeSet seenRangeSet_
Definition: RunPrincipal.h:104
void setEndTime(Timestamp const &time)
Definition: RunAuxiliary.h:80
RunID const & id() const
Definition: RunPrincipal.h:46
static RangeSet invalid()
Definition: RangeSet.cc:46
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:41
BranchType
Definition: BranchType.h:18
void fillGroup(BranchDescription const &) override
Definition: RunPrincipal.cc:44
HLT enums.
Timestamp const & beginTime() const
Definition: RunAuxiliary.h:57
void updateSeenRanges(RangeSet const &rs)
Definition: RunPrincipal.h:92
static constexpr BranchType branch_type
Definition: RunAuxiliary.h:20
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:119