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

TGo4AnalysisObjectResult.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 "TGo4AnalysisObjectResult.h"
00017 
00018 #include "Riostream.h"
00019 
00020 #include "TROOT.h"
00021 
00022 #include "TGo4Log.h"
00023 
00024 TGo4AnalysisObjectResult::TGo4AnalysisObjectResult() :
00025    TGo4Status(),
00026    fxNamesList(0),
00027    fxFullName(),
00028    fiAction(kGo4ActionNul),
00029    fxMessage()
00030 {
00031 }
00032 
00033 TGo4AnalysisObjectResult::TGo4AnalysisObjectResult(const char* name) :
00034    TGo4Status(name),
00035    fxFullName(),
00036    fiAction(kGo4ActionNul),
00037    fxMessage()
00038 {
00039 }
00040 
00041 TGo4AnalysisObjectResult::~TGo4AnalysisObjectResult()
00042 {
00043 //      delete fxNamesList;
00044 //      fxNamesList=0;
00045 }
00046 
00047 TGo4AnalysisObjectNames* TGo4AnalysisObjectResult::GetNamesList(Bool_t chown)
00048 {
00049    TGo4AnalysisObjectNames* reval=fxNamesList;
00050    if(chown) fxNamesList=0;
00051    return reval;
00052 }
00053 
00054 Int_t TGo4AnalysisObjectResult::PrintStatus(Text_t* buffer, Int_t buflen)
00055 {
00056    if(buflen<=0 && buffer!=0)
00057       return 0;
00058    gROOT->SetDirLevel(0);
00059    Int_t locallen=64000;
00060    Text_t localbuf[64000];
00061    Int_t size=0;
00062    Text_t* current=localbuf;
00063    Int_t restlen=locallen;
00064    current=PrintBuffer(localbuf,restlen,"G-OOOO-> Analysis Object Result Printout <-OOOO-G\n");
00065    current=PrintBuffer(current,restlen, "G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
00066 
00067    if(fxNamesList)
00068       {
00069          Int_t delta=fxNamesList->PrintStatus(current,restlen);
00070          restlen-=delta;
00071          current+= delta;
00072       }
00073    current=PrintIndent(current,restlen);
00074    current=PrintBuffer(current,restlen, " Full object name: \t%s\n",GetObjectFullName());
00075    current=PrintIndent(current,restlen);
00076    current=PrintBuffer(current,restlen, " Message: \t%s\n",GetMessage());
00077    current=PrintIndent(current,restlen);
00078    current=PrintBuffer(current,restlen, " Action: \t%d\n",Action());
00079    if(buffer==0)
00080       {
00081           cout << localbuf << endl;
00082       }
00083    else
00084       {
00085          size=locallen-restlen;
00086          if(size>buflen-1)
00087             size=buflen-1;
00088          strncpy(buffer,localbuf,size);
00089       }
00090    return size;
00091 }
00092 
00093 //----------------------------END OF GO4 SOURCE FILE ---------------------

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