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

Constructor & Destructor Documentation

◆ HistoryData()

HistoryData::HistoryData ( )
inline

Definition at line 8306 of file mhttpd.cxx.

8307 {
8308 nvars = 0;
8309 alloc_nvars = 0;
8310 have_last_written = false;
8311 tstart = 0;
8312 tend = 0;
8313 scale = 0;
8314 }
time_t tstart
Definition mhttpd.cxx:8258
int alloc_nvars
Definition mhttpd.cxx:8245
time_t tend
Definition mhttpd.cxx:8259
bool have_last_written
Definition mhttpd.cxx:8255
time_t scale
Definition mhttpd.cxx:8260

◆ ~HistoryData()

HistoryData::~HistoryData ( )
inline

Definition at line 8316 of file mhttpd.cxx.

8317 {
8318 if (alloc_nvars > 0)
8319 Free();
8320 }
void Free()
Definition mhttpd.cxx:8280
Here is the call graph for this function:

Member Function Documentation

◆ Allocate()

void HistoryData::Allocate ( int  xnvars)
inline

Definition at line 8262 of file mhttpd.cxx.

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

◆ Free()

void HistoryData::Free ( )
inline

Definition at line 8280 of file mhttpd.cxx.

8280 {
8285 DELETE(status);
8290 nvars = 0;
8291 alloc_nvars = 0;
8292 have_last_written = false;
8293 }
#define DELETE(x)
Definition mhttpd.cxx:8238
#define DELETEA(x, n)
Definition mhttpd.cxx:8239
Here is the caller graph for this function:

◆ Print()

void HistoryData::Print ( ) const
inline

Definition at line 8295 of file mhttpd.cxx.

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

◆ event_names

char** HistoryData::event_names

Definition at line 8246 of file mhttpd.cxx.

◆ have_last_written

bool HistoryData::have_last_written

Definition at line 8255 of file mhttpd.cxx.

◆ last_written

time_t* HistoryData::last_written

Definition at line 8256 of file mhttpd.cxx.

◆ num_entries

int* HistoryData::num_entries

Definition at line 8251 of file mhttpd.cxx.

◆ nvars

int HistoryData::nvars

Definition at line 8244 of file mhttpd.cxx.

◆ odb_index

int* HistoryData::odb_index

Definition at line 8249 of file mhttpd.cxx.

◆ scale

time_t HistoryData::scale

Definition at line 8260 of file mhttpd.cxx.

◆ status

int* HistoryData::status

Definition at line 8250 of file mhttpd.cxx.

◆ t

time_t** HistoryData::t

Definition at line 8252 of file mhttpd.cxx.

◆ tend

time_t HistoryData::tend

Definition at line 8259 of file mhttpd.cxx.

◆ tstart

time_t HistoryData::tstart

Definition at line 8258 of file mhttpd.cxx.

◆ v

double** HistoryData::v

Definition at line 8253 of file mhttpd.cxx.

◆ var_index

int* HistoryData::var_index

Definition at line 8248 of file mhttpd.cxx.

◆ var_names

char** HistoryData::var_names

Definition at line 8247 of file mhttpd.cxx.


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