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

TGo4FitNamed.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 "TGo4FitNamed.h"
00017 #include "Riostream.h"
00018 
00019 TGo4FitNamed::TGo4FitNamed() : TNamed(), fxOwner(0), fxFullName() {
00020 }
00021 
00022 TGo4FitNamed::TGo4FitNamed(const char* Name, const char* Title, TNamed* Owner) :
00023     TNamed(Name, Title), fxOwner(Owner), fxFullName() {
00024 }
00025 
00026 TGo4FitNamed::~TGo4FitNamed() {
00027 }
00028 
00029 const char* TGo4FitNamed::GetOwnerFullName() {
00030    TGo4FitNamed* full = dynamic_cast<TGo4FitNamed*> (GetOwner());
00031    if(full) return full->GetFullName();
00032    if (GetOwner()) return GetOwner()->GetName();
00033               else return 0;
00034 
00035 }
00036 
00037 const char* TGo4FitNamed::GetFullName() {
00038 
00039   const char* ownname = GetOwnerFullName();
00040 
00041   if ((ownname!=0) && (strlen(ownname)>0)) {
00042     fxFullName = ownname;
00043     fxFullName += ".";
00044     fxFullName += GetName();
00045   } else fxFullName = GetName();
00046   return fxFullName.Data();
00047 }
00048 
00049 void TGo4FitNamed::Print(Option_t* option) const {
00050    TNamed::Print(option);
00051    const char* ownname = ((TGo4FitNamed*) this)->GetOwnerFullName();
00052 
00053    if ((ownname!=0) && (strlen(ownname)>0))
00054      cout << " Full name: " << ((TGo4FitNamed*) this)->GetFullName() << endl;
00055 }
00056 
00057 //----------------------------END OF GO4 SOURCE FILE ---------------------

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