Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4AnalysisClient/TGo4AnalysisClientImp.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #ifndef TGO4ANALYSISCLIENTIMP_H
00017 #define TGO4ANALYSISCLIENTIMP_H
00018 
00019 #include "Go4TaskHandler/TGo4ClientTask.h"
00020 #include "Go4TaskHandler/TGo4TaskStatus.h"
00021 #include "Go4TaskHandler/TGo4Slave.h"
00022 #include <Rtypes.h>
00023 
00024 class TStopwatch;
00025 class TGo4Analysis;
00026 class TGo4ClientStatus;
00027 class TGo4Ratemeter;
00028 class TGo4HistogramServer;
00029 class TTimer;
00030 class TGo4InterruptHandler;
00031 
00037 class TGo4AnalysisClient : public TGo4Slave {
00038   public:
00039     TGo4AnalysisClient(const char* name, 
00040                        TGo4Analysis* analysis, 
00041                        const char* host="localhost", 
00042                        UInt_t negport=0,
00043                        Bool_t histoserver=kFALSE, 
00044                        const char* basename="Go4", 
00045                        const char* passwd="abcd",
00046                        Bool_t servermode=kFALSE,
00047                        Bool_t autorun=kFALSE,
00048                        Bool_t clientmode=kFALSE);
00049 
00050     TGo4AnalysisClient(int argc, char** argv, 
00051                        TGo4Analysis* analysis,
00052                        Bool_t histoserver=kFALSE, 
00053                        const char* basename="Go4", 
00054                        const char* passwd="abcd",
00055                        Bool_t servermode=kFALSE,
00056                        Bool_t autorun=kFALSE);
00057 
00058     virtual ~TGo4AnalysisClient();
00059 
00060     TGo4Analysis* GetAnalysis() const { return fxAnalysis; }
00061 
00062     virtual void Start();
00063 
00064     virtual void Stop();
00065 
00068     virtual void KillMain();
00069 
00072     virtual void RestartMain();
00073 
00078     virtual TGo4TaskStatus* CreateStatus();
00079 
00082     virtual Int_t Initialization();
00083 
00087     void SendAnalysisObject(const Text_t* name);
00088 
00091     void SendAnalysisStatus();
00092 
00095     void SendAnalysisClientStatus();
00096 
00098     void SendNamesList();
00099 
00101     void UpdateRate(Int_t counts=1);
00102 
00104     UInt_t GetCurrentCount();
00105 
00107     Bool_t TestRatemeter();
00108 
00110     Bool_t TestBufferUpdateConditions();
00111 
00114     void StartObjectServer(const Text_t* basename,  const Text_t* passwd);
00115 
00117     void StopObjectServer();
00118 
00119 
00123     virtual Int_t StartWorkThreads();
00124 
00128     virtual Int_t StopWorkThreads();
00129 
00131     virtual void Terminate ();
00132 
00134     virtual void TerminateFast ();
00135 
00138     virtual void ExecuteString(const Text_t* command);
00139    
00140     void SetCintMode(Bool_t on=kTRUE);
00141 
00142     Bool_t& IsCintMode(){ return fbCintMode;}
00143    
00145     static const Text_t fgcMAINTHREAD[]; 
00146 
00148     static const Text_t fgcWATCHTHREAD[]; 
00149 
00151     static const UInt_t fguSTATUSUPDATE;
00152 
00154     static const Double_t fgdSTATUSTIMEOUT;
00155     
00157     static const UInt_t fguCINTTIMERPERIOD;
00158 
00159   private:
00160 
00161     void Constructor(Bool_t starthistserv=kFALSE, const char* basename="Go4", const char* passwd="abcd");
00162 
00165     void UpdateStatus(TGo4TaskStatus * state);
00166 
00167 
00168 private:
00169 
00174     TGo4Analysis* fxAnalysis;                   
00175 
00177     Text_t* fcMainName;                          
00178 
00180     Text_t* fcWatchName;                         
00181 
00183     Double_t fdBufferUpdateTime;
00184 
00186     TStopwatch* fxUpdateWatch;                   
00187 
00190     TGo4Ratemeter* fxRatemeter;                  
00191 
00195     TGo4HistogramServer* fxHistoServer;          
00196 
00199     Bool_t fbAutoStart;
00200 
00203     Bool_t fbCintMode;
00204 
00208     TTimer* fxCintLockTimer;
00209     
00211     TGo4InterruptHandler* fxInterruptHandler; 
00212 
00213     TGo4AnalysisClient();
00214 
00215   ClassDef(TGo4AnalysisClient,1)
00216   
00217 };
00218 
00219 #endif //TGO4ANALYSISCLIENT_H
00220 
00221 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:50 2005 for Go4-v2.10-5 by doxygen1.2.15