GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4AnalysisObjectResult.cxx
Go to the documentation of this file.
1 // $Id: TGo4AnalysisObjectResult.cxx 934 2013-01-29 15:59:24Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
15 
16 #include "Riostream.h"
17 #include "TROOT.h"
18 
19 #include "TGo4Log.h"
20 
22 
23 
25  TGo4Status(),
26  fxNamesList(0),
27  fxFullName(),
28  fiAction(kGo4ActionNul),
29  fxMessage()
30 {
31 }
32 
34  TGo4Status(name),
35  fxNamesList(0),
36  fxFullName(),
37  fiAction(kGo4ActionNul),
38  fxMessage()
39 {
40 }
41 
43 {
44  // names list is not owned by the result object
45  // delete fxNamesList;
46  // fxNamesList=0;
47 }
48 
50 {
52  if(chown) fxNamesList=0;
53  return reval;
54 }
55 
56 Int_t TGo4AnalysisObjectResult::PrintStatus(Text_t* buffer, Int_t buflen)
57 {
58  if(buflen<=0 && buffer!=0)
59  return 0;
60  gROOT->SetDirLevel(0);
61  Int_t locallen=64000;
62  Text_t localbuf[64000];
63  Int_t size=0;
64  Text_t* current=localbuf;
65  Int_t restlen=locallen;
66  current=PrintBuffer(localbuf,restlen,"G-OOOO-> Analysis Object Result Printout <-OOOO-G\n");
67  current=PrintBuffer(current,restlen, "G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
68 
69  if(fxNamesList) {
70  Int_t delta=fxNamesList->PrintStatus(current,restlen);
71  restlen-=delta;
72  current+= delta;
73  }
74  current=PrintIndent(current,restlen);
75  current=PrintBuffer(current,restlen, " Full object name: \t%s\n",GetObjectFullName());
76  current=PrintIndent(current,restlen);
77  current=PrintBuffer(current,restlen, " Message: \t%s\n",GetMessage());
78  current=PrintIndent(current,restlen);
79  current=PrintBuffer(current,restlen, " Action: \t%d\n",Action());
80  if(buffer==0)
81  {
82  std::cout << localbuf << std::endl;
83  }
84  else
85  {
86  size=locallen-restlen;
87  if(size>buflen-1)
88  size=buflen-1;
89  strncpy(buffer,localbuf,size);
90  }
91  return size;
92 }
const char * GetObjectFullName() const
const char * GetMessage() const
virtual Int_t PrintStatus(Text_t *buffer=0, Int_t buflen=0)
static Text_t * PrintIndent(Text_t *buffer, Int_t &buflen)
Definition: TGo4Status.cxx:72
Go4ResultAction_t Action() const
virtual Int_t PrintStatus(Text_t *buffer=0, Int_t buflen=0)
TGo4AnalysisObjectNames * GetNamesList(Bool_t chown=kTRUE)
TGo4AnalysisObjectNames * fxNamesList
static Text_t * PrintBuffer(char *buffer, Int_t &buflen, const char *text,...)
Definition: TGo4Status.cxx:85