GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
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
15
16#include "TROOT.h"
17
18#include "TGo4Log.h"
19
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
39void 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
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{
103 if(kind)
104 fxProcessorType = dynamic_cast<TGo4EventProcessorParameter*>(kind->Clone());
105 else
106 fxProcessorType = nullptr;
107}
#define GO4TRACE(X)
Definition TGo4Log.h:25
void Print(Option_t *opt="") const override
TGo4EventSourceParameter * TakeSourcePar()
Removes source parameter from the step and return it back to the user User is responsible to cleanup ...
TGo4EventSourceParameter * GetSourcePar() const
Returns the event source parameter which was put into this status object.
TGo4EventStoreParameter * fxStoreType
Parameter object of next event storage to be activated.
TGo4EventProcessorParameter * GetProcessorPar() const
Returns the event processor parameter which was put into this status object.
TGo4EventProcessorParameter * fxProcessorType
Parameter object of next event processor to be activated.
void SetStorePar(TGo4EventStoreParameter *kind)
Sets the event store parameter which is used on intitialization of this step.
Int_t GetProcessStatus() const
Returns status value of processor.
void SetProcessorPar(TGo4EventProcessorParameter *kind)
Sets the event processor parameter which is used on intitialization of this step.
TGo4EventStoreParameter * GetStorePar() const
Returns the event store parameter which was put into this status object.
void SetSourcePar(TGo4EventSourceParameter *kind)
Sets the event source parameter which is used on intitialization of this step.
TGo4EventSourceParameter * fxSourceType
Parameter object of next event source to be activated.
Basic type for all classes containing information to parametrize the event processor.
Basic type for all classes containing information to parameterize the event source.
Basic type for all classes containing information to parametrize the event store.
static void PrintLine(const char *text,...)
Print single line of debug output with appropriate indent.