00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TGo4ComStartHistoServ.h"
00017
00018 #include "Go4Log/TGo4Log.h"
00019 #include "Go4AnalysisClient/TGo4AnalysisClientImp.h"
00020 #include "Go4Log/TGo4Log.h"
00021
00022 TGo4ComStartHistoServ::TGo4ComStartHistoServ()
00023 :TGo4AnalysisCommand("ANHServStart","Starts Histogram Server aggregate")
00024 {
00025 TRACE((12,"TGo4ComStartHistoServ::TGo4ComStartHistoServ() ctor",__LINE__, __FILE__));
00026 SetReceiverName("AnalysisClient");
00027
00028 SetBaseName("user");
00029 SetPasswd("go4");
00030 SetProtection(kGo4ComModeController);
00031 }
00032
00033 TGo4ComStartHistoServ::~TGo4ComStartHistoServ()
00034 {
00035 TRACE((12,"TGo4ComStartHistoServ::~TGo4ComStartHistoServ() dtor",__LINE__, __FILE__));
00036 }
00037
00038 Int_t TGo4ComStartHistoServ::ExeCom()
00039 {
00040 TRACE((12,"TGo4ComStartHistoServ::ExeCom()",__LINE__, __FILE__));
00041
00042 TGo4AnalysisClient* cli=dynamic_cast<TGo4AnalysisClient*> (fxReceiverBase);
00043 if (cli!=0)
00044 {
00045 TRACE((11,"TGo4ComStartHistoServ::ExeCom() - found valid receiver",__LINE__, __FILE__));
00046 Text_t commandstring[TGo4ThreadManager::fguTEXTLENGTH];
00047 snprintf(commandstring,
00048 TGo4ThreadManager::fguTEXTLENGTH,
00049 "ANHServStart:%s:%s", GetBaseName(), GetPasswd());
00050 cli->SendStatusMessage(1, kTRUE,"Starting Histogram Server....");
00051 cli->ExecuteString(commandstring);
00052 }
00053 else
00054 {
00055 TRACE((11,"TGo4ComStartHistoServ::ExeCom() - no receiver specified ERROR!",__LINE__, __FILE__));
00056 TGo4Log::Debug(" !!! ComStartHistoServ ''%s'': NO RECEIVER ERROR!!!",GetName());
00057 return 1;
00058 }
00059
00060 return -1;
00061 }
00062
00063 ClassImp(TGo4ComStartHistoServ)
00064
00065