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

TGo4CreateException.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 "TGo4CreateException.h"
00017 
00018 #include "Riostream.h"
00019 
00020 #include "TGo4Log.h"
00021 #include "TGo4Thread.h"
00022 #include "TGo4ThreadHandler.h"
00023 #include "TGo4Runnable.h"
00024 
00025 TGo4CreateException::TGo4CreateException(const TGo4CreateException &right)
00026   :TGo4ThreadException(right)
00027 {
00028    TRACE((14,"TGo4CreateException::TGo4CreateException() copy constructor",__LINE__, __FILE__));
00029 }
00030 
00031 TGo4CreateException::TGo4CreateException (TGo4Runnable* runnable, const Text_t* threadname)
00032 :TGo4ThreadException(runnable,threadname)
00033 {
00034    TRACE((14,"TGo4CreateException::TGo4CreateException(TGo4Runnable*, const Text_t*) constructor",__LINE__, __FILE__));
00035    fxDescription= "!!!-- Go4 Create Exception --!!!";
00036 }
00037 
00038 
00039 TGo4CreateException::~TGo4CreateException()
00040 {
00041  TRACE((14,"TGo4CreateException::~TGo4CreateException() destructor",__LINE__, __FILE__));
00042 }
00043 
00044 
00045 TGo4CreateException & TGo4CreateException::operator=(const TGo4CreateException &right)
00046 {
00047    TRACE((14,"TGo4CreateException::operator=",__LINE__, __FILE__));
00048    if (&right!=this)
00049       {
00050          TRACE((13,"TGo4CreateException::operator= processing copy",__LINE__, __FILE__));
00051          TGo4ThreadException::operator=(right); // copy base class members
00052          // put additional member copies here...
00053          return *this;
00054       }
00055    else
00056       {
00057          // copy is already source object
00058          TRACE((13,"TGo4CreateException::operator= source and destination objects are identical",__LINE__, __FILE__));
00059          return *this;
00060       }
00061 }
00062 
00063 Int_t TGo4CreateException::Handle ()
00064 {
00065    TRACE((14,"TGo4CreateException::Handle()",__LINE__, __FILE__));
00066    cout << "\t This is the TGo4CreateException::Handler"<<endl;
00067    Int_t rev=-1;
00068    if(GetThreadName()==0)
00069       // no threadname specified, operate on thread of runnable
00070       {
00071          TRACE((13,"TGo4CreateException::Handle() -- creating thread of runnable",__LINE__, __FILE__));
00072          rev=fxRunnable->GetThread()->Create();
00073       }
00074    else
00075       // threadname given, use thread handler to cancel
00076       {
00077          TRACE((13,"TGo4CreateException::Handle() -- creating thread by name",__LINE__, __FILE__));
00078          rev=fxThreadHandler->Create(GetThreadName());
00079       }
00080    // note: boolean return values of called methods are implicitly casted to int
00081    return rev;
00082 }
00083 
00084 
00085 
00086 
00087 
00088 //----------------------------END OF GO4 SOURCE FILE ---------------------

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