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;
96 template <
typename Collection,
typename Selector>
113 std::vector<BranchID> parentCollectionIDs;
116 for (
auto const& product : productList) {
121 thinnedCollectionID = desc.
branchID();
126 parentCollectionIDs.push_back(desc.
branchID());
132 parentCollectionIDs.push_back(desc.
branchID());
142 if (parentCollectionIDs.empty()) {
148 for (
auto const& parentCollectionID : parentCollectionIDs) {
149 thinnedAssociationsHelper.
addAssociation(parentCollectionID, associationID, thinnedCollectionID);
T getParameter(std::string const &) const
void addAssociation(BranchID const &, BranchID const &, BranchID const &)
void setThinnedCollectionID(ProductID const &v)
std::map< BranchKey, BranchDescription > ProductList
std::string const & processName() const
edm::propagate_const< std::unique_ptr< Selector > > selector_
edm::EDPutTokenT< Collection > outputToken_
ProductList const & productList() const
void setComment(std::string const &value)
void addDefault(ParameterSetDescription const &psetDescription)
std::string const & moduleLabel() const
virtual ~ThinningProducer()
std::string const & productInstanceName() const
ThinningProducer(ParameterSet const &pset)
edm::EDGetTokenT< Collection > inputToken_
edm::EDPutTokenT< ThinnedAssociation > thinnedOutToken_
virtual void produce(Event &event, EventSetup const &eventSetup) override
BranchID const & branchID() const
TypeWithDict const & unwrappedType() const
std::type_info const & typeInfo() const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
Functor that operates on <T>
void push_back(unsigned int index)
virtual void registerThinnedAssociations(ProductRegistry const &productRegistry, ThinnedAssociationsHelper &thinnedAssociationsHelper) override
void setParentCollectionID(ProductID const &v)
BranchID const & originalBranchID() const
static void fillDescriptions(ConfigurationDescriptions &descriptions)