00001 // Dear emacs, this is -*-c++-*- 00002 00003 #ifndef __TCALCULATORTOOLBASE__ 00004 #define __TCALCULATORTOOLBASE__ 00005 00014 // ROOT includes 00015 #include "TString.h" 00016 00017 // Include the return object 00018 #include "TResult.h" 00019 00020 00021 namespace Root { 00022 class TCalculatorToolBase 00023 { 00024 00025 public: 00027 TCalculatorToolBase(const char* name="TCalculatorToolBase") : 00028 m_name(name), 00029 m_result( Form("%s_TResult",name) ) 00030 { 00031 } 00032 00034 virtual ~TCalculatorToolBase(){} 00035 00036 00037 // Main methods 00038 public: 00040 virtual int initialize() = 0; 00041 00043 virtual int finalize() = 0; 00044 00045 00047 inline const char* getName() const { return m_name; } 00048 00049 00051 inline const Root::TResult& getTResult( ) const { return m_result; } 00052 00053 00054 #ifdef ROOTCORE 00055 00056 ClassDef(TCalculatorToolBase,1); 00057 #endif 00058 00059 00060 // Protected members 00061 protected: 00063 TString m_name; 00064 00066 mutable TResult m_result; 00067 00068 00069 }; // End: class definition 00070 00071 00072 } // End: namespace Root 00073 00074 #endif