Typedefs | Functions
NumpyDepoSaver.cxx File Reference
#include "WireCellSio/NumpyDepoSaver.h"
#include "WireCellIface/FrameTools.h"
#include "WireCellUtil/NamedFactory.h"
#include "WireCellUtil/cnpy.h"
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <tuple>

Go to the source code of this file.

Typedefs

typedef std::tuple< IDepo::pointer, size_t, size_t > depo_gen_child
 
typedef std::vector< depo_gen_childdepos_with_prior
 

Functions

 WIRECELL_FACTORY (NumpyDepoSaver, WireCell::Sio::NumpyDepoSaver, WireCell::IDepoFilter, WireCell::IConfigurable) using namespace WireCell
 
static void push_depo (depos_with_prior &dp, WireCell::IDepo::pointer depo, size_t gen=0, size_t childid=0)
 
static depos_with_prior flatten_depos (std::vector< WireCell::IDepo::pointer > depos)
 

Typedef Documentation

typedef std::tuple<IDepo::pointer, size_t, size_t> depo_gen_child

Definition at line 47 of file NumpyDepoSaver.cxx.

Definition at line 48 of file NumpyDepoSaver.cxx.

Function Documentation

static depos_with_prior flatten_depos ( std::vector< WireCell::IDepo::pointer depos)
static

Definition at line 59 of file NumpyDepoSaver.cxx.

60 {
61  depos_with_prior ret;
62  for (auto depo : depos) {
63  push_depo(ret, depo);
64  }
65  return ret;
66 }
static void push_depo(depos_with_prior &dp, WireCell::IDepo::pointer depo, size_t gen=0, size_t childid=0)
std::vector< depo_gen_child > depos_with_prior
static void push_depo ( depos_with_prior dp,
WireCell::IDepo::pointer  depo,
size_t  gen = 0,
size_t  childid = 0 
)
static

Definition at line 50 of file NumpyDepoSaver.cxx.

51 {
52  dp.push_back(depo_gen_child(depo, gen, childid));
53  auto prior = depo->prior();
54  if (!prior) {
55  return;
56  }
57  push_depo(dp, prior, gen+1, dp.size());
58 }
static void push_depo(depos_with_prior &dp, WireCell::IDepo::pointer depo, size_t gen=0, size_t childid=0)
std::tuple< IDepo::pointer, size_t, size_t > depo_gen_child
WIRECELL_FACTORY ( NumpyDepoSaver  ,
WireCell::Sio::NumpyDepoSaver  ,
WireCell::IDepoFilter  ,
WireCell::IConfigurable   
)