BranchMapReader.h
Go to the documentation of this file.
1 #ifndef gallery_BranchMapReader_h
2 #define gallery_BranchMapReader_h
3 
4 // BranchMapReader can find the BranchDescription corresponding to a
5 // ProductID.
6 
7 // BranchMapReader also maintains a set of all ProductIDs associated
8 // with branches in the Event and seen in all input files opened so
9 // far.
10 
14 #include "canvas/Utilities/fwd.h"
15 #include "cetlib/exempt_ptr.h"
16 
17 #include <map>
18 #include <memory>
19 #include <set>
20 
21 class TFile;
22 
23 namespace gallery {
24 
25  class InfoForTypeLabelInstance;
26 
28  public:
29  void updateFile(TFile* tFile);
30 
33  std::string const& process) const;
34 
36  art::TypeID const& type,
37  std::string const& label,
38  std::string const& instance,
39  std::string const& process) const;
40 
42  art::ProductID const pid) const;
43 
44  std::map<art::ProductID, art::BranchDescription> const&
45  productDescriptions() const;
46 
48 
50 
51  private:
52  std::unique_ptr<art::BranchIDLists> branchIDLists_{
53  nullptr}; // Only for backwards compatibility
54  std::map<art::ProductID, art::BranchDescription>
56  std::set<art::ProductID> allSeenProductIDs_{};
57  };
58 } // namespace gallery
59 #endif /* gallery_BranchMapReader_h */
60 
61 // Local Variables:
62 // mode: c++
63 // End:
art::BranchDescription const * productDescription(InfoForTypeLabelInstance const &info, std::string const &process) const
std::string string
Definition: nybbler.cc:12
const std::string instance
std::map< art::ProductID, art::BranchDescription > productIDToDescriptionMap_
def process(f, kind)
Definition: search.py:254
std::map< art::ProductID, art::BranchDescription > const & productDescriptions() const
void updateFile(TFile *tFile)
bool branchInRegistryOfAnyOpenedFile(art::ProductID const &) const
std::unique_ptr< art::BranchIDLists > branchIDLists_
cet::exempt_ptr< art::BranchIDLists const > branchIDLists() const
std::set< art::ProductID > allSeenProductIDs_