JsonClusterTap.h
Go to the documentation of this file.
1 /** This component "taps" into a stream of clusters to save them as JSON files.
2  *
3  * The JSON can can then be converted for use with various viewers (paraview, bee).
4  *
5  * The schema of JSON file is one that reflects the graph nature of an ICluster.
6  * It has two top level attributes:
7  *
8  * - vertices :: a list of graph vertices
9  * - edges :: a list of graph edges
10  *
11  * A vertex is represented as a JSON object with the following attributes
12  * - ident :: an indexable ID number for the node, and referred to in "edges"
13  * - type :: the letter "code" used in ICluster: one in "sbcwm"
14  * - data :: an object holding information about the corresponding vertex object
15  *
16  * An edge is a pair of vertex ident numbers.
17  *
18  */
19 
20 #ifndef WIRECELLIMG_JSONCLUSTERTAP
21 #define WIRECELLIMG_JSONCLUSTERTAP
22 
25 
26 #include "WireCellUtil/Logging.h"
27 
28 #include <string>
29 
30 namespace WireCell {
31 
32  namespace Img {
33 
34  class JsonClusterTap : public IClusterFilter , public IConfigurable {
35  public:
37  virtual ~JsonClusterTap();
38 
39  virtual void configure(const WireCell::Configuration& cfg);
41 
42  virtual bool operator()(const input_pointer& in, output_pointer& out);
43  private:
45  double m_drift_speed;
46 
48  };
49  }
50 }
51 
52 #endif
virtual void configure(const WireCell::Configuration &cfg)
Accept a configuration.
std::string string
Definition: nybbler.cc:12
cfg
Definition: dbjson.py:29
virtual bool operator()(const input_pointer &in, output_pointer &out)
The calling signature:
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
std::shared_ptr< const ICluster > input_pointer
Definition: IFunctionNode.h:39
std::shared_ptr< const ICluster > output_pointer
Definition: IFunctionNode.h:40
std::shared_ptr< spdlog::logger > logptr_t
Definition: Logging.h:24
Definition: Main.h:22
Json::Value Configuration
Definition: Configuration.h:50