Classes | Typedefs | Functions
ClusterSink.cxx File Reference
#include "WireCellImg/ClusterSink.h"
#include <boost/graph/graphviz.hpp>
#include "WireCellUtil/String.h"
#include "WireCellUtil/NamedFactory.h"
#include "WireCellUtil/Logging.h"
#include <fstream>
#include <sstream>
#include <functional>
#include <unordered_set>

Go to the source code of this file.

Classes

struct  label_writer_t
 

Typedefs

typedef std::vector< std::function< std::string(const cluster_node_t &ptr) > > stringers_t
 

Functions

 WIRECELL_FACTORY (ClusterSink, WireCell::Img::ClusterSink, WireCell::IClusterSink, WireCell::IConfigurable) using namespace WireCell
 
static std::string size_stringer (const cluster_node_t &n)
 
template<typename Type >
std::string scalar_stringer (const cluster_node_t &n)
 
template<typename Type >
std::string vector_stringer (const cluster_node_t &n)
 
static std::string asstring (const cluster_node_t &n)
 

Typedef Documentation

typedef std::vector< std::function< std::string(const cluster_node_t& ptr) > > stringers_t

Definition at line 47 of file ClusterSink.cxx.

Function Documentation

static std::string asstring ( const cluster_node_t &  n)
static

Definition at line 75 of file ClusterSink.cxx.

76 {
77  // cwbsm
78  stringers_t ss{
80  scalar_stringer<IChannel>,
81  scalar_stringer<IWire>,
82  scalar_stringer<IBlob>,
83  scalar_stringer<ISlice>,
84  vector_stringer<IChannel>
85  };
86  const size_t ind = n.ptr.index();
87  return ss[ind](n);
88 }
static std::string size_stringer(const cluster_node_t &n)
Definition: ClusterSink.cxx:50
std::vector< std::function< std::string(const cluster_node_t &ptr) > > stringers_t
Definition: ClusterSink.cxx:47
std::size_t n
Definition: format.h:3399
template<typename Type >
std::string scalar_stringer ( const cluster_node_t &  n)

Definition at line 59 of file ClusterSink.cxx.

60 {
61  typename Type::pointer sp = std::get<typename Type::pointer>(n.ptr);
62  std::stringstream ss;
63  ss << n.code() << ":" << sp->ident();
64  return ss.str();
65 }
const GenericPointer< typename T::ValueType > & pointer
Definition: pointer.h:1124
std::size_t n
Definition: format.h:3399
static std::string size_stringer ( const cluster_node_t &  n)
static

Definition at line 50 of file ClusterSink.cxx.

51 {
52  size_t sp = std::get<size_t>(n.ptr);
53  std::stringstream ss;
54  ss << n.code() << ":" << sp;
55  return ss.str();
56 }
std::size_t n
Definition: format.h:3399
template<typename Type >
std::string vector_stringer ( const cluster_node_t &  n)

Definition at line 67 of file ClusterSink.cxx.

68 {
69  typename Type::shared_vector sv = std::get<typename Type::shared_vector>(n.ptr);
70  std::stringstream ss;
71  ss << n.code() << "#" << sv->size();
72  return ss.str();
73 }
std::size_t n
Definition: format.h:3399
WIRECELL_FACTORY ( ClusterSink  ,
WireCell::Img::ClusterSink  ,
WireCell::IClusterSink  ,
WireCell::IConfigurable   
)