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