Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
test
Integration
ToyProductFilter_module.cc
Go to the documentation of this file.
1
// vim: set sw=2 expandtab :
2
#include "
art/Framework/Core/EDFilter.h
"
3
#include "
art/Framework/Core/ModuleMacros.h
"
4
#include "
art/Framework/Principal/Event.h
"
5
#include "
art/Framework/Principal/Handle.h
"
6
#include "
art/test/TestObjects/ToyProducts.h
"
7
#include "
fhiclcpp/ParameterSet.h
"
8
9
#include <cmath>
10
#include <iostream>
11
#include <sstream>
12
#include <string>
13
14
using namespace
art
;
15
using namespace
std
;
16
17
namespace
{
18
19
double
20
f
(
int
val
)
21
{
22
return
sqrt(val);
23
}
24
25
void
26
use_cpu_time(
double
&
val
)
27
{
28
for
(
int
i
= 0;
i
< 100
'000'
000; ++
i
) {
29
val =
f
(
i
);
30
}
31
}
32
33
}
// unnamed namespace
34
35
namespace
arttest
{
36
37
class
ToyProductFilter
:
public
EDFilter
{
38
public
:
39
struct
Config
{
40
};
41
using
Parameters
=
Table<Config>
;
42
explicit
ToyProductFilter
(
Parameters
const
& pset);
43
44
private
:
45
bool
filter
(
Event
&
e
)
override
;
46
};
47
48
ToyProductFilter::ToyProductFilter(
Parameters
const
& pset) :
EDFilter
{pset} {}
49
50
bool
51
ToyProductFilter::filter
(
Event
&
/*e*/
)
52
{
53
double
val
{};
54
use_cpu_time(
val
);
55
return
true
;
56
}
57
58
}
// namespace arttest
59
60
DEFINE_ART_MODULE
(
arttest::ToyProductFilter
)
art::EDFilter
Definition:
EDFilter.h:17
keras_to_tensorflow.f
f
Definition:
keras_to_tensorflow.py:140
val
Definition:
registry_via_id_test_2.cc:15
Handle.h
std
STL namespace.
art::ProducerTable
Definition:
ProducerTable.h:19
ParameterSet.h
sensitivity_comps.i
int i
Definition:
sensitivity_comps.py:15
arttest::ToyProductFilter
Definition:
ToyProductFilter_module.cc:37
e
const double e
Definition:
gUpMuFluxGen.cxx:165
DEFINE_ART_MODULE
#define DEFINE_ART_MODULE(klass)
Definition:
ModuleMacros.h:68
EDFilter.h
ToyProducts.h
arttest::ToyProductFilter::filter
bool filter(Event &e) override
Definition:
ToyProductFilter_module.cc:51
arttest
Definition:
GroupSelector_t.h:4
ModuleMacros.h
art::ModuleType::filter
art::Event
Definition:
Event.h:40
arttest::ToyProductFilter::Config
Definition:
ToyProductFilter_module.cc:39
art
Definition:
BasicOptionsHandler.h:11
Event.h
Generated by
1.8.11