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
);
ESHandle.h
EmptyHepMCProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
EmptyHepMCProducer.cc:44
EDProducer.h
EmptyHepMCProducer::~EmptyHepMCProducer
~EmptyHepMCProducer() override
Definition:
EmptyHepMCProducer.cc:34
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
EmptyHepMCProducer::endJob
virtual void endJob()
Definition:
EmptyHepMCProducer.cc:53
EmptyHepMCProducer::EmptyHepMCProducer
EmptyHepMCProducer(const edm::ParameterSet &)
Definition:
EmptyHepMCProducer.cc:42
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::stream::EDProducer
Definition:
EDProducer.h:36
edm::EventSetup
Definition:
EventSetup.h:58
EmptyHepMCProducer::beginJob
virtual void beginJob()
Definition:
EmptyHepMCProducer.cc:51
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Frameworkfwd.h
edm::HepMCProduct
Definition:
HepMCProduct.h:21
ParameterSet.h
HepMCProduct.h
edm::Event
Definition:
Event.h:73
EmptyHepMCProducer
Definition:
EmptyHepMCProducer.cc:31
Generated for CMSSW Reference Manual by
1.8.16