UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TrHdrGen.H
1 /* TrHdrGen.H */
2 /* $Id: TrHdrGen.H,v 1.8 2007/07/08 17:22:15 vlad Exp $ */
3 #ifndef __TrHdrGen_H
4 #define __TrHdrGen_H
5 
6 
7 #include <mix/Types.h>
8 #include <ldb/trset.h>
9 
10 
12 typedef struct
13 {
14  char name_well[17];
15  double x_well, y_well;
16  double alt_well;
17  double h_rotor;
18  double datum;
19 
20 } WellInfo;
21 
22 
23 /***********************************************************************
24  * Trace header generator.
25  */
26 
27 class TrHdrGen
28 {
29 public:
30 
31  /* - by existent modification (TEMPLMOD) */
32  TrHdrGen (const char* project, const char* nmod);
33 
34  /* - by passport in pointed project (PROJECT) */
35  /*TrHdrGen (const char* project);*/
36 
37  /* - by free-form parameters (FREEFORM) */
38  /*TrHdrGen ();*/
39 
40  /* Destructor */
41  virtual ~TrHdrGen ();
42 
43  /*
44  * AUXILIARY ALLOCATION SERVICE
45  */
46 
47  /* allocate memory for header */
48  TrHeader* allocate_header_buffer ();
49 
50  /* allocate memory for trace body */
51  float* allocate_body_buffer ();
52 
53  /*
54  * TRACE GENERATION PROCESS
55  */
56 
57  /* return sampling rate in target modification (ms) */
58  float get_sampling_rate ();
59 
60  /* return samples count in target modification */
61  int get_samples_count ();
62 
63  /* return traces count in target modification */
64  int get_traces_count ();
65 
66  /* return pointer at template modification table */
67  TrMtable* mod_table ();
68 
69  /* start of trace headers generation */
70  void for_all_traces (int iSP = 0);
71  void for_all_depths (int iSP = 0);
72 
73  /* go to the next trace and return:
74  TRUE - there are other traces;
75  FALSE - no traces left */
76  Logic go_next_trace ();
77 
78  /* return condition of completeness of the trace generation process:
79  TRUE - there are other traces;
80  FALSE - no traces left */
81  Logic not_all_traces ();
82 
83  /* get unique trace id number */
84  int get_trace_id ();
85 
86  /* get current header specification */
87  TrHeader* get_header ();
88 
89  /* get current header specification */
90  TrHeader* get_header (TrHeader* buf);
91 
92  /* get header specification for given identification parameters:
93  NMGL, COMP and HCAB or return NULL if not found */
94  void get_op_header (TrHeader* pHdr, int iNMGL, float fHcab, char cComp);
95 
96  /* Fill well description structure for with data set. Return TRUE
97  on success and FALSE if well information is not reliable. */
98  Logic get_well_info (WellInfo& winfo);
99 
100  /* return number of encountered shot points in the seismic */
101  int get_number_of_sp ();
102 
103  /* return header (as container for SP-related information and
104  geometry) for SP with given index (0 to number of SP - 1) */
105  TrHeader* get_sp_header (int iSP);
106 
107 
108  /*
109  * SETTING PARAMETERS OF TRACE GENERATION PROCESS
110  */
111 
112 private:
113 
114  /*
115  * TEMPLMOD
116  */
117 
118  /* index of current trace */
119  int index;
120 
121  /* template modification */
122  TrSet templ_mod;
123 
124  /* prepare list of shot points */
125  void prepare_it_sp ();
126 
127  /* index table for shot points */
128  TrIndexTable it_sp;
129 
130  /* cached header with SP information */
131  TrHeader *sp_hdr;
132 
133 
134 };
135 
136 
137 #endif /* TrHdrGen.H */
Definition: trace_file.h:15
Definition: TrHdrGen.H:12
Definition: TrHdrGen.H:27
Definition: trset.h:56
Definition: trset.h:44
Definition: trset.h:96