00001 // $Id: ReconAnalysis.h,v 1.1.1.1 1999/12/28 01:36:02 burnett Exp $ 00002 // 00003 // Original author: Sawyer Gillespie 00004 // hgillesp@u.washington.edu 00005 // 00006 00007 #ifndef _H_ReconAnalysis_reconstruction_ 00008 #define _H_ReconAnalysis_reconstruction_ 00009 00010 // includes 00011 #include "reconstruction/LbldData.h" 00012 00013 // forward declarations 00014 class GlastRecon; 00015 00016 // class ReconAnalysis 00017 // Defines some common behaviors for reconstruction analysis 00018 // calculation classes. Namely, this class defines the interface 00019 // to the reconstruction data. The Result class defines an interface 00020 // for all of the results of the ReconAnalysis functions. 00021 // 00022 class ReconAnalysis { 00023 public: 00024 // constructor 00025 ReconAnalysis ( GlastRecon* recon ); 00026 00027 // destructor 00028 virtual ~ReconAnalysis (); 00029 00030 // setData - sets the data object for this particular analysis to write into 00031 void setData ( LbldData* d ); 00032 00033 // perform the analysis - this method must be overridden by 00034 // subclasses 00035 virtual void compute () = 0; 00036 00037 // class Result 00038 // This class defines the result of the ReconAnalysis computation 00039 class Result { 00040 public: 00041 // constructor 00042 Result () {} 00043 00044 // destructor 00045 virtual ~Result () {} 00046 00047 /* for expansion */ 00048 }; 00049 00050 // access the result of this computation 00051 const Result* result () const; 00052 00053 // clear the results 00054 void clear (); 00055 00056 protected: 00057 00058 // access to the reconstruction data 00059 GlastRecon* recon (); 00060 00061 // set the result of this computation 00062 void result ( Result* ); 00063 00064 // access the data for this particular object 00065 LbldData* data (); 00066 00067 // set-up the various parameters used by this 00068 // analysis object 00069 virtual void setUpData () {} 00070 00071 private: 00072 00073 // data members 00074 GlastRecon* m_recon; // the actual reconstruction data 00075 Result* m_result; // the result of the computation 00076 LbldData* m_data; // the data object to write into 00077 }; 00078 00079 // inline declarations 00080 00081 // ReconAnalysis class 00082 00083 inline ReconAnalysis::ReconAnalysis (GlastRecon* recon) 00084 : m_recon (recon), m_result(0), m_data(0) 00085 { 00086 } 00087 00088 inline const ReconAnalysis::Result* ReconAnalysis::result () const 00089 { 00090 return m_result; 00091 } 00092 00093 inline void ReconAnalysis::result ( ReconAnalysis::Result* r ) 00094 { 00095 delete m_result; 00096 m_result = r; 00097 } 00098 00099 inline GlastRecon* ReconAnalysis::recon () 00100 { 00101 return m_recon; 00102 } 00103 00104 inline void ReconAnalysis::clear () 00105 { 00106 result (0); 00107 } 00108 00109 inline LbldData* ReconAnalysis::data () 00110 { 00111 return m_data; 00112 } 00113 00114 inline void ReconAnalysis::setData ( LbldData* d ) 00115 { 00116 m_data = d; 00117 setUpData (); 00118 } 00119 00120 #endif // _H_ReconAnalysis_reconstruction
1.2.3 written by Dimitri van Heesch,
© 1997-2000