00001 // $Id: TGo4ComPrintDynList.cxx 1036 2013-11-06 10:21:12Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #include "TGo4ComPrintDynList.h" 00015 00016 #include "TGo4Log.h" 00017 #include "TGo4AnalysisClientImp.h" 00018 #include "TGo4AnalysisImp.h" 00019 00020 TGo4ComPrintDynList::TGo4ComPrintDynList() : 00021 TGo4AnalysisCommand("ANPrdyn","Printout of dynamic list") 00022 { 00023 SetReceiverName("AnalysisClient"); // this command needs client as receiver 00024 // override default receiver 00025 } 00026 00027 TGo4ComPrintDynList::~TGo4ComPrintDynList() 00028 { 00029 } 00030 00031 Int_t TGo4ComPrintDynList::ExeCom() 00032 { 00033 TGo4AnalysisClient* cli = dynamic_cast<TGo4AnalysisClient*> (fxReceiverBase); 00034 if (cli==0) { 00035 TGo4Log::Debug(" !!! ''%s'': NO RECEIVER ERROR!!!",GetName()); 00036 return 1; 00037 } 00038 00039 TGo4Analysis* ana = TGo4Analysis::Instance(); 00040 if(ana) { 00041 ana->PrintDynamicList(); 00042 cli->SendStatusMessage(1, kFALSE, TString::Format( 00043 "Analysis %s prints out dynamic list status.",ana->GetName())); 00044 } else { 00045 cli->SendStatusMessage(3, kTRUE, TString::Format( 00046 " %s ERROR no analysis ",GetName())); 00047 } // if(ana) 00048 return -1; 00049 }