HOPS
HOPS class reference
plot_data_dir.h
Go to the documentation of this file.
1 #ifndef PLOT_DATA_DIR_H_
2 #define PLOT_DATA_DIR_H_
3 /*
4  * Machinery to support dumping plot data to one or more files
5  *
6  * Everything hides behind one function, dump_plot_data2dir()
7  */
8 
9 /* output.c imports vex.h, mk4_vex.h imports vex.h */
10 #ifndef VEX_H
11 #include "mk4_vex.h"
12 #include "pass_struct.h"
13 #include "param_struct.h"
14 #include "meta_struct.h"
15 #endif /* MK4_VEX_H */
16 
17 /* struct vex in mk4_vex.h,
18  * struct type_pass in pass_struct.h
19  * struct type_param in param_struct.h
20  * struct type_meta in meta_struct.h
21  * struct type_plot in plot_struct.h via param_struct.h
22  */
23 struct type_dump {
24  struct vex *root;
25  struct type_pass *pass;
26  struct type_param *param;
28  struct type_meta *meta;
29  struct type_plot *plot;
30  struct mk4_fringe *fringe;
31 };
32 extern void dump_plot_data2dir(struct type_dump *dump);
33 
34 /* disable the capability for testing */
35 #ifndef USE_PLOT_DATA_DIR
36 #define USE_PLOT_DATA_DIR 1
37 #endif /* USE_PLOT_DATA_DIR */
38 #if USE_PLOT_DATA_DIR
39 #define DUMP_PLOT_DATA2DIR(ROOT,PASS,PP,ST,PM,PL,PF) do{\
40  static int once = 1; \
41  struct type_dump dump; \
42  dump.root = (ROOT); \
43  dump.pass = (PASS); \
44  dump.param = (PP); \
45  dump.status = (ST); \
46  dump.meta = (PM); \
47  dump.plot = (PL); \
48  dump.fringe = (PF); \
49  if (once) { \
50  msg("DPD(%s)",1,dump.param->plot_data_dir[0]); \
51  msg("DPD(%s)",1,dump.param->plot_data_dir[1]); \
52  once = 0; \
53  } \
54  if (dump.param->plot_data_dir[0][0] || \
55  dump.param->plot_data_dir[1][0]) \
56  dump_plot_data2dir(&dump); \
57 } while (0)
58 #else /* USE_PLOT_DATA_DIR */
59 #define DUMP_PLOT_DATA2DIR(DP)
60 #endif /* USE_PLOT_DATA_DIR */
61 
62 #endif
63 /*
64  * eof
65  */
Definition: meta_struct.h:12
Definition: mk4_data.h:82
Definition: param_struct.h:13
Definition: param_struct.h:111
Definition: pass_struct.h:86
struct type_pass * pass
Definition: plot_data_dir.h:25
struct mk4_fringe * fringe
Definition: plot_data_dir.h:30
struct vex * root
Definition: plot_data_dir.h:24
struct type_status * status
Definition: plot_data_dir.h:27
void dump_plot_data2dir(struct type_dump *dump)
Definition: plot_data_dir.c:859
struct type_meta * meta
Definition: plot_data_dir.h:28
struct type_plot * plot
Definition: plot_data_dir.h:29
struct type_param * param
Definition: plot_data_dir.h:26
Definition: plot_data_dir.h:23
Definition: plot_struct.h:18
Definition: vex.h:28