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 #include "TGo4AnalysisStatusMonitorSlots.h" 00017 00018 #include <iostream.h> 00019 00020 #include "Go4GUIRegistry/TGo4GUIRegistry.h" 00021 #include "Go4AnalysisClient/TGo4AnalysisClientStatus.h" 00022 #include "TGo4AnalysisStatusMonitor.h" 00023 #include "TGo4AnalysisStatusMonitorStatus.h" 00024 00025 TGo4AnalysisStatusMonitorSlots::TGo4AnalysisStatusMonitorSlots(const char * name, const char * title, TGo4AnalysisStatusMonitor * p) 00026 :TGo4SlotsBaseClass(name , title), fxTGo4AnalysisStatusMonitor(p) 00027 { 00028 // TGo4LockGuard Global; 00029 fxTGo4GUIRegistry = TGo4GUIRegistry::Instance(); 00030 fxTGo4AnalysisStatusMonitorStatus= new TGo4AnalysisStatusMonitorStatus("(TGo4AnalysisStatusMonitorStatus", "Test Status 1"); 00031 fxTGo4GUIRegistry->RegisterSlotClass(this, fxTGo4AnalysisStatusMonitorStatus, p); 00032 fxTGo4GUIRegistry->SetDisplayStatusMonitor(this); 00033 } 00034 00035 TGo4AnalysisStatusMonitorSlots::~TGo4AnalysisStatusMonitorSlots() {} 00036 00037 void TGo4AnalysisStatusMonitorSlots::SetGUI(TGo4AnalysisStatusMonitor * GUI) 00038 { 00039 fxTGo4AnalysisStatusMonitor=GUI; 00040 fxTGo4GUIRegistry->GuiIsChanged(this, GUI); 00041 } 00042 00043 void TGo4AnalysisStatusMonitorSlots::StatusChanged(TGo4Status *status) 00044 { 00045 // TGo4LockGuard Global; 00046 //cout << "TGo4AnalysisStatusMonitorSlots::StatusChanged " << fxTGo4AnalysisStatusMonitor << endl; 00047 if(fxTGo4AnalysisStatusMonitor!=0){ 00048 fxTGo4AnalysisStatusMonitor->SetRate(((TGo4AnalysisClientStatus *)status)->GetRate()); 00049 fxTGo4AnalysisStatusMonitor->SetAvRate(((TGo4AnalysisClientStatus *)status)->GetAvRate()); 00050 fxTGo4AnalysisStatusMonitor->SetTime(((TGo4AnalysisClientStatus *)status)->GetTime()); 00051 fxTGo4AnalysisStatusMonitor->SetEventNo(((TGo4AnalysisClientStatus *)status)->GetCurrentCount()); 00052 fxTGo4AnalysisStatusMonitor->SetDateString(((TGo4AnalysisClientStatus *)status)->GetDateTime()); 00053 00054 } 00055 delete status; 00056 } 00057 00058 TGo4Status * TGo4AnalysisStatusMonitorSlots::GetStatus() 00059 { 00060 return fxTGo4AnalysisStatusMonitorStatus; 00061 } 00062 00063 //----------------------------END OF GO4 SOURCE FILE ---------------------