Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
test
Utilities
tools
AddNumber_tool.cc
Go to the documentation of this file.
1
#include "
art/Utilities/ToolConfigTable.h
"
2
#include "
art/Utilities/ToolMacros.h
"
3
#include "
art/test/Utilities/tools/OperationBase.h
"
4
#include "
fhiclcpp/types/Atom.h
"
5
6
namespace
{
7
8
struct
Config
{
9
fhicl::Atom<int>
incrementBy{
fhicl::Name
(
"incrementBy"
), 1};
10
};
11
12
class
AddNumber :
public
arttest::OperationBase
{
13
public
:
14
using
Parameters =
art::ToolConfigTable<Config>
;
15
explicit
AddNumber(Parameters
const
&
config
)
16
: incrementBy_{
config
().incrementBy()}
17
{}
18
19
private
:
20
int
incrementBy_;
21
22
void
23
do_adjustNumber(
int
& i)
const override
24
{
25
i += incrementBy_;
26
}
27
};
28
29
}
// namespace
30
31
DEFINE_ART_CLASS_TOOL
(AddNumber)
DEFINE_ART_CLASS_TOOL
#define DEFINE_ART_CLASS_TOOL(tool)
Definition:
ToolMacros.h:42
art::ToolConfigTable< Config >
Name
ChannelGroupService::Name Name
Definition:
FixedChannelGroupService_service.cc:19
art::detail::Config
typename config_impl< T >::type Config
Definition:
ModuleMacros.h:52
ToolMacros.h
config
static Config * config
Definition:
config.cpp:1054
ToolConfigTable.h
fhicl::Atom< int >
OperationBase.h
Atom.h
arttest::OperationBase
Definition:
OperationBase.h:5
Generated by
1.8.11