Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4AnalysisClientImp.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 "TGo4Slave.h"
00020 
00021 class TTimer;
00022 class TStopwatch;
00023 class TGo4Analysis;
00024 class TGo4ClientStatus;
00025 class TGo4Ratemeter;
00026 class TGo4HistogramServer;
00027 class TGo4TaskStatus;
00028 class TGo4InterruptHandler;
00029 
00035 class TGo4AnalysisClient : public TGo4Slave {
00036 
00037   public:
00038     TGo4AnalysisClient(const char* name,
00039                        TGo4Analysis* analysis,
00040                        const char* host="localhost",
00041                        UInt_t negport=0,
00042                        Bool_t histoserver=kFALSE,
00043                        const char* basename="Go4",
00044                        const char* passwd="abcd",
00045                        Bool_t servermode=kFALSE,
00046                        Bool_t autorun=kFALSE,
00047                        Bool_t clientmode = kFALSE);
00048 
00049     TGo4AnalysisClient(int argc, char** argv,
00050                        TGo4Analysis* analysis,
00051                        Bool_t histoserver=kFALSE,
00052                        const char* basename="Go4",
00053                        const char* passwd="abcd",
00054                        Bool_t servermode=kFALSE,
00055                        Bool_t autorun=kFALSE);
00056 
00057     virtual ~TGo4AnalysisClient();
00058 
00059     TGo4Analysis* GetAnalysis() const { return fxAnalysis; }
00060 
00061     virtual void Start();
00062 
00063     virtual void Stop();
00064 
00067     virtual void KillMain();
00068 
00071     virtual void RestartMain();
00072 
00077     virtual TGo4TaskStatus* CreateStatus();
00078 
00081     virtual Int_t Initialization();
00082 
00086     void SendAnalysisObject(const Text_t* name);
00087 
00090     void SendAnalysisStatus();
00091 
00094     void SendAnalysisClientStatus();
00095 
00097     void SendNamesList();
00098 
00100     void UpdateRate(Int_t counts=1);
00101 
00103     UInt_t GetCurrentCount();
00104 
00106     Bool_t TestRatemeter();
00107 
00109     Bool_t TestBufferUpdateConditions();
00110 
00113     void StartObjectServer(const Text_t* basename,  const Text_t* passwd);
00114 
00116     void StopObjectServer();
00117 
00118 
00122     virtual Int_t StartWorkThreads();
00123 
00127     virtual Int_t StopWorkThreads();
00128 
00130     virtual void Terminate (Bool_t termapp=kTRUE);
00131 
00133     virtual void TerminateFast ();
00134 
00137     virtual void ExecuteString(const Text_t* command);
00138 
00139     void SetCintMode(Bool_t on=kTRUE);
00140 
00141     Bool_t& IsCintMode(){ return fbCintMode;}
00142 
00145     void LockAll();
00146 
00149     void UnLockAll();
00150 
00152     static const Text_t fgcMAINTHREAD[]; 
00153 
00155     static const Text_t fgcWATCHTHREAD[]; 
00156 
00158     static const UInt_t fguSTATUSUPDATE;
00159 
00161     static const Double_t fgdSTATUSTIMEOUT;
00162 
00164     static const UInt_t fguCINTTIMERPERIOD;
00165 
00166   private:
00167 
00168     void Constructor(Bool_t starthistserv=kFALSE, const char* basename="Go4", const char* passwd="abcd");
00169 
00172     void UpdateStatus(TGo4TaskStatus * state);
00173 
00174 
00175 
00176 private:
00177 
00182     TGo4Analysis* fxAnalysis;                   
00183 
00185     Text_t* fcMainName;                          
00186 
00188     Text_t* fcWatchName;                         
00189 
00191     Double_t fdBufferUpdateTime;
00192 
00194     TStopwatch* fxUpdateWatch;                   
00195 
00198     TGo4Ratemeter* fxRatemeter;                  
00199 
00203     TGo4HistogramServer* fxHistoServer;          
00204 
00207     Bool_t fbAutoStart;
00208 
00211     Bool_t fbCintMode;
00212 
00216     TTimer* fxCintLockTimer; 
00217 
00219     TGo4InterruptHandler* fxInterruptHandler; 
00220 
00221     TGo4AnalysisClient();
00222 
00223   ClassDef(TGo4AnalysisClient,1)
00224 
00225 };
00226 
00227 #endif //TGO4ANALYSISCLIENT_H
00228 
00229 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:04 2008 for Go4-v3.04-1 by  doxygen 1.4.2