Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4ComGetEnvelope.cxx

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 "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");  // this command needs client as receiver
00030    SetFolderName(foldername);
00031 }
00032 
00033 TGo4ComGetEnvelope::TGo4ComGetEnvelope()
00034 :TGo4AnalysisObjectCommand()
00035 {
00036    TRACE((12,"TGo4ComGetEnvelope::TGo4ComGetEnvelope() ctor",__LINE__, __FILE__));
00037    SetReceiverName("AnalysisClient");  // this command needs client as receiver
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 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:05 2008 for Go4-v3.04-1 by  doxygen 1.4.2