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