89 if (nLabels == 0) ++nLabels;
94 if (inputLabels.empty())
95 inputLabels.push_back(
"tagInfo");
96 std::string message(
"VInputTag size mismatch - the following taginfo " 97 "labels are needed:\n");
98 for(vector<string>::const_iterator iter = inputLabels.begin();
99 iter != inputLabels.end(); ++iter)
100 message +=
"\"" + *iter +
"\"\n";
108 typedef vector<const BaseTagInfo*> TagInfoPtrs;
110 typedef map<JetRef, TagInfoPtrs, JetRefCompare> JetToTagInfoMap;
112 JetToTagInfoMap jetToTagInfos;
115 vector< Handle< View<BaseTagInfo> > > tagInfoHandles(
nTagInfos);
121 iter != tagInfoHandle->end(); iter++) {
122 TagInfoPtrs &
tagInfos = jetToTagInfos[iter->jet()];
123 if (tagInfos.empty())
124 tagInfos.resize(nTagInfos);
126 tagInfos[
i] = &*iter;
132 std::unique_ptr<JetTagCollection> jetTagCollection;
133 if (!tagInfoHandle.
product()->empty()) {
137 jetTagCollection = std::make_unique<JetTagCollection>();
140 for(JetToTagInfoMap::const_iterator iter = jetToTagInfos.begin();
141 iter != jetToTagInfos.end(); iter++) {
142 const TagInfoPtrs &tagInfoPtrs = iter->second;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string m_jetTagComputer
edm::Ref< JetBxCollection > JetRef
const std::vector< std::string > & getInputLabels() const
std::vector< edm::EDGetTokenT< edm::View< reco::BaseTagInfo > > > token_tagInfos
T const * product() const
edm::ESWatcher< JetTagComputerRecord > recordWatcher_
bool check(const edm::EventSetup &iSetup)
RefToBaseProd< T > makeRefToBaseProdFrom(RefToBase< T > const &iRef, Event const &iEvent)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator