LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
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 #include <iosfwd>
12 #include <string>
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 BranchDescription;
22  class GroupSelectorRules;
23 }
24 
25 // ----------------------------------------------------------------------
26 
28 public:
29  // N.B.: we assume there are not null pointers in the vector allBranches.
30  explicit GroupSelector(GroupSelectorRules const& rules,
31  ProductList const& branchDescriptions);
32 
33  bool selected(BranchDescription const& desc) const;
34 
35  // Printout intended for debugging purposes.
36  void print(std::ostream& os) const;
37 
38 private:
39  // Keep a sorted collection indicating which groups are to be selected.
40  std::vector<BranchDescription const*> groupsToSelect_{};
41 
42 }; // GroupSelector
43 
44 // ======================================================================
45 
46 #endif /* art_Framework_Core_GroupSelector_h */
47 
48 // Local Variables:
49 // mode: c++
50 // End:
std::ostream & operator<<(std::ostream &os, EDAnalyzer::Table< T > const &t)
Definition: EDAnalyzer.h:184
std::map< BranchKey, BranchDescription > ProductList
Definition: ProductList.h:15
bool selected(BranchDescription const &desc) const
void print(std::ostream &os) const
std::vector< BranchDescription const * > groupsToSelect_
Definition: GroupSelector.h:40
GroupSelector(GroupSelectorRules const &rules, ProductList const &branchDescriptions)
HLT enums.