00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
00044
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