src
SimMuon
Neutron
plugins
EmptyHepMCProducer.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: SimMuon/Neutron
4
// Class: EmptyHepMCProducer
5
//
14
//
15
// Original Author: Vadim Khotilovich
16
// Created: Mon Aug 09 19:11:42 CST 2010
17
//
18
//
19
20
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
21
#include "
FWCore/Framework/interface/stream/EDProducer.h
"
22
#include "
FWCore/Framework/interface/ESHandle.h
"
23
24
#include "
FWCore/Framework/interface/Event.h
"
25
#include "
FWCore/Framework/interface/MakerMacros.h
"
26
27
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
28
29
#include "
SimDataFormats/GeneratorProducts/interface/HepMCProduct.h
"
30
31
class
EmptyHepMCProducer
:
public
edm::stream::EDProducer
<> {
32
public
:
33
explicit
EmptyHepMCProducer
(
const
edm::ParameterSet
&);
34
~EmptyHepMCProducer
()
override
{};
35
36
private
:
37
virtual
void
beginJob
();
38
void
produce
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
39
virtual
void
endJob
();
40
};
41
42
EmptyHepMCProducer::EmptyHepMCProducer
(
const
edm::ParameterSet
& iConfig) { produces<edm::HepMCProduct>(); }
43
44
void
EmptyHepMCProducer::produce
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
45
// create an empty output collection
46
std::unique_ptr<edm::HepMCProduct> theOutput(
new
edm::HepMCProduct
());
47
//theOutput->addHepMCData(theEvent);
48
iEvent
.put(
std::move
(theOutput));
49
}
50
51
void
EmptyHepMCProducer::beginJob
() {}
52
53
void
EmptyHepMCProducer::endJob
() {}
54
55
//define this as a plug-in
56
DEFINE_FWK_MODULE
(
EmptyHepMCProducer
);
EDProducer.h
Event.h
EmptyHepMCProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
EmptyHepMCProducer.cc:44
Frameworkfwd.h
ParameterSet.h
EmptyHepMCProducer::endJob
virtual void endJob()
Definition:
EmptyHepMCProducer.cc:53
iEvent
int iEvent
Definition:
GenABIO.cc:224
EmptyHepMCProducer::EmptyHepMCProducer
EmptyHepMCProducer(const edm::ParameterSet &)
Definition:
EmptyHepMCProducer.cc:42
ESHandle.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::EventSetup
Definition:
EventSetup.h:59
HepMCProduct.h
EmptyHepMCProducer::beginJob
virtual void beginJob()
Definition:
EmptyHepMCProducer.cc:51
EmptyHepMCProducer
Definition:
EmptyHepMCProducer.cc:31
edm::stream::EDProducer
Definition:
EDProducer.h:36
edm::HepMCProduct
Definition:
HepMCProduct.h:21
EmptyHepMCProducer::~EmptyHepMCProducer
~EmptyHepMCProducer() override
Definition:
EmptyHepMCProducer.cc:34
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::Event
Definition:
Event.h:73
MakerMacros.h
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Generated for CMSSW Reference Manual by
1.8.14