Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
larwirecell
larwirecell
Modules
WireCellToolkit_module.cc
Go to the documentation of this file.
1
#include "
art/Framework/Core/ModuleMacros.h
"
2
#include "
art/Framework/Core/SharedProducer.h
"
3
#include "
art/Utilities/make_tool.h
"
4
#include "
larwirecell/Interfaces/MainTool.h
"
5
6
using namespace
std
;
7
8
namespace
wcls
{
9
10
class
WireCellToolkit
:
public
art::SharedProducer
{
11
public
:
12
explicit
WireCellToolkit
(
fhicl::ParameterSet
const
& pset,
art::ProcessingFrame
const
&);
13
virtual
~
WireCellToolkit
();
14
15
void
produce(
art::Event
&
evt
,
art::ProcessingFrame
const
&);
16
void
reconfigure
(
fhicl::ParameterSet
const
& pset);
17
18
private
:
19
std::unique_ptr<wcls::MainTool>
m_wcls
;
20
};
21
}
22
23
wcls::WireCellToolkit::WireCellToolkit
(
fhicl::ParameterSet
const
& pset,
art::ProcessingFrame
const
&)
24
: SharedProducer(pset)
25
{
26
const
std::string
s
{
"WCT"
};
27
serializeExternal
(
s
);
28
this->
reconfigure
(pset);
29
}
30
wcls::WireCellToolkit::~WireCellToolkit
() {}
31
32
void
33
wcls::WireCellToolkit::produce
(
art::Event
&
evt
,
art::ProcessingFrame
const
&)
34
{
35
m_wcls
->process(evt);
36
}
37
38
void
39
wcls::WireCellToolkit::reconfigure
(
fhicl::ParameterSet
const
& pset)
40
{
41
auto
const
& wclsPS = pset.
get
<
fhicl::ParameterSet
>(
"wcls_main"
);
42
m_wcls
= art::make_tool<wcls::MainTool>(wclsPS);
43
if
(!m_wcls) {
44
throw
cet::exception
(
"WireCellToolkit_module"
) <<
"Failed to get Art Tool \"wcls_main\"\n"
;
45
}
46
m_wcls->produces(
producesCollector
());
47
}
48
49
namespace
wcls
{
50
DEFINE_ART_MODULE
(
WireCellToolkit
)
51
}
wcls
Definition:
ChannelNoiseDB.h:7
wcls::WireCellToolkit::WireCellToolkit
WireCellToolkit(fhicl::ParameterSet const &pset, art::ProcessingFrame const &)
Definition:
WireCellToolkit_module.cc:23
MainTool.h
string
std::string string
Definition:
nybbler.cc:12
wcls::WireCellToolkit::reconfigure
void reconfigure(fhicl::ParameterSet const &pset)
Definition:
WireCellToolkit_module.cc:39
wcls::WireCellToolkit::~WireCellToolkit
virtual ~WireCellToolkit()
Definition:
WireCellToolkit_module.cc:30
std
STL namespace.
wcls::WireCellToolkit::produce
void produce(art::Event &evt, art::ProcessingFrame const &)
Definition:
WireCellToolkit_module.cc:33
art::SharedProducer
Definition:
SharedProducer.h:18
DEFINE_ART_MODULE
#define DEFINE_ART_MODULE(klass)
Definition:
ModuleMacros.h:67
RunHistoryService::reconfigure
virtual void reconfigure(fhicl::ParameterSet const &pset)
fhicl::ParameterSet::get
T get(std::string const &key) const
Definition:
ParameterSet.h:271
art::ProcessingFrame
Definition:
ProcessingFrame.h:8
art::detail::SharedModule::serializeExternal
void serializeExternal(T const &...)
ModuleMacros.h
art::ProductRegistryHelper::producesCollector
ProducesCollector & producesCollector() noexcept
Definition:
ProductRegistryHelper.h:80
make_tool.h
art::Event
Definition:
Event.h:22
wcls::WireCellToolkit::m_wcls
std::unique_ptr< wcls::MainTool > m_wcls
Definition:
WireCellToolkit_module.cc:19
SharedProducer.h
tca::evt
TCEvent evt
Definition:
DataStructs.cxx:7
wcls::WireCellToolkit
Definition:
WireCellToolkit_module.cc:10
s
static QCString * s
Definition:
config.cpp:1042
fhicl::exception
cet::coded_exception< error, detail::translate > exception
Definition:
exception.h:33
fhicl::ParameterSet
Definition:
ParameterSet.h:36
Generated by
1.8.11