Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4CommandsAnalysis/TGo4ComGetDynamicEntryStatus.cxx

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #include "TGo4ComGetDynamicEntryStatus.h"
00017 
00018 #include "Go4Log/TGo4Log.h"
00019 #include "Go4DynamicList/TGo4DynamicList.h"
00020 #include "Go4DynamicList/TGo4DynamicEntryStatus.h"
00021 #include "Go4AnalysisClient/TGo4AnalysisClientImp.h"
00022 #include "Go4Analysis/TGo4AnalysisImp.h"
00023 
00024 TGo4ComGetDynamicEntryStatus::TGo4ComGetDynamicEntryStatus (const char* entryname, const char* listname)
00025 :TGo4DynamicListCommand("ANGetDyn","Gets Dynamic Entry Status", entryname, listname)
00026 {
00027    TRACE((12,"TGo4ComGetDynamicEntryStatus::TGo4ComGetDynamicEntryStatus() ctor",__LINE__, __FILE__));
00028  }
00029 TGo4ComGetDynamicEntryStatus::TGo4ComGetDynamicEntryStatus()
00030 :TGo4DynamicListCommand("ANGetDyn","Get Dynamic Entry Status",0,0)
00031 {
00032    TRACE((12,"TGo4ComGetDynamicEntryStatus::TGo4ComGetDynamicEntryStatus() ctor",__LINE__, __FILE__));
00033 }
00034 
00035 TGo4ComGetDynamicEntryStatus::~TGo4ComGetDynamicEntryStatus()
00036 {
00037    TRACE((12,"TGo4ComGetDynamicEntryStatus::~TGo4ComGetDynamicEntryStatus() dtor",__LINE__, __FILE__));
00038 }
00039 
00040 Int_t TGo4ComGetDynamicEntryStatus::ExeCom()
00041 {
00042    TRACE((12,"TGo4ComGetDynamicEntryStatus::ExeCom()",__LINE__, __FILE__));
00043 
00044    Int_t rev=-2;
00045    TGo4AnalysisClient* cli=dynamic_cast<TGo4AnalysisClient*> (fxReceiverBase);
00046    if(cli)
00047       {
00048         TGo4Analysis* ana = TGo4Analysis::Instance();
00049          if(ana)
00050             {
00051                TGo4DynamicEntryStatus* state=0;
00052                cli->SendStatusMessage(1,kFALSE,"Dynamic List status was requested from client...");
00053                TGo4DynamicList* dlist=ana->GetDynamicList(GetListName());
00054                if(dlist)
00055                   {
00056                      state=dlist->CreateEntryStatus(GetEntryName());
00057                      if(state)
00058                         {
00059                            cli->SendObject(state,GetTaskName());
00060                            delete state;
00061                         }
00062                      else
00063                         {
00064                            cli->SendStatusMessage(2,kTRUE,"Could not get status of dynamic entry%s",
00065                                 GetEntryName() );
00066                         }
00067                   }
00068                else
00069                   {
00070                      cli->SendStatusMessage(3,kTRUE,"Could not get dynamic list !!!" );
00071                   }  //if(dlist)
00072             }
00073           else
00074            {
00075               cli->SendStatusMessage(3, kTRUE," %s ERROR no analysis",GetName());
00076            } // if(ana)
00077       }
00078    else
00079       {
00080       TRACE((11,"TGo4ComGetDynamicEntryStatus::ExeCom() - no receiver specified ERROR!",__LINE__, __FILE__));
00081          TGo4Log::Debug(" !!! ComGetDynamicEntryStatus '%s: NO RECEIVER ERROR!!!",GetName());
00082          rev=1;
00083       }//  if(cli)
00084    return rev;
00085 }
00086 
00087 ClassImp(TGo4ComGetDynamicEntryStatus)
00088 
00089 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:50 2005 for Go4-v2.10-5 by doxygen1.2.15