1 #ifndef FWCore_Framework_ThinningProducer_h
2 #define FWCore_Framework_ThinningProducer_h
29 template <
typename Collection,
typename Selector>
50 template <
typename Collection,
typename Selector>
60 template <
typename Collection,
typename Selector>
63 template <
typename Collection,
typename Selector>
66 desc.
setComment(
"Produces thinned collections and associations to them");
68 Selector::fillDescription(desc);
72 template <
typename Collection,
typename Selector>
79 Collection thinnedCollection;
82 unsigned int iIndex = 0;
84 if (selector_->choose(iIndex, *iter)) {
93 event.emplace(thinnedOutToken_,
std::move(thinnedAssociation));
96 template <
typename Collection,
typename Selector>
113 std::vector<BranchID> parentCollectionIDs;
116 for (
auto const& product : productList) {
121 thinnedCollectionID = desc.
branchID();
124 if (inputTag_.willSkipCurrentProcess()) {
126 parentCollectionIDs.push_back(desc.
branchID());
128 }
else if (inputTag_.process().empty() || inputTag_.process() == desc.
processName()) {
132 parentCollectionIDs.push_back(desc.
branchID());
142 if (parentCollectionIDs.empty()) {
148 for (
auto const& parentCollectionID : parentCollectionIDs) {
149 thinnedAssociationsHelper.
addAssociation(parentCollectionID, associationID, thinnedCollectionID);