File indexing completed on 2025-01-31 02:19:21
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 #include "DataFormats/Provenance/interface/ProductDescriptionFwd.h"
0014
0015 #include <iosfwd>
0016 #include <map>
0017 #include <string>
0018 #include <vector>
0019
0020 namespace edm {
0021 class ProductRegistry;
0022 class ProductSelectorRules;
0023 class ParameterSet;
0024
0025 class ProductSelector {
0026 public:
0027 ProductSelector();
0028
0029
0030 void initialize(ProductSelectorRules const& rules,
0031 std::vector<ProductDescription const*> const& productDescriptions);
0032
0033 bool selected(ProductDescription const& desc) const;
0034
0035
0036 void print(std::ostream& os) const;
0037
0038 bool initialized() const { return initialized_; }
0039
0040 static void checkForDuplicateKeptBranch(
0041 ProductDescription const& desc, std::map<BranchID, ProductDescription const*>& trueBranchIDToKeptBranchDesc);
0042
0043 static void fillDroppedToKept(ProductRegistry const& preg,
0044 std::map<BranchID, ProductDescription 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