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