Main Page
Namespaces
Classes
Package Documentation
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
32
class
EmptyHepMCProducer
:
public
edm::stream::EDProducer
<>
33
{
34
public
:
35
explicit
EmptyHepMCProducer
(
const
edm::ParameterSet
&);
36
~EmptyHepMCProducer
() {};
37
38
private
:
39
virtual
void
beginJob
();
40
virtual
void
produce
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
41
virtual
void
endJob
();
42
43
};
44
45
EmptyHepMCProducer::EmptyHepMCProducer
(
const
edm::ParameterSet
& iConfig)
46
{
47
produces<edm::HepMCProduct>();
48
}
49
50
void
51
EmptyHepMCProducer::produce
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
52
{
53
// create an empty output collection
54
std::unique_ptr<edm::HepMCProduct> theOutput(
new
edm::HepMCProduct
());
55
//theOutput->addHepMCData(theEvent);
56
iEvent.
put
(
std::move
(theOutput));
57
}
58
59
void
EmptyHepMCProducer::beginJob
() {}
60
61
void
EmptyHepMCProducer::endJob
() {}
62
63
//define this as a plug-in
64
DEFINE_FWK_MODULE
(
EmptyHepMCProducer
);
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition:
Event.h:122
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
MakerMacros.h
EmptyHepMCProducer::~EmptyHepMCProducer
~EmptyHepMCProducer()
Definition:
EmptyHepMCProducer.cc:36
EmptyHepMCProducer::produce
virtual void produce(edm::Event &, const edm::EventSetup &) override
Definition:
EmptyHepMCProducer.cc:51
Frameworkfwd.h
ParameterSet.h
EmptyHepMCProducer::endJob
virtual void endJob()
Definition:
EmptyHepMCProducer.cc:61
EDProducer.h
iEvent
int iEvent
Definition:
GenABIO.cc:230
EmptyHepMCProducer::EmptyHepMCProducer
EmptyHepMCProducer(const edm::ParameterSet &)
Definition:
EmptyHepMCProducer.cc:45
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:44
HepMCProduct.h
EmptyHepMCProducer::beginJob
virtual void beginJob()
Definition:
EmptyHepMCProducer.cc:59
EmptyHepMCProducer
Definition:
EmptyHepMCProducer.cc:32
edm::stream::EDProducer
Definition:
EDProducer.h:33
edm::HepMCProduct
Definition:
HepMCProduct.h:18
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::Event
Definition:
Event.h:66
eostools.move
def move(src, dest)
Definition:
eostools.py:510
Generated for CMSSW Reference Manual by
1.8.11