00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TGo4ComGetDynamicEntryStatus.h"
00017
00018 #include "Go4Log/TGo4Log.h"
00019 #include "Go4DynamicList/TGo4DynamicList.h"
00020 #include "Go4DynamicList/TGo4DynamicEntryStatus.h"
00021 #include "Go4AnalysisClient/TGo4AnalysisClientImp.h"
00022 #include "Go4Analysis/TGo4AnalysisImp.h"
00023
00024 TGo4ComGetDynamicEntryStatus::TGo4ComGetDynamicEntryStatus (const char* entryname, const char* listname)
00025 :TGo4DynamicListCommand("ANGetDyn","Gets Dynamic Entry Status", entryname, listname)
00026 {
00027 TRACE((12,"TGo4ComGetDynamicEntryStatus::TGo4ComGetDynamicEntryStatus() ctor",__LINE__, __FILE__));
00028 }
00029 TGo4ComGetDynamicEntryStatus::TGo4ComGetDynamicEntryStatus()
00030 :TGo4DynamicListCommand("ANGetDyn","Get Dynamic Entry Status",0,0)
00031 {
00032 TRACE((12,"TGo4ComGetDynamicEntryStatus::TGo4ComGetDynamicEntryStatus() ctor",__LINE__, __FILE__));
00033 }
00034
00035 TGo4ComGetDynamicEntryStatus::~TGo4ComGetDynamicEntryStatus()
00036 {
00037 TRACE((12,"TGo4ComGetDynamicEntryStatus::~TGo4ComGetDynamicEntryStatus() dtor",__LINE__, __FILE__));
00038 }
00039
00040 Int_t TGo4ComGetDynamicEntryStatus::ExeCom()
00041 {
00042 TRACE((12,"TGo4ComGetDynamicEntryStatus::ExeCom()",__LINE__, __FILE__));
00043
00044 Int_t rev=-2;
00045 TGo4AnalysisClient* cli=dynamic_cast<TGo4AnalysisClient*> (fxReceiverBase);
00046 if(cli)
00047 {
00048 TGo4Analysis* ana = TGo4Analysis::Instance();
00049 if(ana)
00050 {
00051 TGo4DynamicEntryStatus* state=0;
00052 cli->SendStatusMessage(1,kFALSE,"Dynamic List status was requested from client...");
00053 TGo4DynamicList* dlist=ana->GetDynamicList(GetListName());
00054 if(dlist)
00055 {
00056 state=dlist->CreateEntryStatus(GetEntryName());
00057 if(state)
00058 {
00059 cli->SendObject(state,GetTaskName());
00060 delete state;
00061 }
00062 else
00063 {
00064 cli->SendStatusMessage(2,kTRUE,"Could not get status of dynamic entry%s",
00065 GetEntryName() );
00066 }
00067 }
00068 else
00069 {
00070 cli->SendStatusMessage(3,kTRUE,"Could not get dynamic list !!!" );
00071 }
00072 }
00073 else
00074 {
00075 cli->SendStatusMessage(3, kTRUE," %s ERROR no analysis",GetName());
00076 }
00077 }
00078 else
00079 {
00080 TRACE((11,"TGo4ComGetDynamicEntryStatus::ExeCom() - no receiver specified ERROR!",__LINE__, __FILE__));
00081 TGo4Log::Debug(" !!! ComGetDynamicEntryStatus '%s: NO RECEIVER ERROR!!!",GetName());
00082 rev=1;
00083 }
00084 return rev;
00085 }
00086
00087 ClassImp(TGo4ComGetDynamicEntryStatus)
00088
00089