Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
wire-cell-build
img
src
SlicesSink.cxx
Go to the documentation of this file.
1
#include "
WireCellImg/SlicesSink.h
"
2
3
#include "
WireCellUtil/NamedFactory.h
"
4
#include "
WireCellUtil/Units.h
"
5
6
WIRECELL_FACTORY
(SlicesSink,
WireCell::Img::SlicesSink
,
7
WireCell::ISliceFrameSink
,
WireCell::IConfigurable
)
8
9
10
using namespace
WireCell
;
11
using namespace
std
;
12
13
Img::
SlicesSink
::
SlicesSink
()
14
{
15
}
16
17
Img::SlicesSink::~SlicesSink()
18
{
19
}
20
21
WireCell::Configuration
Img::SlicesSink::default_configuration()
const
22
{
23
Configuration
cfg
;
24
25
return
cfg
;
26
}
27
28
void
Img::SlicesSink::configure
(
const
WireCell::Configuration
&
cfg
)
29
{
30
m_cfg =
cfg
;
31
}
32
33
bool
Img::SlicesSink::operator()(
const
ISliceFrame::pointer
& sf)
34
{
35
if
(!sf) {
36
return
true
;
37
}
38
39
auto
slices
= sf->slices();
40
41
for
(
auto
slice :
slices
) {
42
auto
cvmap = slice->activity();
43
double
qtot = 0;
44
for
(
const
auto
&cv : cvmap) {
45
qtot += cv.second;
46
}
47
}
48
return
true
;
49
}
50
51
WireCell::IData< ISliceFrame >::pointer
std::shared_ptr< const ISliceFrame > pointer
Definition:
IData.h:19
WireCell::IConfigurable
Definition:
IConfigurable.h:13
NamedFactory.h
std
STL namespace.
dbjson.cfg
cfg
Definition:
dbjson.py:29
WireCell::Img::SlicesSink
Definition:
SlicesSink.h:10
cuda.configure
def configure(cfg)
Definition:
cuda.py:34
tca::slices
std::vector< TCSlice > slices
Definition:
DataStructs.cxx:12
WireCell
Definition:
Main.h:22
SlicesSink.h
WireCell::Configuration
Json::Value Configuration
Definition:
Configuration.h:50
WIRECELL_FACTORY
WIRECELL_FACTORY(SlicesSink, WireCell::Img::SlicesSink, WireCell::ISliceFrameSink, WireCell::IConfigurable) using namespace WireCell
Units.h
WireCell::ISliceFrameSink
Definition:
ISliceFrameSink.h:9
Generated by
1.8.11