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