Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
// $Id: EmptyHepMCProducer.cc,v 1.1 2010/08/20 00:28:11 khotilov Exp $
18
//
19
//
20
21
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
22
#include "
FWCore/Framework/interface/EDProducer.h
"
23
#include "
FWCore/Framework/interface/ESHandle.h
"
24
25
#include "
FWCore/Framework/interface/Event.h
"
26
#include "
FWCore/Framework/interface/MakerMacros.h
"
27
28
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
29
30
#include "
SimDataFormats/GeneratorProducts/interface/HepMCProduct.h
"
31
32
33
class
EmptyHepMCProducer
:
public
edm::EDProducer
34
{
35
public
:
36
explicit
EmptyHepMCProducer
(
const
edm::ParameterSet
&);
37
~EmptyHepMCProducer
() {};
38
39
private
:
40
virtual
void
beginJob
();
41
virtual
void
produce
(
edm::Event
&,
const
edm::EventSetup
&);
42
virtual
void
endJob
();
43
44
};
45
46
47
48
EmptyHepMCProducer::EmptyHepMCProducer
(
const
edm::ParameterSet
& iConfig)
49
{
50
produces<edm::HepMCProduct>();
51
}
52
53
void
54
EmptyHepMCProducer::produce
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
55
{
56
// create an empty output collection
57
std::auto_ptr<edm::HepMCProduct> theOutput(
new
edm::HepMCProduct
());
58
//theOutput->addHepMCData(theEvent);
59
iEvent.
put
(theOutput);
60
}
61
62
void
EmptyHepMCProducer::beginJob
() {}
63
64
void
EmptyHepMCProducer::endJob
() {}
65
66
//define this as a plug-in
67
DEFINE_FWK_MODULE
(
EmptyHepMCProducer
);
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
MakerMacros.h
EmptyHepMCProducer::~EmptyHepMCProducer
~EmptyHepMCProducer()
Definition:
EmptyHepMCProducer.cc:37
Frameworkfwd.h
edm::EDProducer
Definition:
EDProducer.h:22
ParameterSet.h
EmptyHepMCProducer::endJob
virtual void endJob()
Definition:
EmptyHepMCProducer.cc:64
iEvent
int iEvent
Definition:
GenABIO.cc:243
edm::Event::put
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition:
Event.h:94
EmptyHepMCProducer::EmptyHepMCProducer
EmptyHepMCProducer(const edm::ParameterSet &)
Definition:
EmptyHepMCProducer.cc:48
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:44
HepMCProduct.h
EmptyHepMCProducer::beginJob
virtual void beginJob()
Definition:
EmptyHepMCProducer.cc:62
EDProducer.h
EmptyHepMCProducer
Definition:
EmptyHepMCProducer.cc:33
EmptyHepMCProducer::produce
virtual void produce(edm::Event &, const edm::EventSetup &)
Definition:
EmptyHepMCProducer.cc:54
edm::HepMCProduct
Definition:
HepMCProduct.h:18
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::Event
Definition:
Event.h:56
Generated for CMSSW Reference Manual by
1.8.5