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

Constructor & Destructor Documentation

◆ HistoryData()

HistoryData::HistoryData ( )
inline

Definition at line 8311 of file mhttpd.cxx.

8312 {
8313 nvars = 0;
8314 alloc_nvars = 0;
8315 have_last_written = false;
8316 tstart = 0;
8317 tend = 0;
8318 scale = 0;
8319 }
time_t tstart
Definition mhttpd.cxx:8263
int alloc_nvars
Definition mhttpd.cxx:8250
time_t tend
Definition mhttpd.cxx:8264
bool have_last_written
Definition mhttpd.cxx:8260
time_t scale
Definition mhttpd.cxx:8265

◆ ~HistoryData()

HistoryData::~HistoryData ( )
inline

Definition at line 8321 of file mhttpd.cxx.

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

Member Function Documentation

◆ Allocate()

void HistoryData::Allocate ( int  xnvars)
inline

Definition at line 8267 of file mhttpd.cxx.

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

◆ Free()

void HistoryData::Free ( )
inline

Definition at line 8285 of file mhttpd.cxx.

8285 {
8290 DELETE(status);
8295 nvars = 0;
8296 alloc_nvars = 0;
8297 have_last_written = false;
8298 }
#define DELETE(x)
Definition mhttpd.cxx:8243
#define DELETEA(x, n)
Definition mhttpd.cxx:8244
Here is the caller graph for this function:

◆ Print()

void HistoryData::Print ( ) const
inline

Definition at line 8300 of file mhttpd.cxx.

8300 {
8301 printf("this %p, nvars %d. tstart %d, tend %d, scale %d\n", this, nvars, (int)tstart, (int)tend, (int)scale);
8302 for (int i=0; i<nvars; i++) {
8303 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]);
8304 if (status[i]==HS_SUCCESS && num_entries[i]>0 && t[i] && v[i])
8305 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]);
8306 printf(" last_written %d", (int)last_written[i]);
8307 printf("\n");
8308 }
8309 }
#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 8250 of file mhttpd.cxx.

◆ event_names

char** HistoryData::event_names

Definition at line 8251 of file mhttpd.cxx.

◆ have_last_written

bool HistoryData::have_last_written

Definition at line 8260 of file mhttpd.cxx.

◆ last_written

time_t* HistoryData::last_written

Definition at line 8261 of file mhttpd.cxx.

◆ num_entries

int* HistoryData::num_entries

Definition at line 8256 of file mhttpd.cxx.

◆ nvars

int HistoryData::nvars

Definition at line 8249 of file mhttpd.cxx.

◆ odb_index

int* HistoryData::odb_index

Definition at line 8254 of file mhttpd.cxx.

◆ scale

time_t HistoryData::scale

Definition at line 8265 of file mhttpd.cxx.

◆ status

int* HistoryData::status

Definition at line 8255 of file mhttpd.cxx.

◆ t

time_t** HistoryData::t

Definition at line 8257 of file mhttpd.cxx.

◆ tend

time_t HistoryData::tend

Definition at line 8264 of file mhttpd.cxx.

◆ tstart

time_t HistoryData::tstart

Definition at line 8263 of file mhttpd.cxx.

◆ v

double** HistoryData::v

Definition at line 8258 of file mhttpd.cxx.

◆ var_index

int* HistoryData::var_index

Definition at line 8253 of file mhttpd.cxx.

◆ var_names

char** HistoryData::var_names

Definition at line 8252 of file mhttpd.cxx.


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