• Main Page
  • Related Pages
  • Modules
  • Classes
  • Files
  • File List

data.h

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   ComplexData<6>& data(Rank<6>) const {return data6;}
00097   ComplexData<7>& data(Rank<7>) const {return data7;}
00098   ComplexData<8>& data(Rank<8>) const {return data8;}
00099 
00103   RecoCoord& coord() {return kcoord;}
00104 
00108   RecoData& free(int dim);
00109 
00113   const RecoCoord& coord() const {return kcoord;}
00114 
00118   const Protocol* override_protocol;
00119 
00123   dataMode mode;
00124 
00128   const CoordCountMap* interpolated;
00129 
00134   void new_profiler(const STD_string& steplabel);
00135 
00136 
00137  private:
00138 
00139   RecoCoord kcoord;
00140 
00141   const Profiler* prof;
00142 
00143   mutable ComplexData<1> data1;
00144   mutable ComplexData<2> data2;
00145   mutable ComplexData<3> data3;
00146   mutable ComplexData<4> data4;
00147   mutable ComplexData<5> data5;
00148   mutable ComplexData<6> data6;
00149   mutable ComplexData<7> data7;
00150   mutable ComplexData<8> data8;
00151 
00152 };
00153 
00154 
00155 
00156 
00161 #endif
00162 

Generated on Tue Dec 18 2012 15:11:14 by  doxygen 1.7.1