00001
00021
00022 #ifndef __TANALYSER_HH
00023 #define __TANALYSER_HH
00024
00025 #include "Tglobals.h"
00026
00027 class TExtractor;
00028 class TMatrixElement;
00029
00030
00050 class TAnalyser
00051 {
00052
00053 protected:
00054 Tstring theAnalyserID;
00055 TExtractor** theExtractorList;
00056 Tint theExtractorListCapacity;
00057 Tint theNumberOfExtractors;
00058 Tint theExtractorIndex;
00059
00060 public:
00061 TAnalyser( const Tstring& id );
00062 virtual ~TAnalyser();
00063
00064 public:
00065 Tint AddExtractor( TExtractor* extractor );
00066 Tint RemoveExtractor( Tint index );
00067 Tvoid ClearExtractorList();
00068 Tbool ResizeExtractorList( Tint capacity );
00069 TExtractor* NextExtractor();
00070 TExtractor* FindExtractor( const Tstring& id );
00071 TExtractor* GetExtractor( Tint index );
00072 TExtractor* GetExtractor();
00073 Tint GetExtractorListCapacity() const;
00074 Tint GetNumberOfExtractors() const;
00075 Tint GetExtractorIndex() const;
00076 Tvoid SetExtractorIndex( Tint index );
00077 const Tstring& GetAnalyserID() const;
00078 Tvoid SetAnalyserID( const Tstring& id );
00079
00080 public:
00081 virtual Tvoid NotFoundExtractor();
00082
00083 public:
00084 virtual Tvoid OpenCanvas( const Tstring& id, const Tstring& title, Tint width = 640, Tint height = 480 ) = 0;
00085 virtual Tvoid ClearCanvas( const Tstring& id ) = 0;
00086 virtual Tvoid CloseCanvas( const Tstring& id ) = 0;
00087 virtual Tvoid Create1DHistogram( const Tstring& id, const Tstring& title, Tint nbin, Tdouble min, Tdouble max ) = 0;
00088 virtual Tvoid Create2DHistogram( const Tstring& id, const Tstring& title, Tint xbin, Tdouble xmin, Tdouble xmax, Tint ybin, Tdouble ymin, Tdouble ymax ) = 0;
00089 virtual Tvoid CreateAppendGraph( const Tstring& id, const Tstring& title ) = 0;
00090 virtual Tvoid CreateSubstituteGraph( const Tstring& id, const Tstring& title ) = 0;
00091 virtual Tvoid Fill( const TMatrixElement& matrix ) = 0;
00092 virtual Tvoid Clear( const Tstring& id ) = 0;
00093 virtual Tvoid Remove( const Tstring& id ) = 0;
00094 virtual Tvoid Update( const Tstring& id ) = 0;
00095
00096 protected:
00097 Tvoid free();
00098 Tvoid allocate( Tint capacity );
00099
00100 };
00101
00102 inline Tint TAnalyser::GetExtractorListCapacity() const
00103 {
00104 return theExtractorListCapacity;
00105 }
00106
00107 inline Tint TAnalyser::GetNumberOfExtractors() const
00108 {
00109 return theNumberOfExtractors;
00110 }
00111
00112 inline Tint TAnalyser::GetExtractorIndex() const
00113 {
00114 return theExtractorIndex;
00115 }
00116
00117 inline Tvoid TAnalyser::SetExtractorIndex( Tint index )
00118 {
00119 theExtractorIndex = index;
00120 return;
00121 }
00122
00123 inline const Tstring& TAnalyser::GetAnalyserID() const
00124 {
00125 return theAnalyserID;
00126 }
00127
00128 inline Tvoid TAnalyser::SetAnalyserID( const Tstring& id )
00129 {
00130 theAnalyserID = id;
00131 return;
00132 }
00133
00134 #endif