Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "TGo4AnalysisObjectResult.h"
00015
00016 #include "Riostream.h"
00017 #include "TROOT.h"
00018
00019 #include "TGo4Log.h"
00020
00021 #include "TGo4AnalysisObjectNames.h"
00022
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 fxNamesList(0),
00036 fxFullName(),
00037 fiAction(kGo4ActionNul),
00038 fxMessage()
00039 {
00040 }
00041
00042 TGo4AnalysisObjectResult::~TGo4AnalysisObjectResult()
00043 {
00044
00045
00046
00047 }
00048
00049 TGo4AnalysisObjectNames* TGo4AnalysisObjectResult::GetNamesList(Bool_t chown)
00050 {
00051 TGo4AnalysisObjectNames* reval = fxNamesList;
00052 if(chown) fxNamesList=0;
00053 return reval;
00054 }
00055
00056 Int_t TGo4AnalysisObjectResult::PrintStatus(Text_t* buffer, Int_t buflen)
00057 {
00058 if(buflen<=0 && buffer!=0)
00059 return 0;
00060 gROOT->SetDirLevel(0);
00061 Int_t locallen=64000;
00062 Text_t localbuf[64000];
00063 Int_t size=0;
00064 Text_t* current=localbuf;
00065 Int_t restlen=locallen;
00066 current=PrintBuffer(localbuf,restlen,"G-OOOO-> Analysis Object Result Printout <-OOOO-G\n");
00067 current=PrintBuffer(current,restlen, "G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
00068
00069 if(fxNamesList) {
00070 Int_t delta=fxNamesList->PrintStatus(current,restlen);
00071 restlen-=delta;
00072 current+= delta;
00073 }
00074 current=PrintIndent(current,restlen);
00075 current=PrintBuffer(current,restlen, " Full object name: \t%s\n",GetObjectFullName());
00076 current=PrintIndent(current,restlen);
00077 current=PrintBuffer(current,restlen, " Message: \t%s\n",GetMessage());
00078 current=PrintIndent(current,restlen);
00079 current=PrintBuffer(current,restlen, " Action: \t%d\n",Action());
00080 if(buffer==0)
00081 {
00082 std::cout << localbuf << std::endl;
00083 }
00084 else
00085 {
00086 size=locallen-restlen;
00087 if(size>buflen-1)
00088 size=buflen-1;
00089 strncpy(buffer,localbuf,size);
00090 }
00091 return size;
00092 }