Main Page
Namespaces
Classes
Package Documentation
RecoEgamma
EgammaTools
interface
Utils.h
Go to the documentation of this file.
1
#ifndef RecoEgamma_EgammaTools_Utils_H
2
#define RecoEgamma_EgammaTools_Utils_H
3
4
#include "
DataFormats/Common/interface/Handle.h
"
5
#include "
DataFormats/Common/interface/ValueMap.h
"
6
#include "
FWCore/Framework/interface/Event.h
"
7
8
#include <memory>
9
#include <string>
10
#include <vector>
11
12
template
<
typename
ValueType,
class
HandleType>
13
void
writeValueMap
(
edm::Event
&
iEvent
,
14
const
edm::Handle<HandleType>
&
handle
,
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
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition:
Event.h:125
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
Event.h
edm::Handle
Definition:
AssociativeIterator.h:47
ValueMap.h
writeValueMap
void writeValueMap(edm::Event &iEvent, const edm::Handle< HandleType > &handle, const std::vector< ValueType > &values, const std::string &label)
Definition:
Utils.h:13
label
char const * label
Definition:
PFTauDecayModeTools.cc:11
iEvent
int iEvent
Definition:
GenABIO.cc:224
objects.autophobj.filler
filler
Definition:
autophobj.py:25
edm::helper::Filler
Definition:
ValueMap.h:22
cmsBatch.handle
handle
Definition:
cmsBatch.py:286
MuonErrorMatrixValues_cff.values
values
Definition:
MuonErrorMatrixValues_cff.py:6
edm::Event
Definition:
Event.h:71
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Handle.h
Generated for CMSSW Reference Manual by
1.8.11