Medial Code Documentation
Loading...
Searching...
No Matches
CmdArgs.h
1#ifndef __CMD_ARGS__
2#define __CMD_ARGS__
3#include <MedUtils/MedUtils/MedUtils.h>
4#include <fstream>
5#include <MedProcessTools/MedProcessTools/MedSamples.h>
6
7#define LOCAL_SECTION LOG_APP
8#define LOCAL_LEVEL LOG_DEF_LEVEL
9
11private:
12 void post_process() {
13 }
14public:
15 string amconfig;
16 string amlib;
17 string in_jsons;
18 string jreq;
19 int prediction_time;
20 int pid_id;
21 string log_path;
22
23 int batch_size;
24 bool calc_by_type;
25 bool load_data_again;
26
27 ProgramArgs() {
28 po::options_description options("Required options");
29 options.add_options()
30 ("amconfig", po::value<string>(&amconfig)->required(), "ampath")
31 ("amlib", po::value<string>(&amlib)->default_value(""), "amlib")
32 ("in_jsons", po::value<string>(&in_jsons)->required(), "in_jsons")
33 ("jreq", po::value<string>(&jreq)->default_value(""), "jreq")
34 ("pid_id", po::value<int>(&pid_id)->default_value(1), "pid id")
35 ("prediction_time", po::value<int>(&prediction_time)->default_value(20210101), "prediction_time")
36 ("log_path", po::value<string>(&log_path)->required(), "log_path")
37 ("batch_size", po::value<int>(&batch_size)->default_value(1000), "batch size")
38 ("calc_by_type", po::value<bool>(&calc_by_type)->default_value(true), "calc_by_type")
39 ("load_data_again", po::value<bool>(&load_data_again)->default_value(false), "call load_data each time")
40
41
42 ;
43
44 init(options);
45 }
46};
47
48
49#endif
Definition CmdArgs.h:10
A basic class wrapper to parse command args has default "h", "help", "debug" and "base_config" for re...
Definition MedUtils.h:122
void init(po::options_description &prg_options, const string &app_l="")
an init function
Definition MedUtils.cpp:355