src
SimMuon
Neutron
src
EDMNeutronWriter.cc
Go to the documentation of this file.
1
#include "
SimMuon/Neutron/src/EDMNeutronWriter.h
"
2
3
#include <memory>
4
5
#include "
FWCore/Framework/interface/Event.h
"
6
7
EDMNeutronWriter::EDMNeutronWriter
() : theEvent(nullptr),
theHits
(nullptr) {}
8
9
EDMNeutronWriter::~EDMNeutronWriter
() {}
10
11
void
EDMNeutronWriter::writeCluster
(
int
detType,
const
edm::PSimHitContainer
&
simHits
) {
12
theHits
->insert(
theHits
->end(),
simHits
.begin(),
simHits
.end());
13
}
14
15
void
EDMNeutronWriter::beginEvent
(
edm::Event
&
e
,
const
edm::EventSetup
& es) {
16
theEvent
= &
e
;
17
theHits
= std::make_unique<edm::PSimHitContainer>();
18
}
19
20
void
EDMNeutronWriter::endEvent
() {
theEvent
->
put
(
std::move
(
theHits
)); }
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition:
Event.h:133
Event.h
EDMNeutronWriter::~EDMNeutronWriter
~EDMNeutronWriter() override
Definition:
EDMNeutronWriter.cc:9
EDMNeutronWriter::beginEvent
void beginEvent(edm::Event &e, const edm::EventSetup &es) override
Definition:
EDMNeutronWriter.cc:15
EDMNeutronWriter::theHits
std::unique_ptr< edm::PSimHitContainer > theHits
Definition:
EDMNeutronWriter.h:22
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
EDMNeutronWriter::EDMNeutronWriter
EDMNeutronWriter()
Definition:
EDMNeutronWriter.cc:7
bscTrigger_cfi.theHits
theHits
Definition:
bscTrigger_cfi.py:18
edm::EventSetup
Definition:
EventSetup.h:59
EDMNeutronWriter::endEvent
void endEvent() override
Definition:
EDMNeutronWriter.cc:20
EDMNeutronWriter::theEvent
edm::Event * theEvent
Definition:
EDMNeutronWriter.h:21
EDMNeutronWriter::writeCluster
void writeCluster(int detType, const edm::PSimHitContainer &simHits) override
writes out a list of SimHits.
Definition:
EDMNeutronWriter.cc:11
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition:
PSimHitContainer.h:11
edm::Event
Definition:
Event.h:73
FastTrackerRecHitCombiner_cfi.simHits
simHits
Definition:
FastTrackerRecHitCombiner_cfi.py:5
EDMNeutronWriter.h
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Generated for CMSSW Reference Manual by
1.8.14