CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GroupSelector.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_GroupSelector_h
2 #define FWCore_Framework_GroupSelector_h
3 
5 //
6 // Class GroupSelector. Class for user to select specific groups in event.
7 //
8 // Author: Bill Tanenbaum, Marc Paterno
9 //
11 
12 #include <iosfwd>
13 #include <string>
14 #include <vector>
15 
16 namespace edm {
17  class BranchDescription;
18  class GroupSelectorRules;
19  class ParameterSet;
20 
21  class GroupSelector {
22  public:
23  GroupSelector();
24 
25  // N.B.: we assume there are not null pointers in the vector allBranches.
27  std::vector<BranchDescription const*> const& branchDescriptions);
28 
29  bool selected(BranchDescription const& desc) const;
30 
31  // Printout intended for debugging purposes.
32  void print(std::ostream& os) const;
33 
34  bool initialized() const {return initialized_;}
35 
36  private:
37 
38  // We keep a sorted collection of branch names, indicating the
39  // groups which are to be selected.
40 
41  // TODO: See if we can keep pointer to (const) BranchDescriptions,
42  // so that we can do pointer comparison rather than string
43  // comparison. This will work if the BranchDescription we are
44  // given in the 'selected' member function is one of the instances
45  // that are managed by the ProductRegistry used to initialize the
46  // entity that contains this GroupSelector.
47  std::vector<std::string> groupsToSelect_;
49  };
50 
51  std::ostream&
52  operator<< (std::ostream& os, const GroupSelector& gs);
53 
54 } // namespace edm
55 
56 
57 
58 #endif
bool initialized() const
Definition: GroupSelector.h:34
std::vector< std::string > groupsToSelect_
Definition: GroupSelector.h:47
void print(std::ostream &os) const
bool selected(BranchDescription const &desc) const
void initialize(GroupSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.