CMS 3D CMS Logo

Utils.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_EgammaTools_Utils_H
2 #define RecoEgamma_EgammaTools_Utils_H
3 
7 
8 #include <memory>
9 #include <string>
10 #include <vector>
11 
12 template<typename ValueType, class HandleType>
15  const std::vector<ValueType>& values,
16  const std::string& label)
17 {
18  auto valMap = std::make_unique<edm::ValueMap<ValueType>>();
19  typename edm::ValueMap<ValueType>::Filler filler(*valMap);
20  filler.insert(handle, values.begin(), values.end());
21  filler.fill();
22  iEvent.put(std::move(valMap),label);
23 }
24 
25 #endif
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
void writeValueMap(edm::Event &iEvent, const edm::Handle< HandleType > &handle, const std::vector< ValueType > &values, const std::string &label)
Definition: Utils.h:13
char const * label
int iEvent
Definition: GenABIO.cc:224
def move(src, dest)
Definition: eostools.py:511