00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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");
00029
00030 }
00031
00032 TGo4ComGetObject::TGo4ComGetObject()
00033 :TGo4AnalysisObjectCommand()
00034 {
00035 TRACE((12,"TGo4ComGetObject::TGo4ComGetObject() ctor",__LINE__, __FILE__));
00036 SetReceiverName("AnalysisClient");
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
00055
00056
00057 TNamed* ob=TGo4Analysis::Instance()->GetObject( GetObjectName(), GetFolderName());
00058 cli->SendObject(ob,GetTaskName());
00059
00060
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