BeeDepoSource.h
Go to the documentation of this file.
1 /*
2  This component will provide depositions from a JSON file following
3  the same schema used to supply Bee.
4 
5  It provides a number of JSON arrays, one for each attribute of a
6  depo.
7 
8 {
9 "runNo":"1",
10 "subRunNo":"0",
11 "eventNo":"1",
12 "geom":"protodune",
13 "x":[-377.0,-377.3,-32.1,-32.1,...
14 "y":[200.5,200.4,422.5,422.5,42...
15 "z":[39.8,39.7,-0.5,-0.4,-0.4,-...
16 "q":[1686,1510,1315,1381,1323,1...
17 "nq":[1,1,1,1,1,1,1,1,1,1,1,1,1...
18 "type":"truthDepo"
19 }
20 
21  The "nq" and the non-array atributes are ignored.
22 
23  The component is configured with a collection of input files. These
24  may be compressed JSON or Jsonnet files.
25 
26 
27  */
28 
29 #ifndef WIRECELLSIO_JSONDEPOSOURCE
30 #define WIRECELLSIO_JSONDEPOSOURCE
31 
34 
35 namespace WireCell {
36  namespace Sio {
37 
38  class BeeDepoSource : public IDepoSource, public IConfigurable {
39  public:
40 
41  BeeDepoSource();
42  virtual ~BeeDepoSource();
43 
44  /// IDepoSource
45  virtual bool operator()(IDepo::pointer& out);
46 
47  /// IConfigurable
49  virtual void configure(const WireCell::Configuration& config);
50 
51 
52  private:
53 
54  std::vector<std::string> m_filenames;
56  IDepo::vector m_depos; // current set of depos
57 
58 
59  };
60  }
61 }
62 #endif
63 
std::shared_ptr< const IDepo > pointer
Definition: IData.h:19
std::string string
Definition: nybbler.cc:12
virtual WireCell::Configuration default_configuration() const
IConfigurable.
std::vector< pointer > vector
Definition: IData.h:21
static Config * config
Definition: config.cpp:1054
virtual void configure(const WireCell::Configuration &config)
Accept a configuration.
virtual bool operator()(IDepo::pointer &out)
IDepoSource.
Definition: Main.h:22
std::vector< std::string > m_filenames
Definition: BeeDepoSource.h:54
Json::Value Configuration
Definition: Configuration.h:50