00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TGo4ComGetEnvelope.h"
00017
00018 #include <iostream.h>
00019
00020 #include "TH1.h"
00021 #include "Go4Log/TGo4Log.h"
00022 #include "Go4AnalysisClient/TGo4AnalysisClientImp.h"
00023 #include "Go4Analysis/TGo4AnalysisImp.h"
00024 #include "TGo4ObjEnvelope.h"
00025
00026 TGo4ComGetEnvelope::TGo4ComGetEnvelope(const char* obname, const char* foldername)
00027 :TGo4AnalysisObjectCommand("ANGetEnvelope","Get an arbitrary object from analysis",obname)
00028 {
00029 TRACE((12,"TGo4ComGetEnvelope::TGo4ComGetEnvelope(const Text_t*) ctor",__LINE__, __FILE__));
00030 SetReceiverName("AnalysisClient");
00031 SetFolderName(foldername);
00032 }
00033
00034 TGo4ComGetEnvelope::TGo4ComGetEnvelope()
00035 :TGo4AnalysisObjectCommand()
00036 {
00037 TRACE((12,"TGo4ComGetEnvelope::TGo4ComGetEnvelope() ctor",__LINE__, __FILE__));
00038 SetReceiverName("AnalysisClient");
00039 SetName("ANGetEnvelope");
00040 SetDescription("Get an arbitrary object from analysis");
00041 }
00042
00043 TGo4ComGetEnvelope::~TGo4ComGetEnvelope()
00044 {
00045 TRACE((12,"TGo4ComGetEnvelope::~TGo4ComGetEnvelope() dtor",__LINE__, __FILE__));
00046 }
00047
00048 Int_t TGo4ComGetEnvelope::ExeCom()
00049 {
00050 TRACE((12,"TGo4ComGetEnvelope::ExeCom()",__LINE__, __FILE__));
00051
00052 TGo4AnalysisClient* cli=dynamic_cast<TGo4AnalysisClient*> (fxReceiverBase);
00053 if (cli!=0)
00054 {
00055 TRACE((11,"TGo4ComGetEnvelope::ExeCom() - found valid receiver",__LINE__, __FILE__));
00056
00057
00058
00059 TNamed* obj = TGo4Analysis::Instance()->GetObject( GetObjectName(), GetFolderName());
00060
00061
00062
00063
00064
00065 TGo4ObjEnvelope* envelope = new TGo4ObjEnvelope(obj, GetObjectName(), GetFolderName());
00066 cli->SendObject(envelope, GetTaskName());
00067 delete envelope;
00068
00069
00070 }
00071 else
00072
00073 {
00074 TRACE((11,"TGo4ComGetEnvelope::ExeCom() - no receiver specified ERROR!",__LINE__, __FILE__));
00075 TGo4Log::Debug(" !!! %s : NO RECEIVER ERROR!!!",GetName());
00076 return 1;
00077 }
00078
00079 return -1;
00080 }
00081
00082
00083