MIDAS
Loading...
Searching...
No Matches
HistoryData Struct Reference

Public Member Functions

void Allocate (int xnvars)
 
void Free ()
 
void Print () const
 
 HistoryData ()
 
 ~HistoryData ()
 

Public Attributes

int nvars
 
int alloc_nvars
 
char ** event_names
 
char ** var_names
 
int * var_index
 
int * odb_index
 
int * status
 
int * num_entries
 
time_t ** t
 
double ** v
 
bool have_last_written
 
time_t * last_written
 
time_t tstart
 
time_t tend
 
time_t scale
 

Detailed Description

Definition at line 8245 of file mhttpd.cxx.

Constructor & Destructor Documentation

◆ HistoryData()

HistoryData::HistoryData ( )
inline

Definition at line 8309 of file mhttpd.cxx.

8310 {
8311 nvars = 0;
8312 alloc_nvars = 0;
8313 have_last_written = false;
8314 tstart = 0;
8315 tend = 0;
8316 scale = 0;
8317 }
time_t tstart
Definition mhttpd.cxx:8261
int alloc_nvars
Definition mhttpd.cxx:8248
time_t tend
Definition mhttpd.cxx:8262
bool have_last_written
Definition mhttpd.cxx:8258
time_t scale
Definition mhttpd.cxx:8263

◆ ~HistoryData()

HistoryData::~HistoryData ( )
inline

Definition at line 8319 of file mhttpd.cxx.

8320 {
8321 if (alloc_nvars > 0)
8322 Free();
8323 }
void Free()
Definition mhttpd.cxx:8283
Here is the call graph for this function:

Member Function Documentation

◆ Allocate()

void HistoryData::Allocate ( int  xnvars)
inline

Definition at line 8265 of file mhttpd.cxx.

8265 {
8266 if (alloc_nvars > 0)
8267 Free();
8268 nvars = 0;
8269 alloc_nvars = xnvars;
8270 event_names = ALLOC(char*, alloc_nvars);
8271 var_names = ALLOC(char*, alloc_nvars);
8272 var_index = ALLOC(int, alloc_nvars);
8273 odb_index = ALLOC(int, alloc_nvars);
8274 status = ALLOC(int, alloc_nvars);
8276 t = ALLOC(time_t*, alloc_nvars);
8277 v = ALLOC(double*, alloc_nvars);
8278
8279 have_last_written = false;
8280 last_written = ALLOC(time_t, alloc_nvars);
8281 }
#define ALLOC(t, n)
Definition mhttpd.cxx:8240
int * odb_index
Definition mhttpd.cxx:8252
double ** v
Definition mhttpd.cxx:8256
time_t ** t
Definition mhttpd.cxx:8255
char ** var_names
Definition mhttpd.cxx:8250
int * var_index
Definition mhttpd.cxx:8251
char ** event_names
Definition mhttpd.cxx:8249
int * status
Definition mhttpd.cxx:8253
time_t * last_written
Definition mhttpd.cxx:8259
int * num_entries
Definition mhttpd.cxx:8254
Here is the call graph for this function:

◆ Free()

void HistoryData::Free ( )
inline

Definition at line 8283 of file mhttpd.cxx.

8283 {
8288 DELETE(status);
8293 nvars = 0;
8294 alloc_nvars = 0;
8295 have_last_written = false;
8296 }
#define DELETE(x)
Definition mhttpd.cxx:8241
#define DELETEA(x, n)
Definition mhttpd.cxx:8242
Here is the caller graph for this function:

◆ Print()

void HistoryData::Print ( ) const
inline

Definition at line 8298 of file mhttpd.cxx.

8298 {
8299 printf("this %p, nvars %d. tstart %d, tend %d, scale %d\n", this, nvars, (int)tstart, (int)tend, (int)scale);
8300 for (int i=0; i<nvars; i++) {
8301 printf("var[%d]: [%s/%s][%d] %d entries, status %d", i, event_names[i], var_names[i], var_index[i], num_entries[i], status[i]);
8302 if (status[i]==HS_SUCCESS && num_entries[i]>0 && t[i] && v[i])
8303 printf(", t %d:%d, v %g:%g", (int)t[i][0], (int)t[i][num_entries[i]-1], v[i][0], v[i][num_entries[i]-1]);
8304 printf(" last_written %d", (int)last_written[i]);
8305 printf("\n");
8306 }
8307 }
#define HS_SUCCESS
Definition midas.h:728
INT i
Definition mdump.cxx:32
Here is the caller graph for this function:

Member Data Documentation

◆ alloc_nvars

int HistoryData::alloc_nvars

Definition at line 8248 of file mhttpd.cxx.

◆ event_names

char** HistoryData::event_names

Definition at line 8249 of file mhttpd.cxx.

◆ have_last_written

bool HistoryData::have_last_written

Definition at line 8258 of file mhttpd.cxx.

◆ last_written

time_t* HistoryData::last_written

Definition at line 8259 of file mhttpd.cxx.

◆ num_entries

int* HistoryData::num_entries

Definition at line 8254 of file mhttpd.cxx.

◆ nvars

int HistoryData::nvars

Definition at line 8247 of file mhttpd.cxx.

◆ odb_index

int* HistoryData::odb_index

Definition at line 8252 of file mhttpd.cxx.

◆ scale

time_t HistoryData::scale

Definition at line 8263 of file mhttpd.cxx.

◆ status

int* HistoryData::status

Definition at line 8253 of file mhttpd.cxx.

◆ t

time_t** HistoryData::t

Definition at line 8255 of file mhttpd.cxx.

◆ tend

time_t HistoryData::tend

Definition at line 8262 of file mhttpd.cxx.

◆ tstart

time_t HistoryData::tstart

Definition at line 8261 of file mhttpd.cxx.

◆ v

double** HistoryData::v

Definition at line 8256 of file mhttpd.cxx.

◆ var_index

int* HistoryData::var_index

Definition at line 8251 of file mhttpd.cxx.

◆ var_names

char** HistoryData::var_names

Definition at line 8250 of file mhttpd.cxx.


The documentation for this struct was generated from the following file: