ODIN
odinreco/data.h
1 /***************************************************************************
2  data.h - description
3  -------------------
4  begin : Sat Dec 30 2006
5  copyright : (C) 2000-2021 by Thies Jochimsen
6  email : thies@jochimsen.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef RECODATA_H
19 #define RECODATA_H
20 
21 #include <odinreco/odinreco.h>
22 #include <odinreco/index.h>
23 
24 
25 
32 
33 
37 template <int N_rank> struct Rank {};
38 
39 
41 
42 
43 class Profiler; // forward declaration
44 
48 class RecoData {
49 
50  public:
51 
58  enum dataMode {complex_data=0, real_data, weighted_real_data};
59 
63  RecoData(const RecoCoord& coord=RecoCoord()) : override_protocol(0), mode(complex_data), interpolated(0), kcoord(coord), prof(0) {}
64 
68  RecoData(const RecoData& rd) : prof(0) {RecoData::operator = (rd);}
69 
74 
79 
80 
85 
86 
91  ComplexData<1>& data(Rank<1>) const {return data1;}
92  ComplexData<2>& data(Rank<2>) const {return data2;}
93  ComplexData<3>& data(Rank<3>) const {return data3;}
94  ComplexData<4>& data(Rank<4>) const {return data4;}
95  ComplexData<5>& data(Rank<5>) const {return data5;}
96  ComplexData<6>& data(Rank<6>) const {return data6;}
97  ComplexData<7>& data(Rank<7>) const {return data7;}
98  ComplexData<8>& data(Rank<8>) const {return data8;}
99 
103  RecoCoord& coord() {return kcoord;}
104 
108  RecoData& free(int dim);
109 
113  const RecoCoord& coord() const {return kcoord;}
114 
119 
124 
129 
134  void new_profiler(const STD_string& steplabel);
135 
136 
137  private:
138 
139  RecoCoord kcoord;
140 
141  const Profiler* prof;
142 
143  mutable ComplexData<1> data1;
144  mutable ComplexData<2> data2;
145  mutable ComplexData<3> data3;
146  mutable ComplexData<4> data4;
147  mutable ComplexData<5> data5;
148  mutable ComplexData<6> data6;
149  mutable ComplexData<7> data7;
150  mutable ComplexData<8> data8;
151 
152 };
153 
154 
155 
156 
161 #endif
162 
Protocol proxy.
Definition: protocol.h:33
const RecoCoord & coord() const
RecoData & copy_meta(const RecoData &rd)
RecoData & operator=(const RecoData &rd)
RecoData & free(int dim)
dataMode mode
const Protocol * override_protocol
const CoordCountMap * interpolated
RecoData(const RecoData &rd)
Definition: odinreco/data.h:68
RecoData(const RecoCoord &coord=RecoCoord())
Definition: odinreco/data.h:63
ComplexData< 1 > & data(Rank< 1 >) const
Definition: odinreco/data.h:91
RecoCoord & coord()
void new_profiler(const STD_string &steplabel)
STD_map< RecoCoord, UInt > CoordCountMap
Definition: index.h:364