ATLAS Offline Software
test_lwtnn_fastgraph.cxx
Go to the documentation of this file.
1 #include "LwtnnUtils/FastGraph.h"
3 
4 #include "lwtnn/lightweight_network_config.hh"
5 #include "lwtnn/parse_json.hh"
6 
7 #include <string>
8 #include <vector>
9 #include <fstream>
10 
11 struct Args
12 {
13  std::string nn_file;
14 };
15 
16 Args getArgs(int nargs, char* argv[]) {
17  Args args;
18  if (nargs != 1) return args;
19  args.nn_file = argv[1];
20  return args;
21 }
22 
23 int main(int nargs, char* argv[]) {
25  if (args.nn_file.size() == 0) return 1;
26  auto nn_file = std::ifstream(args.nn_file);
27  auto graph_config = lwt::parse_json_graph(nn_file);
28 
29  lwt::atlas::FastGraph graph(graph_config, {}, "");
30 
31  return 0;
32 }
Args::nn_file
std::string nn_file
Definition: test_lwtnn_fastgraph.cxx:13
CaloLCW_tf.nargs
nargs
Definition: CaloLCW_tf.py:26
FastGraph.h
Args
Definition: test_lwtnn_fastgraph.cxx:12
LArCellNtuple.argv
argv
Definition: LArCellNtuple.py:152
main
int main(int nargs, char *argv[])
Definition: test_lwtnn_fastgraph.cxx:23
lwt::atlas::FastGraph
Definition: FastGraph.h:33
InputOrder.h
lwtDev::parse_json_graph
GraphConfig parse_json_graph(std::istream &json)
Definition: parse_json.cxx:71
getArgs
Args getArgs(int nargs, char *argv[])
Definition: test_lwtnn_fastgraph.cxx:16
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80