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

/Go4DynamicList/TGo4DynamicListStatus.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 "TGo4DynamicListStatus.h"
00017 
00018 #include <iostream.h>
00019 
00020 #include "TROOT.h"
00021 
00022 #include "Go4Log/TGo4Log.h"
00023 #include "TGo4DynamicList.h"
00024 
00025 TGo4DynamicListStatus::TGo4DynamicListStatus( const Text_t * name)
00026 : TGo4DynamicEntryStatus(name), fxFolder(0)
00027 {
00028    TRACE((15,"TGo4DynamicListStatus::TGo4DynamicListStatus(Text_t*)",__LINE__, __FILE__));
00029    Text_t buffer[512];
00030    snprintf(buffer, 511, "Status of Dynamic List %s",name);
00031 }
00032 
00033 TGo4DynamicListStatus::TGo4DynamicListStatus()
00034 {
00035   TRACE((15,"TGo4DynamicListStatus::TGo4DynamicListStatus()",__LINE__, __FILE__));
00036 }
00037 
00038 TGo4DynamicListStatus::~TGo4DynamicListStatus()
00039 {
00040   TRACE((15,"TGo4DynamicListStatus::~TGo4DynamicListStatus()",__LINE__, __FILE__));
00041   if(fxFolder)
00042     delete fxFolder;
00043 }
00044 
00045 TGo4DynamicEntry* TGo4DynamicListStatus::CreateDynamicEntry()
00046 {
00047    TGo4DynamicList* entry = new TGo4DynamicList(GetName());
00048    entry->SetStatus(this);
00049    return entry;
00050 }
00051 
00052 void TGo4DynamicListStatus::Print(Option_t* opt) const
00053 {
00054    // this trick is needed since root defines Print as const function...
00055    TGo4DynamicListStatus* const localthis= const_cast<TGo4DynamicListStatus* const>(this);
00056 
00057    TROOT::IndentLevel();
00058    cout <<"====== Status printout of Dynamic list: "<< localthis->GetName()<<" =====" << endl;
00059    TROOT::IncreaseDirLevel();
00060    if(localthis->fxFolder)
00061    {
00062       TCollection* list=localthis->fxFolder->GetListOfFolders();
00063       TIterator* listiter=list->MakeIterator();
00064       TObject* ob=0;
00065       while((ob=listiter->Next())!=0)
00066          {
00067               ob->Print(opt);
00068          }// while
00069       delete listiter;
00070    }
00071    else
00072    {
00073        TROOT::IndentLevel();
00074        cout  <<"\t\tEmpty dynamic list." <<endl;
00075    }
00076   TROOT::DecreaseDirLevel();
00077   TROOT::IndentLevel();
00078    cout <<"======================"<<endl;
00079 }
00080 
00081 ClassImp(TGo4DynamicListStatus)
00082 
00083 //----------------------------END OF GO4 SOURCE FILE ---------------------

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