LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
DelayedReader.h
Go to the documentation of this file.
1 #ifndef art_Persistency_Common_DelayedReader_h
2 #define art_Persistency_Common_DelayedReader_h
3 // vim: set sw=2:
4 
5 //
6 // DelayedReader
7 //
8 // Abstract interface used by EventPrincipal to request
9 // input sources to retrieve EDProducts from external storage.
10 //
11 
12 #include "art/Utilities/fwd.h"
14 #include "cetlib/exempt_ptr.h"
15 
16 #include <memory>
17 
18 namespace art {
19 
20  struct BranchKey;
21  class EDProductGetterFinder;
22  class RangeSet;
23 
24  class DelayedReader {
25 
26  public:
27  virtual ~DelayedReader();
28 
29  std::unique_ptr<EDProduct>
31  TypeID const& wrapper_type,
32  RangeSet& rs) const
33  {
34  return getProduct_(k, wrapper_type, rs);
35  }
36 
37  void
38  setGroupFinder(cet::exempt_ptr<EDProductGetterFinder const> ep)
39  {
40  setGroupFinder_(ep);
41  }
42 
43  int
45  {
46  return openNextSecondaryFile_(idx);
47  }
48 
49  private:
50  virtual std::unique_ptr<EDProduct> getProduct_(BranchKey const&,
51  TypeID const&,
52  RangeSet&) const = 0;
53 
54  virtual void setGroupFinder_(cet::exempt_ptr<EDProductGetterFinder const>);
55 
56  virtual int openNextSecondaryFile_(int idx);
57  };
58 
59 } // namespace art
60 
61 // Local Variables:
62 // mode: c++
63 // End:
64 #endif /* art_Persistency_Common_DelayedReader_h */
void setGroupFinder(cet::exempt_ptr< EDProductGetterFinder const > ep)
Definition: DelayedReader.h:38
virtual std::unique_ptr< EDProduct > getProduct_(BranchKey const &, TypeID const &, RangeSet &) const =0
virtual ~DelayedReader()
Definition: DelayedReader.cc:7
virtual void setGroupFinder_(cet::exempt_ptr< EDProductGetterFinder const >)
std::unique_ptr< EDProduct > getProduct(BranchKey const &k, TypeID const &wrapper_type, RangeSet &rs) const
Definition: DelayedReader.h:30
virtual int openNextSecondaryFile_(int idx)
HLT enums.
int openNextSecondaryFile(int idx)
Definition: DelayedReader.h:44