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

/Go4CommandsAnalysis/TGo4ComGetObject.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 "TGo4ComGetObject.h"
00017 
00018 #include <iostream.h>
00019 
00020 #include "Go4Log/TGo4Log.h"
00021 #include "Go4AnalysisClient/TGo4AnalysisClientImp.h"
00022 #include "Go4Analysis/TGo4AnalysisImp.h"
00023 
00024 TGo4ComGetObject::TGo4ComGetObject(const char* obname)
00025 :TGo4AnalysisObjectCommand("ANGetObject","Get an object from analysis",obname)
00026 {
00027    TRACE((12,"TGo4ComGetObject::TGo4ComGetObject(const Text_t*) ctor",__LINE__, __FILE__));
00028    SetReceiverName("AnalysisClient");  // this command needs client as receiver
00029                                       // override default receiver
00030 }
00031 
00032 TGo4ComGetObject::TGo4ComGetObject()
00033 :TGo4AnalysisObjectCommand()
00034 {
00035    TRACE((12,"TGo4ComGetObject::TGo4ComGetObject() ctor",__LINE__, __FILE__));
00036    SetReceiverName("AnalysisClient");  // this command needs client as receiver
00037    SetName("ANGetObject");
00038    SetDescription("Get an object from analysis");
00039 }
00040 
00041 TGo4ComGetObject::~TGo4ComGetObject()
00042 {
00043    TRACE((12,"TGo4ComGetObject::~TGo4ComGetObject() dtor",__LINE__, __FILE__));
00044 }
00045 
00046 Int_t TGo4ComGetObject::ExeCom()
00047 {
00048    TRACE((12,"TGo4ComGetObject::ExeCom()",__LINE__, __FILE__));
00049 
00050    TGo4AnalysisClient* cli=dynamic_cast<TGo4AnalysisClient*> (fxReceiverBase);
00051    if (cli!=0)
00052       {
00053       TRACE((11,"TGo4ComGetObject::ExeCom() - found valid receiver",__LINE__, __FILE__));
00054 //         cli->SendStatusMessage(1, kFALSE,"Object %s was requested from analysis...",
00055 //                                                GetObjectName());
00056          //cli->SendAnalysisObject(GetObjectName());
00057          TNamed* ob=TGo4Analysis::Instance()->GetObject( GetObjectName(), GetFolderName());
00058          cli->SendObject(ob,GetTaskName());
00059 //         if(ob)
00060 //            cout <<"ComGetObject Sending object "<<ob->GetName() << endl;
00061       }
00062    else
00063 
00064        {
00065       TRACE((11,"TGo4ComGetObject::ExeCom() - no receiver specified ERROR!",__LINE__, __FILE__));
00066          TGo4Log::Debug(" !!! %s : NO RECEIVER ERROR!!!",GetName());
00067          return 1;
00068       }
00069 
00070    return -1;
00071 }
00072 
00073 
00074 ClassImp(TGo4ComGetObject)
00075 
00076 //----------------------------END OF GO4 SOURCE FILE ---------------------

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