SlicesSink.cxx
Go to the documentation of this file.
2 
4 #include "WireCellUtil/Units.h"
5 
8 
9 
10 using namespace WireCell;
11 using namespace std;
12 
14 {
15 }
16 
17 Img::SlicesSink::~SlicesSink()
18 {
19 }
20 
21 WireCell::Configuration Img::SlicesSink::default_configuration() const
22 {
24 
25  return cfg;
26 }
27 
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 
std::shared_ptr< const ISliceFrame > pointer
Definition: IData.h:19
STL namespace.
cfg
Definition: dbjson.py:29
def configure(cfg)
Definition: cuda.py:34
std::vector< TCSlice > slices
Definition: DataStructs.cxx:12
Definition: Main.h:22
Json::Value Configuration
Definition: Configuration.h:50
WIRECELL_FACTORY(SlicesSink, WireCell::Img::SlicesSink, WireCell::ISliceFrameSink, WireCell::IConfigurable) using namespace WireCell