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