File indexing completed on 2024-04-06 12:12:05
0001 #ifndef FWCore_Framework_ProductSelector_h
0002 #define FWCore_Framework_ProductSelector_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "DataFormats/Provenance/interface/BranchID.h"
0013
0014 #include <iosfwd>
0015 #include <map>
0016 #include <string>
0017 #include <vector>
0018
0019 namespace edm {
0020 class BranchDescription;
0021 class BranchID;
0022 class ProductRegistry;
0023 class ProductSelectorRules;
0024 class ParameterSet;
0025
0026 class ProductSelector {
0027 public:
0028 ProductSelector();
0029
0030
0031 void initialize(ProductSelectorRules const& rules, std::vector<BranchDescription const*> const& branchDescriptions);
0032
0033 bool selected(BranchDescription const& desc) const;
0034
0035
0036 void print(std::ostream& os) const;
0037
0038 bool initialized() const { return initialized_; }
0039
0040 static void checkForDuplicateKeptBranch(BranchDescription const& desc,
0041 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc);
0042
0043 static void fillDroppedToKept(ProductRegistry const& preg,
0044 std::map<BranchID, BranchDescription const*> const& trueBranchIDToKeptBranchDesc,
0045 std::map<BranchID::value_type, BranchID::value_type>& droppedBranchIDToKeptBranchID_);
0046
0047 private:
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057 std::vector<std::string> productsToSelect_;
0058 bool initialized_;
0059 };
0060
0061 std::ostream& operator<<(std::ostream& os, const ProductSelector& gs);
0062
0063 }
0064
0065 #endif