RecoLocalCalo
EcalRecProducers
plugins
EcalCompactTrigPrimProducer.cc
Go to the documentation of this file.
1
10
#include "
RecoLocalCalo/EcalRecProducers/plugins/EcalCompactTrigPrimProducer.h
"
11
12
EcalCompactTrigPrimProducer::EcalCompactTrigPrimProducer
(
const
edm::ParameterSet
& ps)
13
: outCollection_(ps.getParameter<
std
::
string
>(
"outColl"
)) {
14
inCollectionToken_
= consumes<EcalTrigPrimDigiCollection>((ps.
getParameter
<
edm::InputTag
>(
"inColl"
)));
15
produces<EcalTrigPrimCompactColl>(
outCollection_
);
16
}
17
18
void
EcalCompactTrigPrimProducer::produce
(
edm::Event
&
event
,
const
edm::EventSetup
& es) {
19
auto
outColl
= std::make_unique<EcalTrigPrimCompactColl>();
20
edm::Handle<EcalTrigPrimDigiCollection>
hTPDigis;
21
event
.getByToken(
inCollectionToken_
, hTPDigis);
22
23
const
EcalTrigPrimDigiCollection
* trigPrims = hTPDigis.
product
();
24
25
for
(
EcalTrigPrimDigiCollection::const_iterator
trigPrim = trigPrims->
begin
(); trigPrim != trigPrims->
end
();
26
++trigPrim) {
27
outColl
->setValue(
28
trigPrim->id().ieta(), trigPrim->id().iphi(), trigPrim->sample(trigPrim->sampleOfInterest()).raw());
29
}
30
event
.put(
std::move
(
outColl
),
outCollection_
);
31
}
EcalCompactTrigPrimProducer::EcalCompactTrigPrimProducer
EcalCompactTrigPrimProducer(const edm::ParameterSet &ps)
Definition:
EcalCompactTrigPrimProducer.cc:12
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition:
SortedCollection.h:80
edm::Handle::product
T const * product() const
Definition:
Handle.h:70
ecalCompactTrigPrim_cfi.outColl
outColl
Definition:
ecalCompactTrigPrim_cfi.py:6
EcalCompactTrigPrimProducer::inCollectionToken_
edm::EDGetTokenT< EcalTrigPrimDigiCollection > inCollectionToken_
Definition:
EcalCompactTrigPrimProducer.h:24
edm::SortedCollection
Definition:
SortedCollection.h:49
edm::Handle
Definition:
AssociativeIterator.h:50
edm::SortedCollection::begin
const_iterator begin() const
Definition:
SortedCollection.h:262
EcalCompactTrigPrimProducer::produce
void produce(edm::Event &evt, const edm::EventSetup &es) override
Definition:
EcalCompactTrigPrimProducer.cc:18
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::SortedCollection::end
const_iterator end() const
Definition:
SortedCollection.h:267
EcalCompactTrigPrimProducer::outCollection_
std::string outCollection_
Definition:
EcalCompactTrigPrimProducer.h:29
edm::EventSetup
Definition:
EventSetup.h:58
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
EcalCompactTrigPrimProducer.h
eostools.move
def move(src, dest)
Definition:
eostools.py:511
std
Definition:
JetResolutionObject.h:76
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
event
Definition:
event.py:1
edm::Event
Definition:
Event.h:73
edm::InputTag
Definition:
InputTag.h:15
Generated for CMSSW Reference Manual by
1.8.16