Particle Identification and Tracking
wrapper_i_plu.h
Go to the documentation of this file.
1 //Copyright 2008,2009 Thomas A Caswell
2 //tcaswell@uchicago.edu
3 //http://jfi.uchicago.edu/~tcaswell
4 //
5 //This program is free software; you can redistribute it and/or modify
6 //it under the terms of the GNU General Public License as published by
7 //the Free Software Foundation; either version 3 of the License, or (at
8 //your option) any later version.
9 //
10 //This program is distributed in the hope that it will be useful, but
11 //WITHOUT ANY WARRANTY; without even the implied warranty of
12 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 //General Public License for more details.
14 //
15 //You should have received a copy of the GNU General Public License
16 //along with this program; if not, see <http://www.gnu.org/licenses>.
17 //
18 //Additional permission under GNU GPL version 3 section 7
19 //
20 //If you modify this Program, or any covered work, by linking or
21 //combining it with MATLAB (or a modified version of that library),
22 //containing parts covered by the terms of MATLAB User License, the
23 //licensors of this Program grant you additional permission to convey
24 //the resulting work.
25 
26 
27 
28 #ifndef WRAPPER_I_PLU
29 #define WRAPPER_I_PLU
30 
31 #include <complex>
32 #include <vector>
33 #include <stdexcept>
34 #include "wrapper_i.h"
35 #include "enum_utils.h"
36 #include "data_map.h"
37 #include "ipp.h"
38 #include "tuple.h"
39 
40 namespace iden{
41 
42 class params_matlab;
48 
49 public:
50 
54  void add_frame_data(Ipp32f[][9], int frame ,int num);
55 
56  int get_num_entries(unsigned int j) const;
57 
58  int get_num_entries() const;
59 
60 
61 
62 
63  // void print(int ind);
64  void print()const;
65 
66 
67  int get_value(int& out,int ind,utilities::D_TYPE type, int frame) const;
68  float get_value(float &out,int ind, utilities::D_TYPE type,int frame )const;
69  std::complex<float> get_value(std::complex<float> &out,int ind, utilities::D_TYPE type,int frame )const
70  {throw std::logic_error("wrapper_i_plu:wrapper has no complex support");}
72 
73 
75  Wrapper_i_plu(int);
76 
77 
78  virtual ~Wrapper_i_plu();
79 
80 
81 
82 
83  bool contains_type(utilities::D_TYPE) const;
84 
85  int get_num_frames()const
86  {
87  return frame_count_.size();
88  }
89 
90  std::set<utilities::D_TYPE> get_data_types() const
91  {
92  return std::set<utilities::D_TYPE>(data_types_);
93  }
94 
96 
97 private:
102  std::vector<Ipp32f(*) [9]> data_;
103  std::vector<int> frame_count_;
104 
105  static const int cols = 9;
106 
107 
108 protected:
116  std::set<utilities::D_TYPE> data_types_;
121 
125  int count_;
130 
131 };
132 
133 }
134 
135 #endif