00001 /*************************************************************************** 00002 data.h - description 00003 ------------------- 00004 begin : Sat Dec 30 2006 00005 copyright : (C) 2001 by Thies Jochimsen 00006 email : jochimse@cns.mpg.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef RECODATA_H 00019 #define RECODATA_H 00020 00021 #include <odinreco/odinreco.h> 00022 #include <odinreco/index.h> 00023 00024 00025 00031 00032 00033 00037 template <int N_rank> struct Rank {}; 00038 00039 00041 00042 00043 class Profiler; // forward declaration 00044 00048 class RecoData { 00049 00050 public: 00051 00058 enum dataMode {complex_data=0, real_data, weighted_real_data}; 00059 00063 RecoData(const RecoCoord& coord=RecoCoord()) : override_protocol(0), mode(complex_data), interpolated(0), kcoord(coord), prof(0) {} 00064 00068 RecoData(const RecoData& rd) : prof(0) {RecoData::operator = (rd);} 00069 00073 ~RecoData(); 00074 00078 RecoData& operator = (const RecoData& rd); 00079 00080 00084 RecoData& copy_meta(const RecoData& rd); 00085 00086 00091 ComplexData<1>& data(Rank<1>) const {return data1;} 00092 ComplexData<2>& data(Rank<2>) const {return data2;} 00093 ComplexData<3>& data(Rank<3>) const {return data3;} 00094 ComplexData<4>& data(Rank<4>) const {return data4;} 00095 ComplexData<5>& data(Rank<5>) const {return data5;} 00096 00100 RecoCoord& coord() {return kcoord;} 00101 00105 RecoData& free(int dim); 00106 00110 const RecoCoord& coord() const {return kcoord;} 00111 00115 const Protocol* override_protocol; 00116 00120 dataMode mode; 00121 00125 const CoordCountMap* interpolated; 00126 00131 void new_profiler(const STD_string& steplabel); 00132 00133 00134 private: 00135 00136 RecoCoord kcoord; 00137 00138 const Profiler* prof; 00139 00140 mutable ComplexData<1> data1; 00141 mutable ComplexData<2> data2; 00142 mutable ComplexData<3> data3; 00143 mutable ComplexData<4> data4; 00144 mutable ComplexData<5> data5; 00145 00146 }; 00147 00148 00149 00150 00155 #endif 00156
1.5.6