OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
dtdb.cpp
Go to the documentation of this file.
1 /**************************************************************************
2 *
3 * NAME: dtdb.cpp
4 *
5 * DESCRIPTION: Source file for deep blue and dark target executable.
6 *
7 * REFERENCES:
8 *
9 * REVISION HISTORY:
10 * DATE: PR# AUTHOR Description
11 * -------- ------ -------- -----------------
12 * 01-12-2020 S. Anderson
13 *
14 * NOTES (MISCELLANEOUS) SECTION:
15 * none
16 *
17 **************************************************************************/
18 
19 #include <genutils.h>
20 #include <DDOptions.h>
21 #include <DDProcess.h>
22 
23 //-----------------------------------------------------------------------------
24 //
25 // Main Function
26 //
27 //-----------------------------------------------------------------------------
28 
29 int main(int argc, char* argv[])
30 {
31  int status = 0;
32 
34  //clo_setEnablePositionOptions(1);
35 
36  init_options(list, "2.0");
37  if(argc == 1) {
39  exit(1);
40  }
41  read_options(list, argc, argv);
42 
43  if(clo_getBool(list, "verbose"))
44  want_verbose = 1;
45  else
46  want_verbose = 0;
47 
48  DDProcess* gran = new DDProcess();
49  gran->history_ = get_history(argc, argv);
50  gran->source_files_ = get_source();
51 
52  status = gran->initialize();
53  if (status != DTDB_SUCCESS) {
54  delete gran;
55  std::cerr << "Main:: Initialization failure" << std::endl;
56  exit(EXIT_FAILURE);
57  }
58 
59  status = gran->process();
60  if (status != DTDB_SUCCESS) {
61  delete gran;
62  std::cerr << "Main:: Processing failure" << std::endl;
63  exit(EXIT_FAILURE);
64  }
65 
66  std::cerr << "Main:: Processing complete for "
67  << get_option("ofile") << "\n" << std::endl;
68 
69  delete gran;
70 
71  return(status);
72 }
73 
void read_options(clo_optionList_t *list, int argc, char *argv[])
Definition: DDOptions.cpp:576
int status
Definition: l1_czcs_hdf.c:32
list(APPEND LIBS ${PGSTK_LIBRARIES}) add_executable(atteph_info_modis atteph_info_modis.c) target_link_libraries(atteph_info_modis $
Definition: CMakeLists.txt:7
string get_option(const string &name)
Definition: DDOptions.cpp:211
clo_optionList_t * clo_createList()
Definition: clo.c:532
string get_history(int argc, char *argv[])
Definition: DDOptions.cpp:496
void clo_printUsage(clo_optionList_t *list)
Definition: clo.c:1988
void init_options(clo_optionList_t *list, const char *softwareVersion)
Definition: DDOptions.cpp:535
int want_verbose
int main(int argc, char *argv[])
Definition: dtdb.cpp:29
int clo_getBool(clo_optionList_t *list, const char *key)
Definition: clo.c:1375
string get_source()
Definition: DDOptions.cpp:462