McStas Readout Master 0.3.3
Loading...
Searching...
No Matches
readout_collector.h
1#ifndef COLLECTOR_WRAPPER
2#define COLLECTOR_WRAPPER
3
4#include <stddef.h>
5#include <stdint.h>
6#include "readout_structs.h"
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12 struct collector;
13 typedef struct collector collector_t;
14
26 RL_API collector_t* collector_new(const char* filename, const char * dataset, int type, uint64_t normalization);
27
29 RL_API void collector_free(collector_t* c_ptr);
30
42 RL_API void collector_efu(collector_t* c_ptr, const char* address, int port);
43
61 RL_API collector_t* collector_star_new(const char* filename, const char * dataset, const char * description, int ess_type, uint64_t normalization);
62
68 RL_API void collector_star_add(const collector_t* c_ptr, double weight, const void* record);
69
71 RL_API size_t collector_record_size(const collector_t* c_ptr);
72
77 RL_API const char * readout_description_for(int ess_type);
78
79 RL_API int collector_sink_open(const char * filename);
80 RL_API int collector_sink_users(const char * filename);
81
102 RL_API void collector_add(const collector_t* c_ptr, uint8_t ring, uint8_t fen, double tof, double weight, const void* data);
103
117 RL_API void collector_merge_files(const char * out_filename, const char ** in_filenames, size_t count, int reset_datasets);
118 RL_API void collector_concatenate_files(const char * out_filename, const char ** in_filenames, size_t count);
119
134 RL_API void collector_sink_int(const char* name, int value, const char* unit, const char* description);
135 RL_API void collector_sink_double(const char* name, double value, const char* unit, const char* description);
136 RL_API void collector_sink_string(const char* name, const char* value, const char* unit, const char* description);
137
138 RL_API int collector_construct_filename_size(const char * basepath, const char * basename);
139 RL_API int collector_construct_filename(const char * basepath, const char * basename, char * filename);
140 RL_API int collector_mpi_node_filename_size(const char * basepath, const char * basename, int node_index, int total_nodes);
141 RL_API int collector_mpi_node_filename(const char * basepath, const char * basename, char * filename, int node_index, int total_nodes);
142 RL_API int collector_mpi_node_filename_sizes(const char * basepath, const char * basename, int total_nodes, int * sizes);
143 RL_API int collector_mpi_node_filenames(const char * basepath, const char * basename, char ** filenames, int total_nodes);
144
145#ifdef __cplusplus
146}
147#endif
148
149#endif