Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4ExampleMesh/TMeshParameter.cxx

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #include "TMeshParameter.h"
00017 
00018 #include <iostream.h>
00019 
00020 #include "Go4Analysis/TGo4Analysis.h"
00021 
00022 //***********************************************************
00023 TMeshParameter::TMeshParameter()
00024 : TGo4Parameter("MeshParameter"),
00025 fbUnpackOn(kTRUE), fbExec1On(kTRUE), fbExec2On(kTRUE), 
00026 fbExec3On(kTRUE),fbExec12On(kTRUE),fbCollectorOn(kTRUE)
00027 {
00028 }
00029 //***********************************************************
00030 TMeshParameter::TMeshParameter(Text_t * name)
00031 : TGo4Parameter(name),
00032 fbUnpackOn(kTRUE), fbExec1On(kTRUE), fbExec2On(kTRUE), 
00033 fbExec3On(kTRUE),fbExec12On(kTRUE),fbCollectorOn(kTRUE)
00034 {
00035 }
00036 //***********************************************************
00037 TMeshParameter::~TMeshParameter()
00038 {
00039 }
00040 //***********************************************************
00041 
00042 //-----------------------------------------------------------
00043 Int_t TMeshParameter::PrintParameter(Text_t * n, Int_t){
00044   cout << "Parameter " << GetName()<<":" <<endl;  
00045   cout << " fbUnpackOn="<<fbUnpackOn<<endl;
00046   cout << " fbExec1On="<<fbExec1On<<endl;
00047   cout << " fbExec2On="<<fbExec2On<<endl;
00048   cout << " fbExec3On="<<fbExec3On<<endl;
00049   cout << " fbExec12On="<<fbExec12On<<endl;   
00050   cout << " fbCollectorOn="<<fbCollectorOn<<endl;  
00051   return 0;
00052 }
00053 //-----------------------------------------------------------
00054 Bool_t TMeshParameter::UpdateFrom(TGo4Parameter *pp){
00055   if(pp->InheritsFrom("TMeshParameter"))
00056   {
00057     TMeshParameter* from = (TMeshParameter *) pp;
00058     fbUnpackOn=from->fbUnpackOn;
00059     fbExec1On=from->fbExec1On;
00060     fbExec2On=from->fbExec2On;
00061     fbExec3On=from->fbExec3On;
00062     fbExec12On=from->fbExec12On;
00063     fbCollectorOn=from->fbCollectorOn;
00064     cout <<"Updated Parameter "<<GetName() << endl;
00065     TGo4Analysis* ana=TGo4Analysis::Instance();
00066     TGo4AnalysisStep* unpack=ana->GetAnalysisStep("Unpack");
00067     if(unpack) 
00068       unpack->SetProcessEnabled(fbUnpackOn);
00069     
00070     TGo4AnalysisStep* pror1=ana->GetAnalysisStep("Input1Provider");
00071     TGo4AnalysisStep* ex1=ana->GetAnalysisStep("Exec1");
00072     if(pror1 && ex1)
00073       {
00074          pror1->SetProcessEnabled(fbExec1On);
00075          pror1->SetSourceEnabled(!fbUnpackOn);
00076          ex1->SetProcessEnabled(fbExec1On);
00077       }
00078     TGo4AnalysisStep* pror2=ana->GetAnalysisStep("Input2Provider");
00079     TGo4AnalysisStep* ex2=ana->GetAnalysisStep("Exec2");
00080     if(pror2 && ex2)
00081       {
00082          pror2->SetProcessEnabled(fbExec2On);
00083          pror2->SetSourceEnabled(!fbUnpackOn);
00084          ex2->SetProcessEnabled(fbExec2On);
00085       }
00086     TGo4AnalysisStep* pror3=ana->GetAnalysisStep("Input3Provider");
00087     TGo4AnalysisStep* ex3=ana->GetAnalysisStep("Exec3");
00088     if(pror3 && ex3)
00089       {
00090          pror3->SetProcessEnabled(fbExec3On);
00091          pror3->SetSourceEnabled(!fbUnpackOn);
00092          ex3->SetProcessEnabled(fbExec3On);
00093       }
00094 
00095     TGo4AnalysisStep* pro1=ana->GetAnalysisStep("Output1Provider");
00096     TGo4AnalysisStep* pro2=ana->GetAnalysisStep("Output2Provider");
00097     TGo4AnalysisStep* pro3=ana->GetAnalysisStep("Output3Provider");
00098     TGo4AnalysisStep* ex12=ana->GetAnalysisStep("Exec12");    
00099     if(pro1 && pro2 && pro3 && ex12)
00100       {
00101          pro1->SetProcessEnabled(fbExec12On | fbCollectorOn);
00102          pro1->SetSourceEnabled(!fbExec1On);
00103          pro2->SetProcessEnabled(fbExec12On | fbCollectorOn);
00104          pro2->SetSourceEnabled(!fbExec2On);
00105          pro3->SetProcessEnabled(fbCollectorOn);
00106          pro3->SetSourceEnabled(!fbExec3On);
00107          ex12->SetProcessEnabled(fbExec12On);
00108       }
00109     TGo4AnalysisStep* pro12=ana->GetAnalysisStep("Output12Provider");
00110     TGo4AnalysisStep* fin=ana->GetAnalysisStep("Final");
00111     if(pro12 && fin)
00112       {
00113          pro12->SetProcessEnabled(fbCollectorOn);
00114          pro12->SetSourceEnabled(!fbExec12On);
00115          fin->SetProcessEnabled(fbCollectorOn);
00116 
00117       }
00118   cout <<"Parameter "<<GetName()<<" changed steps setup" << endl;
00119   
00120   
00121   }
00122      else
00123      cout << "Wrong parameter object: " << pp->ClassName() << endl;
00124   return kTRUE;
00125 }
00126 ClassImp(TMeshParameter)
00127 
00128 
00129 
00130 
00131 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:55 2005 for Go4-v2.10-5 by doxygen1.2.15