Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
test
Integration
event-shape
ESPrimaryProducer_module.cc
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
// Class: ESPrimaryProducer
3
// Module Type: producer
4
// File: ESPrimaryProducer_module.cc
5
//
6
// Generated at Mon Feb 3 11:00:13 2014 by Christopher Green using artmod
7
// from cetpkgsupport v1_05_03.
8
////////////////////////////////////////////////////////////////////////
9
10
#include "
art/Framework/Core/EDProducer.h
"
11
#include "
art/Framework/Core/ModuleMacros.h
"
12
#include "
art/Framework/Principal/Event.h
"
13
#include "
art/Framework/Principal/Handle.h
"
14
#include "
art/Framework/Principal/Run.h
"
15
#include "
art/Framework/Principal/SubRun.h
"
16
#include "
art/test/TestObjects/ToyProducts.h
"
17
#include "
canvas/Utilities/InputTag.h
"
18
#include "
fhiclcpp/ParameterSet.h
"
19
20
#include <memory>
21
22
namespace
arttest
{
23
class
ESPrimaryProducer;
24
}
25
26
class
arttest::ESPrimaryProducer
:
public
art::EDProducer
{
27
public
:
28
explicit
ESPrimaryProducer
(
fhicl::ParameterSet
const
&);
29
30
private
:
31
void
produce
(
art::Event
&
e
)
override
;
32
};
33
34
arttest::ESPrimaryProducer::ESPrimaryProducer
(
fhicl::ParameterSet
const
&
ps
)
35
:
EDProducer
{ps}
36
{
37
produces<arttest::VSimpleProduct>();
38
}
39
40
void
41
arttest::ESPrimaryProducer::produce
(
art::Event
&
e
)
42
{
43
constexpr
size_t
vspSize{5};
44
constexpr
double
vspVal{1.5};
45
auto
vsp = std::make_unique<VSimpleProduct>(vspSize);
46
47
size_t
count{};
48
for
(
auto
&
s
: *vsp) {
49
s
.key = count;
50
s
.value = count * vspVal;
51
++count;
52
}
53
e.
put
(std::move(vsp));
54
}
55
56
DEFINE_ART_MODULE
(
arttest::ESPrimaryProducer
)
arttest::ESPrimaryProducer::produce
void produce(art::Event &e) override
Definition:
ESPrimaryProducer_module.cc:41
Handle.h
genie::units::ps
static const double ps
Definition:
Units.h:103
arttest::ESPrimaryProducer
Definition:
ESPrimaryProducer_module.cc:26
art::EDProducer::EDProducer
EDProducer()=default
ParameterSet.h
e
const double e
Definition:
gUpMuFluxGen.cxx:165
DEFINE_ART_MODULE
#define DEFINE_ART_MODULE(klass)
Definition:
ModuleMacros.h:68
ToyProducts.h
arttest::ESPrimaryProducer::ESPrimaryProducer
ESPrimaryProducer(fhicl::ParameterSet const &)
Definition:
ESPrimaryProducer_module.cc:34
arttest
Definition:
GroupSelector_t.h:4
SubRun.h
ModuleMacros.h
art::EDProducer
Definition:
EDProducer.h:15
EDProducer.h
art::Event
Definition:
Event.h:40
InputTag.h
genie::units::s
static const double s
Definition:
Units.h:99
Event.h
art::DataViewImpl::put
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition:
DataViewImpl.h:692
Run.h
fhicl::ParameterSet
Definition:
ParameterSet.h:34
Generated by
1.8.11