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
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 
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 int openNextSecondaryFile_(int idx)
std::unique_ptr< EDProduct > getProduct(BranchKey const &k, TypeID const &wrapper_type, RangeSet &rs) const
Definition: DelayedReader.h:30
virtual void setGroupFinder_(cet::exempt_ptr< EDProductGetterFinder const >)
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
int openNextSecondaryFile(int idx)
Definition: DelayedReader.h:44
virtual ~DelayedReader()