SubRun.h
Go to the documentation of this file.
1 #ifndef art_Framework_Principal_SubRun_h
2 #define art_Framework_Principal_SubRun_h
3 // vim: set sw=2 expandtab :
4 
5 //
6 // This is the primary interface for accessing per subRun
7 // EDProducts and inserting new derived per subRun EDProducts.
8 //
9 // For its usage, see "art/Framework/Principal/DataViewImpl.h"
10 //
11 
16 
17 #include <memory>
18 
19 namespace art {
20 
21  class SubRun final : private DataViewImpl {
22  public:
23  ~SubRun();
24 
25  explicit SubRun(SubRunPrincipal const& srp,
26  ModuleContext const& mc,
27  RangeSet const& rs = RangeSet::invalid());
28 
29  SubRun(SubRun const&) = delete;
30  SubRun(SubRun&&) = delete;
31  SubRun& operator=(SubRun const&) = delete;
32  SubRun& operator=(SubRun&&) = delete;
33 
34  SubRunID id() const;
37  using DataViewImpl::run;
39 
47  using DataViewImpl::put;
48 
49  Run const& getRun() const;
52 
56 
57  // Obsolete interface (will be deprecated)
58  using DataViewImpl::get;
63 
65 
66  private:
67  std::unique_ptr<Run const> const run_;
68  };
69 
70 } // namespace art
71 
72 #endif /* art_Framework_Principal_SubRun_h */
73 
74 // Local Variables:
75 // mode: c++
76 // End:
PROD const * getPointerByLabel(InputTag const &tag) const
Definition: DataViewImpl.h:651
ProductID getProductID(std::string const &instance_name="") const
Definition: DataViewImpl.h:338
Handle< PROD > getHandle(SelectorBase const &) const
Definition: DataViewImpl.h:382
ProcessHistory const & processHistory() const
bool get(SelectorBase const &, Handle< PROD > &result) const
Definition: DataViewImpl.h:606
Timestamp const & endTime() const
Definition: DataViewImpl.cc:99
std::unique_ptr< Run const > const run_
Definition: SubRun.h:67
void movePutProductsToPrincipal(Principal &principal)
Definition: Run.h:17
std::vector< InputTag > getInputTags(SelectorBase const &selector=MatchAllSelector{}) const
Definition: DataViewImpl.h:457
std::vector< ProductToken< PROD > > getProductTokens(SelectorBase const &selector=MatchAllSelector{}) const
Definition: DataViewImpl.h:466
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Definition: DataViewImpl.h:633
Run const & getRun() const
Definition: SubRun.cc:27
std::vector< Handle< PROD > > getMany(SelectorBase const &selector=MatchAllSelector{}) const
Definition: DataViewImpl.h:479
EDProductGetter const * productGetter(ProductID const pid) const
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Definition: DataViewImpl.h:441
void getManyByType(std::vector< Handle< PROD >> &results) const
Definition: DataViewImpl.h:677
SubRunNumber_t subRun() const
Definition: DataViewImpl.cc:78
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
cet::exempt_ptr< BranchDescription const > getProductDescription(ProductID) const
RunNumber_t run() const
Definition: DataViewImpl.cc:71
bool removeCachedProduct(Handle< PROD > &) const
Definition: DataViewImpl.h:927
SubRunID id() const
Definition: SubRun.cc:21
static RangeSet invalid()
Definition: RangeSet.cc:45
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName, std::vector< ELEMENT const * > &result) const
Definition: DataViewImpl.h:500
SubRun(SubRunPrincipal const &srp, ModuleContext const &mc, RangeSet const &rs=RangeSet::invalid())
Definition: SubRun.cc:12
bool getByToken(ProductToken< PROD > const &token, Handle< PROD > &result) const
Definition: DataViewImpl.h:660
PROD const & getProduct(InputTag const &tag) const
Definition: DataViewImpl.h:367
Timestamp const & beginTime() const
Definition: DataViewImpl.cc:92
SubRun & operator=(SubRun const &)=delete