tttrlib
A library for time-tagged time resolved data
Loading...
Searching...
No Matches
LvArrays.h
Go to the documentation of this file.
1
9#ifndef TTTRLIB_DECAYLVARRAYS_H
10#define TTTRLIB_DECAYLVARRAYS_H
11
12#include <iostream>
13#include <cmath>
14#include <algorithm>
15#include <vector>
16#include <string>
17#include <sstream>
18
19
20typedef struct LVI32Array{
21
22 int length;
23 int* data;
24
26 free(data);
27 }
28
29 std::string str(){
30 auto s = std::stringstream();
31 s << "LVI32Array:\n";
32 s << "-- length: " << length << std::endl;
33 s << "-- data: " ;
34 for(int i=0; i < length; i++){
35 s << data[i] << ",";
36 }
37 return s.str();
38 }
39
41
42
43typedef struct LVDoubleArray{
44
45 int length;
46 double* data;
47
49 free(data);
50 }
51
52 std::string str(){
53 auto s = std::stringstream();
54 s << "LVDoubleArray:\n";
55 s << "-- length: " << length << std::endl;
56 s << "-- data: " ;
57 for(int i=0; i < length; i++){
58 s << data[i] << ",";
59 }
60 return s.str();
61 }
62
64
65
66typedef struct MParam{
67
70 LVDoubleArray** bg; // must be normalized outside!!!
71 double dt;
75 delete *expdata;
76 delete *irf;
77 delete *bg;
78 delete *corrections;
79 delete *M;
80 };
81
83
84
91
98
99
101 double dt=1.0,
102 std::vector<double> corrections = std::vector<double>(),
103 std::vector<double> irf = std::vector<double>(),
104 std::vector<double> background = std::vector<double>(),
105 std::vector<int> data = std::vector<int>()
106);
107
108#endif //TTTRLIB_DECAYLVARRAYS_H
LVI32Array * CreateLVI32Array(size_t len)
struct LVDoubleArray LVDoubleArray
LVDoubleArray * CreateLVDoubleArray(size_t len)
struct LVI32Array LVI32Array
Structures and functions used for LabView interface.
MParam * CreateMParam(double dt=1.0, std::vector< double > corrections=std::vector< double >(), std::vector< double > irf=std::vector< double >(), std::vector< double > background=std::vector< double >(), std::vector< int > data=std::vector< int >())
struct MParam MParam
Definition LvArrays.h:43
int length
Definition LvArrays.h:45
~LVDoubleArray()
Definition LvArrays.h:48
std::string str()
Definition LvArrays.h:52
double * data
Definition LvArrays.h:46
Structures and functions used for LabView interface.
Definition LvArrays.h:20
int length
Definition LvArrays.h:22
std::string str()
Definition LvArrays.h:29
~LVI32Array()
Definition LvArrays.h:25
int * data
Definition LvArrays.h:23
Definition LvArrays.h:66
LVDoubleArray ** corrections
Definition LvArrays.h:72
LVDoubleArray ** bg
Definition LvArrays.h:70
LVI32Array ** expdata
Definition LvArrays.h:68
LVDoubleArray ** irf
Definition LvArrays.h:69
double dt
Definition LvArrays.h:71
~MParam()
Definition LvArrays.h:74
LVDoubleArray ** M
Definition LvArrays.h:73