GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4AnalysisStepStatus.cxx
Go to the documentation of this file.
1 // $Id$
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 
14 #include "TGo4AnalysisStepStatus.h"
15 
16 #include "TROOT.h"
17 
18 #include "TGo4Log.h"
19 
21  TGo4Status()
22 {
23 }
24 
26  TGo4Status(name, "Go4 AnalysisStep Status Object")
27 {
28  GO4TRACE((15,"TGo4AnalysisStepStatus::TGo4AnalysisStepStatus(const char *)",__LINE__, __FILE__));
29 }
30 
32 {
33  GO4TRACE((15,"TGo4AnalysisStepStatus::~TGo4AnalysisStepStatus()",__LINE__, __FILE__));
34  delete fxSourceType; fxSourceType = nullptr;
35  delete fxStoreType; fxStoreType = nullptr;
36  delete fxProcessorType; fxProcessorType = nullptr;
37 }
38 
39 void TGo4AnalysisStepStatus::Print(Option_t *) const
40 {
41  PrintLine("++++ Analysis Step %s ++++", GetName());
42  TROOT::IncreaseDirLevel();
43  if (IsProcessEnabled()) {
44  if (IsSourceEnabled()) {
45  auto spar = GetSourcePar();
46  if (spar)
47  spar->Print();
48  else
49  PrintLine("EventSource Type: undefined");
50  } else {
51  PrintLine("EventSource is disabled.");
52  }
53 
54  auto ppar = GetProcessorPar();
55  if (ppar)
56  ppar->Print();
57 
58  if (IsStoreEnabled()) {
59  auto tpar = GetStorePar();
60  if (tpar)
61  tpar->Print();
62  else
63  PrintLine("EventStore Type: undefined");
64  } else {
65  PrintLine("EventStore is disabled.");
66  }
67  PrintLine("Process Status: %d", GetProcessStatus());
68  } else {
69  PrintLine("Step is disabled.");
70  }
71  TROOT::DecreaseDirLevel();
72  PrintLine("---------------------------------------------- ");
73 }
74 
76 {
77  if(fxSourceType) delete fxSourceType;
78  if(kind)
79  fxSourceType = dynamic_cast<TGo4EventSourceParameter*>(kind->Clone());
80  else
81  fxSourceType = nullptr;
82 }
83 
85 {
87  fxSourceType = nullptr;
88  return res;
89 }
90 
92 {
93  if(fxStoreType) delete fxStoreType;
94  if(kind)
95  fxStoreType = dynamic_cast<TGo4EventStoreParameter*>(kind->Clone());
96  else
97  fxStoreType = nullptr;
98 }
99 
101 {
102  if(fxProcessorType) delete fxProcessorType;
103  if(kind)
104  fxProcessorType = dynamic_cast<TGo4EventProcessorParameter*>(kind->Clone());
105  else
106  fxProcessorType = nullptr;
107 }
TGo4EventStoreParameter * fxStoreType
const char * GetName() const override
TGo4EventSourceParameter * fxSourceType
void Print(Option_t *opt="") const override
TGo4EventSourceParameter * GetSourcePar() const
TGo4EventProcessorParameter * fxProcessorType
void SetStorePar(TGo4EventStoreParameter *kind)
void SetSourcePar(TGo4EventSourceParameter *kind)
TGo4EventSourceParameter * TakeSourcePar()
void SetProcessorPar(TGo4EventProcessorParameter *kind)
TGo4EventProcessorParameter * GetProcessorPar() const
#define GO4TRACE(X)
Definition: TGo4Log.h:25
TGo4EventStoreParameter * GetStorePar() const
static void PrintLine(const char *text,...)
Definition: TGo4Status.cxx:101