1 #ifndef FWCore_Framework_ThinningProducer_h 2 #define FWCore_Framework_ThinningProducer_h 29 template <
typename Collection,
typename Selector>
49 template <
typename Collection,
typename Selector>
61 template <
typename Collection,
typename Selector>
65 template <
typename Collection,
typename Selector>
69 desc.
setComment(
"Produces thinned collections and associations to them");
71 Selector::fillDescription(desc);
75 template <
typename Collection,
typename Selector>
83 selector_->preChoose(inputCollection, constEvent, eventSetup);
85 Collection thinnedCollection;
88 unsigned int iIndex = 0;
89 for(
auto iter = inputCollection->begin(), iterEnd = inputCollection->end();
90 iter != iterEnd; ++iter, ++iIndex) {
103 template <
typename Collection,
typename Selector>
122 std::vector<BranchID> parentCollectionIDs;
125 for(
auto const& product : productList) {
129 desc.
moduleLabel() == moduleDescription().moduleLabel() &&
132 thinnedCollectionID = desc.
branchID();
138 parentCollectionIDs.push_back(desc.
branchID());
144 parentCollectionIDs.push_back(desc.
branchID());
151 desc.
moduleLabel() == moduleDescription().moduleLabel() &&
157 if(parentCollectionIDs.empty()) {
163 for(
auto const& parentCollectionID : parentCollectionIDs) {
164 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)