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 } // namespace art
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  ProductDescriptionsByID const& descriptions);
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:
bool selected(BranchDescription const &desc) const
GroupSelector(GroupSelectorRules const &rules, ProductDescriptionsByID const &descriptions)
std::vector< BranchDescription const * > groupsToSelect_
Definition: GroupSelector.h:40
std::ostream & operator<<(std::ostream &os, const GroupSelector &gs)
void print(std::ostream &os) const
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
std::map< ProductID, BranchDescription > ProductDescriptionsByID