00001 // $Id: TGo4ComMasterQuit.cxx 607 2010-04-06 08:23:15Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #include "TGo4ComMasterQuit.h" 00015 00016 #include "TGo4Log.h" 00017 #include "TGo4Master.h" 00018 00019 TGo4ComMasterQuit::TGo4ComMasterQuit() : 00020 TGo4TaskHandlerCommand("MRQuit","quits the master and the whole application") 00021 { 00022 SetReceiverName("MasterTask"); // sets the receiver name checked by command invoker 00023 // receiver name need to be class name! 00024 fbIsSynchron=kFALSE; 00025 fbIsLocal=kTRUE; 00026 } 00027 00028 TGo4ComMasterQuit::~TGo4ComMasterQuit() 00029 { 00030 00031 } 00032 00033 Int_t TGo4ComMasterQuit::ExeCom() 00034 { 00035 TGo4Master* master = dynamic_cast<TGo4Master*>(fxReceiverBase); 00036 00037 if (master!=0) { 00038 master->Quit(); 00039 return 0; 00040 } 00041 00042 TGo4Log::Debug(" !!! ComMasterQuit ''%s'': NO RECEIVER ERROR!!!",GetName()); 00043 return 1; 00044 }