Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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/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::EDProducer
33
{
34
public
:
35
explicit
EmptyHepMCProducer
(
const
edm::ParameterSet
&);
36
~EmptyHepMCProducer
() {};
37
38
private
:
39
virtual
void
beginJob
()
override
;
40
virtual
void
produce
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
41
virtual
void
endJob
()
override
;
42
43
};
44
45
46
47
EmptyHepMCProducer::EmptyHepMCProducer
(
const
edm::ParameterSet
& iConfig)
48
{
49
produces<edm::HepMCProduct>();
50
}
51
52
void
53
EmptyHepMCProducer::produce
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
54
{
55
// create an empty output collection
56
std::auto_ptr<edm::HepMCProduct> theOutput(
new
edm::HepMCProduct
());
57
//theOutput->addHepMCData(theEvent);
58
iEvent.
put
(theOutput);
59
}
60
61
void
EmptyHepMCProducer::beginJob
() {}
62
63
void
EmptyHepMCProducer::endJob
() {}
64
65
//define this as a plug-in
66
DEFINE_FWK_MODULE
(
EmptyHepMCProducer
);
EmptyHepMCProducer::beginJob
virtual void beginJob() override
Definition:
EmptyHepMCProducer.cc:61
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:53
Frameworkfwd.h
edm::EDProducer
Definition:
EDProducer.h:35
ParameterSet.h
iEvent
int iEvent
Definition:
GenABIO.cc:230
edm::Event::put
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition:
Event.h:113
EmptyHepMCProducer::EmptyHepMCProducer
EmptyHepMCProducer(const edm::ParameterSet &)
Definition:
EmptyHepMCProducer.cc:47
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:44
HepMCProduct.h
EDProducer.h
EmptyHepMCProducer
Definition:
EmptyHepMCProducer.cc:32
edm::HepMCProduct
Definition:
HepMCProduct.h:18
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::Event
Definition:
Event.h:59
EmptyHepMCProducer::endJob
virtual void endJob() override
Definition:
EmptyHepMCProducer.cc:63
Generated for CMSSW Reference Manual by
1.8.5