GroupSelector.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_GroupSelector_h
2 #define art_Framework_Core_GroupSelector_h
3 
4 // ======================================================================
5 //
6 // Class GroupSelector. Class for user to select specific groups in event.
7 //
8 // ======================================================================
9 
11 
12 #include <iosfwd>
13 #include <vector>
14 
15 namespace art {
16  // defined herein:
17  class GroupSelector;
18  std::ostream& operator<<(std::ostream& os, const GroupSelector& gs);
19 
20  // used herein:
21  class GroupSelectorRules;
22 } // namespace art
23 
24 // ----------------------------------------------------------------------
25 
27 public:
28  // N.B.: we assume there are not null pointers in the vector allBranches.
29  explicit GroupSelector(GroupSelectorRules const& rules,
30  ProductDescriptionsByID const& descriptions);
31 
32  bool selected(BranchDescription const& desc) const;
33 
34  // Printout intended for debugging purposes.
35  void print(std::ostream& os) const;
36 
37 private:
38  // Keep a sorted collection indicating which groups are to be selected.
39  std::vector<BranchDescription const*> groupsToSelect_{};
40 
41 }; // GroupSelector
42 
43 // ======================================================================
44 
45 #endif /* art_Framework_Core_GroupSelector_h */
46 
47 // Local Variables:
48 // mode: c++
49 // End:
bool selected(BranchDescription const &desc) const
void print(std::ostream &os) const
GroupSelector(GroupSelectorRules const &rules, ProductDescriptionsByID const &descriptions)
std::ostream & operator<<(std::ostream &os, const GroupSelector &gs)
std::vector< BranchDescription const * > groupsToSelect_
Definition: GroupSelector.h:39
std::map< ProductID, BranchDescription > ProductDescriptionsByID