Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "TGo4ComCloseAnalysis.h"
00015
00016 #include "TGo4Log.h"
00017 #include "TGo4AnalysisImp.h"
00018 #include "TGo4AnalysisClientImp.h"
00019
00020 TGo4ComCloseAnalysis::TGo4ComCloseAnalysis()
00021 :TGo4AnalysisCommand("ANClose","closes analysis event classes")
00022 {
00023 GO4TRACE((12,"TGo4ComCloseAnalysis::TGo4ComCloseAnalysis() ctor",__LINE__, __FILE__));
00024 SetReceiverName("AnalysisClient");
00025
00026 SetProtection(kGo4ComModeController);
00027 }
00028
00029 TGo4ComCloseAnalysis::~TGo4ComCloseAnalysis()
00030 {
00031 GO4TRACE((12,"TGo4ComCloseAnalysis::~TGo4ComCloseAnalysis() dtor",__LINE__, __FILE__));
00032 }
00033
00034 Int_t TGo4ComCloseAnalysis::ExeCom()
00035 {
00036 GO4TRACE((12,"TGo4ComCloseAnalysis::ExeCom() dtor",__LINE__, __FILE__));
00037
00038 TGo4AnalysisClient* cli=dynamic_cast<TGo4AnalysisClient*> (fxReceiverBase);
00039 if (cli==0) {
00040 GO4TRACE((11,"TGo4ComCloseAnalysis::ExeCom() - no receiver specified ERROR!",__LINE__, __FILE__));
00041 TGo4Log::Debug(" !!! ComCloseAnalysis ''%s'': NO RECEIVER ERROR!!!",GetName());
00042 return 1;
00043 }
00044
00045 GO4TRACE((11,"TGo4ComCloseAnalysis::ExeCom() - found valid receiver",__LINE__, __FILE__));
00046 TGo4Analysis* ana = TGo4Analysis::Instance();
00047 if(ana) {
00048 if(cli->MainIsRunning()) ana->PostLoop();
00049
00050
00051 ana->CloseAnalysis();
00052 cli->SendStatusMessage(1, kFALSE,TString::Format("Analysis %s was closed.",ana->GetName()));
00053 } else {
00054 cli->SendStatusMessage(3, kTRUE,TString::Format(" %s ERROR no analysis ",GetName()));
00055 }
00056
00057
00058 return -1;
00059 }