Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4CommandsAnalysis/TGo4ComLoadAnalysisStatus.cxx

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE 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 "TGo4ComLoadAnalysisStatus.h"
00017 
00018 #include "Go4Log/TGo4Log.h"
00019 #include "Go4AnalysisClient/TGo4AnalysisClientImp.h"
00020 #include "Go4Exceptions/TGo4RuntimeException.h"
00021 #include "Go4Analysis/TGo4AnalysisImp.h"
00022 
00023 TGo4ComLoadAnalysisStatus::TGo4ComLoadAnalysisStatus(const char* filename)
00024 :TGo4AnalysisCommand("ANLoad","Load Analysis Settings from file")
00025 {
00026    TRACE((12,"TGo4ComLoadAnalysisStatus::TGo4ComLoadAnalysisStatus() ctor",__LINE__, __FILE__));
00027    SetReceiverName("AnalysisClient");  // this command needs client as receiver
00028                                        // override default receiver
00029    SetProtection(kGo4ComModeController);
00030    SetFileName(filename);
00031 }
00032 
00033 TGo4ComLoadAnalysisStatus::TGo4ComLoadAnalysisStatus()
00034 :TGo4AnalysisCommand("ANLoad","Load Analysis Settings from file")
00035 {
00036    TRACE((12,"TGo4ComLoadAnalysisStatus::TGo4ComLoadAnalysisStatus() ctor",__LINE__, __FILE__));
00037    SetReceiverName("AnalysisClient");  // this command needs client as receiver
00038                                        // override default receiver
00039    SetFileName(TGo4Analysis::fgcDEFAULTSTATUSFILENAME);
00040    SetProtection(kGo4ComModeController);
00041 }
00042 
00043 TGo4ComLoadAnalysisStatus::~TGo4ComLoadAnalysisStatus()
00044 {
00045    TRACE((12,"TGo4ComLoadAnalysisStatus::~TGo4ComLoadAnalysisStatus() dtor",__LINE__, __FILE__));
00046 }
00047 
00048 
00049 
00050 Int_t TGo4ComLoadAnalysisStatus::ExeCom()
00051 {
00052    TRACE((12,"TGo4ComLoadAnalysisStatus::ExeCom()",__LINE__, __FILE__));
00053 
00054    TGo4AnalysisClient* cli=dynamic_cast<TGo4AnalysisClient*> (fxReceiverBase);
00055    if (cli!=0)
00056       {
00057       TRACE((11,"TGo4ComLoadAnalysisStatus::ExeCom() - found valid receiver",__LINE__, __FILE__));
00058 //         TGo4Log::Debug(" Executing ComLoadAnalysisStatus...  ");
00059          TGo4Analysis* ana= TGo4Analysis::Instance();
00060          if(ana)
00061             {
00062                Bool_t ok=ana->LoadStatus( GetFileName() );
00063                if(ok)
00064                   {
00065                     cli->SendStatusMessage(1, kFALSE,"Loaded analysis status from file %s.",
00066                                                 GetFileName());
00067                   }
00068                else
00069                   {
00070                      cli->SendStatusMessage(3, kFALSE,"ERROR on Loading analysis status from file %s",
00071                                                  GetFileName());
00072                   } // if(ok)
00073 
00074             }
00075          else
00076             {
00077                      cli->SendStatusMessage(3, kTRUE," %s ERROR no analysis",
00078                                                  GetName());
00079             } // if(ana)
00080 
00081       }
00082    else
00083       {
00084       TRACE((11,"TGo4ComLoadAnalysisStatus::ExeCom() - no receiver specified ERROR!",__LINE__, __FILE__));
00085          TGo4Log::Debug(" !!! ComLoadAnalysisStatus ''%s'': NO RECEIVER ERROR!!!",GetName());
00086          throw TGo4RuntimeException(); // never come here!
00087          return 1;
00088       }
00089 
00090    return -1;
00091 }
00092 
00093 
00094 
00095 ClassImp(TGo4ComLoadAnalysisStatus)
00096 
00097 
00098 
00099 
00100 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:50 2005 for Go4-v2.10-5 by doxygen1.2.15