test_deposource.cxx
Go to the documentation of this file.
5 #include "WireCellUtil/Testing.h"
6 #include "WireCellUtil/Type.h"
7 
8 using namespace std;
9 using namespace WireCell;
10 
11 int main()
12 {
14  pm.add("WireCellGen");
15 
16  {
17  auto icfg = Factory::lookup_tn<IConfigurable>("TrackDepos");
18  auto cfg = icfg->default_configuration();
19  icfg->configure(cfg);
20  }
21 
22  auto ds = Factory::find_tn<IDepoSource>("TrackDepos");
23  cerr << "TrackDepos is type: " << type(ds) << endl;
24 
25  Assert(ds);
26 
27  IDepo::pointer depo;
28  bool ok = (*ds)(depo);
29 
30  Assert(ok);
31 
32  return 0;
33 }
const std::string instance
STL namespace.
int main()
cfg
Definition: dbjson.py:29
#define Assert
Definition: Testing.h:7
Definition: Main.h:22
static QCString type
Definition: declinfo.cpp:672
Plugin * add(const std::string &plugin_name, const std::string &libname="")
Add a plugin. If libname is not given, try to derive it.
const GenericPointer< typename T::ValueType > & pointer
Definition: pointer.h:1124
QTextStream & endl(QTextStream &s)