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 8272 of file mhttpd.cxx.

Constructor & Destructor Documentation

◆ HistoryData()

HistoryData::HistoryData ( )
inline

Definition at line 8336 of file mhttpd.cxx.

8337 {
8338 nvars = 0;
8339 alloc_nvars = 0;
8340 have_last_written = false;
8341 tstart = 0;
8342 tend = 0;
8343 scale = 0;
8344 }
time_t tstart
Definition mhttpd.cxx:8288
int alloc_nvars
Definition mhttpd.cxx:8275
time_t tend
Definition mhttpd.cxx:8289
bool have_last_written
Definition mhttpd.cxx:8285
time_t scale
Definition mhttpd.cxx:8290

◆ ~HistoryData()

HistoryData::~HistoryData ( )
inline

Definition at line 8346 of file mhttpd.cxx.

8347 {
8348 if (alloc_nvars > 0)
8349 Free();
8350 }
void Free()
Definition mhttpd.cxx:8310
Here is the call graph for this function:

Member Function Documentation

◆ Allocate()

void HistoryData::Allocate ( int  xnvars)
inline

Definition at line 8292 of file mhttpd.cxx.

8292 {
8293 if (alloc_nvars > 0)
8294 Free();
8295 nvars = 0;
8296 alloc_nvars = xnvars;
8297 event_names = ALLOC(char*, alloc_nvars);
8298 var_names = ALLOC(char*, alloc_nvars);
8299 var_index = ALLOC(int, alloc_nvars);
8300 odb_index = ALLOC(int, alloc_nvars);
8301 status = ALLOC(int, alloc_nvars);
8303 t = ALLOC(time_t*, alloc_nvars);
8304 v = ALLOC(double*, alloc_nvars);
8305
8306 have_last_written = false;
8307 last_written = ALLOC(time_t, alloc_nvars);
8308 }
#define ALLOC(t, n)
Definition mhttpd.cxx:8267
int * odb_index
Definition mhttpd.cxx:8279
double ** v
Definition mhttpd.cxx:8283
time_t ** t
Definition mhttpd.cxx:8282
char ** var_names
Definition mhttpd.cxx:8277
int * var_index
Definition mhttpd.cxx:8278
char ** event_names
Definition mhttpd.cxx:8276
int * status
Definition mhttpd.cxx:8280
time_t * last_written
Definition mhttpd.cxx:8286
int * num_entries
Definition mhttpd.cxx:8281
Here is the call graph for this function:

◆ Free()

void HistoryData::Free ( )
inline

Definition at line 8310 of file mhttpd.cxx.

8310 {
8315 DELETE(status);
8320 nvars = 0;
8321 alloc_nvars = 0;
8322 have_last_written = false;
8323 }
#define DELETE(x)
Definition mhttpd.cxx:8268
#define DELETEA(x, n)
Definition mhttpd.cxx:8269
Here is the caller graph for this function:

◆ Print()

void HistoryData::Print ( ) const
inline

Definition at line 8325 of file mhttpd.cxx.

8325 {
8326 printf("this %p, nvars %d. tstart %d, tend %d, scale %d\n", this, nvars, (int)tstart, (int)tend, (int)scale);
8327 for (int i=0; i<nvars; i++) {
8328 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]);
8329 if (status[i]==HS_SUCCESS && num_entries[i]>0 && t[i] && v[i])
8330 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]);
8331 printf(" last_written %d", (int)last_written[i]);
8332 printf("\n");
8333 }
8334 }
#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 8275 of file mhttpd.cxx.

◆ event_names

char** HistoryData::event_names

Definition at line 8276 of file mhttpd.cxx.

◆ have_last_written

bool HistoryData::have_last_written

Definition at line 8285 of file mhttpd.cxx.

◆ last_written

time_t* HistoryData::last_written

Definition at line 8286 of file mhttpd.cxx.

◆ num_entries

int* HistoryData::num_entries

Definition at line 8281 of file mhttpd.cxx.

◆ nvars

int HistoryData::nvars

Definition at line 8274 of file mhttpd.cxx.

◆ odb_index

int* HistoryData::odb_index

Definition at line 8279 of file mhttpd.cxx.

◆ scale

time_t HistoryData::scale

Definition at line 8290 of file mhttpd.cxx.

◆ status

int* HistoryData::status

Definition at line 8280 of file mhttpd.cxx.

◆ t

time_t** HistoryData::t

Definition at line 8282 of file mhttpd.cxx.

◆ tend

time_t HistoryData::tend

Definition at line 8289 of file mhttpd.cxx.

◆ tstart

time_t HistoryData::tstart

Definition at line 8288 of file mhttpd.cxx.

◆ v

double** HistoryData::v

Definition at line 8283 of file mhttpd.cxx.

◆ var_index

int* HistoryData::var_index

Definition at line 8278 of file mhttpd.cxx.

◆ var_names

char** HistoryData::var_names

Definition at line 8277 of file mhttpd.cxx.


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