GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TMeshParameter.cxx
Go to the documentation of this file.
1 // $Id: TMeshParameter.cxx 2771 2020-04-16 15:24:45Z 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 
14 #include "TMeshParameter.h"
15 
16 #include "TGo4AnalysisStep.h"
17 #include "TGo4Analysis.h"
18 
19 //***********************************************************
21  TGo4Parameter("MeshParameter"),
22  fbUnpackOn(kTRUE), fbExec1On(kTRUE), fbExec2On(kTRUE),
23  fbExec3On(kTRUE),fbExec12On(kTRUE),fbCollectorOn(kTRUE)
24 {
25 }
26 //***********************************************************
27 TMeshParameter::TMeshParameter(const char* name) :
28  TGo4Parameter(name),
29  fbUnpackOn(kTRUE), fbExec1On(kTRUE), fbExec2On(kTRUE),
30  fbExec3On(kTRUE),fbExec12On(kTRUE),fbCollectorOn(kTRUE)
31 {
32 }
33 //***********************************************************
35 {
36 }
37 //***********************************************************
38 
39 //-----------------------------------------------------------
40 Int_t TMeshParameter::PrintParameter(Text_t * n, Int_t)
41 {
42  std::cout << "Parameter " << GetName()<<":" <<std::endl;
43  std::cout << " fbUnpackOn="<<fbUnpackOn<<std::endl;
44  std::cout << " fbExec1On="<<fbExec1On<<std::endl;
45  std::cout << " fbExec2On="<<fbExec2On<<std::endl;
46  std::cout << " fbExec3On="<<fbExec3On<<std::endl;
47  std::cout << " fbExec12On="<<fbExec12On<<std::endl;
48  std::cout << " fbCollectorOn="<<fbCollectorOn<<std::endl;
49  return 0;
50 }
51 //-----------------------------------------------------------
53 {
54  if(pp->InheritsFrom("TMeshParameter"))
55  {
56  TMeshParameter* from = (TMeshParameter *) pp;
57  fbUnpackOn=from->fbUnpackOn;
58  fbExec1On=from->fbExec1On;
59  fbExec2On=from->fbExec2On;
60  fbExec3On=from->fbExec3On;
61  fbExec12On=from->fbExec12On;
63  std::cout <<"Updated Parameter "<<GetName() << std::endl;
65  TGo4AnalysisStep* unpack=ana->GetAnalysisStep("Unpack");
66  if(unpack)
68 
69  TGo4AnalysisStep* pror1=ana->GetAnalysisStep("Input1Provider");
70  TGo4AnalysisStep* ex1=ana->GetAnalysisStep("Exec1");
71  if(pror1 && ex1)
72  {
76  }
77  TGo4AnalysisStep* pror2=ana->GetAnalysisStep("Input2Provider");
78  TGo4AnalysisStep* ex2=ana->GetAnalysisStep("Exec2");
79  if(pror2 && ex2)
80  {
84  }
85  TGo4AnalysisStep* pror3=ana->GetAnalysisStep("Input3Provider");
86  TGo4AnalysisStep* ex3=ana->GetAnalysisStep("Exec3");
87  if(pror3 && ex3)
88  {
92  }
93 
94  TGo4AnalysisStep* pro1=ana->GetAnalysisStep("Output1Provider");
95  TGo4AnalysisStep* pro2=ana->GetAnalysisStep("Output2Provider");
96  TGo4AnalysisStep* pro3=ana->GetAnalysisStep("Output3Provider");
97  TGo4AnalysisStep* ex12=ana->GetAnalysisStep("Exec12");
98  if(pro1 && pro2 && pro3 && ex12)
99  {
101  pro1->SetSourceEnabled(!fbExec1On);
103  pro2->SetSourceEnabled(!fbExec2On);
105  pro3->SetSourceEnabled(!fbExec3On);
107  }
108  TGo4AnalysisStep* pro12=ana->GetAnalysisStep("Output12Provider");
109  TGo4AnalysisStep* fin=ana->GetAnalysisStep("Final");
110  if(pro12 && fin)
111  {
113  pro12->SetSourceEnabled(!fbExec12On);
115 
116  }
117  std::cout <<"Parameter "<<GetName()<<" changed steps setup" << std::endl;
118 
119 
120  }
121  else
122  std::cout << "Wrong parameter object: " << pp->ClassName() << std::endl;
123  return kTRUE;
124 }
virtual Int_t PrintParameter(Text_t *n, Int_t)
virtual Bool_t UpdateFrom(TGo4Parameter *)
TGo4AnalysisStep * GetAnalysisStep(const char *name)
void SetSourceEnabled(Bool_t on=kTRUE)
Bool_t fbCollectorOn
void SetProcessEnabled(Bool_t on=kTRUE)
virtual ~TMeshParameter()
static TGo4Analysis * Instance()