GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4AnalysisObjectResult.cxx
Go to the documentation of this file.
1 // $Id: TGo4AnalysisObjectResult.cxx 2755 2020-04-16 11:23:02Z 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 fuer 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 <iostream>
17 
18 #include "TROOT.h"
19 
21 
22 
24  TGo4Status(),
25  fxNamesList(0),
26  fxFullName(),
27  fiAction(kGo4ActionNul),
28  fxMessage()
29 {
30 }
31 
33  TGo4Status(name),
34  fxNamesList(0),
35  fxFullName(),
36  fiAction(kGo4ActionNul),
37  fxMessage()
38 {
39 }
40 
42 {
43  // names list is not owned by the result object
44  // delete fxNamesList;
45  // fxNamesList=0;
46 }
47 
49 {
51  if(chown) fxNamesList=0;
52  return reval;
53 }
54 
55 Int_t TGo4AnalysisObjectResult::PrintStatus(Text_t* buffer, Int_t buflen)
56 {
57  if(buflen<=0 && buffer!=0)
58  return 0;
59  gROOT->SetDirLevel(0);
60  Int_t locallen=64000;
61  Text_t localbuf[64000];
62  Int_t size=0;
63  Text_t* current=localbuf;
64  Int_t restlen=locallen;
65  current=PrintBuffer(localbuf,restlen,"G-OOOO-> Analysis Object Result Printout <-OOOO-G\n");
66  current=PrintBuffer(current,restlen, "G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
67 
68  if(fxNamesList) {
69  Int_t delta=fxNamesList->PrintStatus(current,restlen);
70  restlen-=delta;
71  current+= delta;
72  }
73  current=PrintIndent(current,restlen);
74  current=PrintBuffer(current,restlen, " Full object name: \t%s\n",GetObjectFullName());
75  current=PrintIndent(current,restlen);
76  current=PrintBuffer(current,restlen, " Message: \t%s\n",GetMessage());
77  current=PrintIndent(current,restlen);
78  current = PrintBuffer(current, restlen, " Action: \t%d\n", Action());
79  if (buffer == 0) {
80  std::cout << localbuf << std::endl;
81  } else {
82  size = locallen - restlen;
83  if (size > buflen - 1)
84  size = buflen - 1;
85  strncpy(buffer, localbuf, size);
86  }
87  return size;
88 }
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:84