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