Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TMeshParameter.cxx

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 "Riostream.h"
00019 
00020 #include "TGo4AnalysisStep.h"
00021 #include "TGo4Analysis.h"
00022 
00023 //***********************************************************
00024 TMeshParameter::TMeshParameter()
00025 : TGo4Parameter("MeshParameter"),
00026 fbUnpackOn(kTRUE), fbExec1On(kTRUE), fbExec2On(kTRUE),
00027 fbExec3On(kTRUE),fbExec12On(kTRUE),fbCollectorOn(kTRUE)
00028 {
00029 }
00030 //***********************************************************
00031 TMeshParameter::TMeshParameter(const char* name)
00032 : TGo4Parameter(name),
00033 fbUnpackOn(kTRUE), fbExec1On(kTRUE), fbExec2On(kTRUE),
00034 fbExec3On(kTRUE),fbExec12On(kTRUE),fbCollectorOn(kTRUE)
00035 {
00036 }
00037 //***********************************************************
00038 TMeshParameter::~TMeshParameter()
00039 {
00040 }
00041 //***********************************************************
00042 
00043 //-----------------------------------------------------------
00044 Int_t TMeshParameter::PrintParameter(Text_t * n, Int_t){
00045   cout << "Parameter " << GetName()<<":" <<endl;
00046   cout << " fbUnpackOn="<<fbUnpackOn<<endl;
00047   cout << " fbExec1On="<<fbExec1On<<endl;
00048   cout << " fbExec2On="<<fbExec2On<<endl;
00049   cout << " fbExec3On="<<fbExec3On<<endl;
00050   cout << " fbExec12On="<<fbExec12On<<endl;
00051   cout << " fbCollectorOn="<<fbCollectorOn<<endl;
00052   return 0;
00053 }
00054 //-----------------------------------------------------------
00055 Bool_t TMeshParameter::UpdateFrom(TGo4Parameter *pp){
00056   if(pp->InheritsFrom("TMeshParameter"))
00057   {
00058     TMeshParameter* from = (TMeshParameter *) pp;
00059     fbUnpackOn=from->fbUnpackOn;
00060     fbExec1On=from->fbExec1On;
00061     fbExec2On=from->fbExec2On;
00062     fbExec3On=from->fbExec3On;
00063     fbExec12On=from->fbExec12On;
00064     fbCollectorOn=from->fbCollectorOn;
00065     cout <<"Updated Parameter "<<GetName() << endl;
00066     TGo4Analysis* ana=TGo4Analysis::Instance();
00067     TGo4AnalysisStep* unpack=ana->GetAnalysisStep("Unpack");
00068     if(unpack)
00069       unpack->SetProcessEnabled(fbUnpackOn);
00070 
00071     TGo4AnalysisStep* pror1=ana->GetAnalysisStep("Input1Provider");
00072     TGo4AnalysisStep* ex1=ana->GetAnalysisStep("Exec1");
00073     if(pror1 && ex1)
00074       {
00075          pror1->SetProcessEnabled(fbExec1On);
00076          pror1->SetSourceEnabled(!fbUnpackOn);
00077          ex1->SetProcessEnabled(fbExec1On);
00078       }
00079     TGo4AnalysisStep* pror2=ana->GetAnalysisStep("Input2Provider");
00080     TGo4AnalysisStep* ex2=ana->GetAnalysisStep("Exec2");
00081     if(pror2 && ex2)
00082       {
00083          pror2->SetProcessEnabled(fbExec2On);
00084          pror2->SetSourceEnabled(!fbUnpackOn);
00085          ex2->SetProcessEnabled(fbExec2On);
00086       }
00087     TGo4AnalysisStep* pror3=ana->GetAnalysisStep("Input3Provider");
00088     TGo4AnalysisStep* ex3=ana->GetAnalysisStep("Exec3");
00089     if(pror3 && ex3)
00090       {
00091          pror3->SetProcessEnabled(fbExec3On);
00092          pror3->SetSourceEnabled(!fbUnpackOn);
00093          ex3->SetProcessEnabled(fbExec3On);
00094       }
00095 
00096     TGo4AnalysisStep* pro1=ana->GetAnalysisStep("Output1Provider");
00097     TGo4AnalysisStep* pro2=ana->GetAnalysisStep("Output2Provider");
00098     TGo4AnalysisStep* pro3=ana->GetAnalysisStep("Output3Provider");
00099     TGo4AnalysisStep* ex12=ana->GetAnalysisStep("Exec12");
00100     if(pro1 && pro2 && pro3 && ex12)
00101       {
00102          pro1->SetProcessEnabled(fbExec12On | fbCollectorOn);
00103          pro1->SetSourceEnabled(!fbExec1On);
00104          pro2->SetProcessEnabled(fbExec12On | fbCollectorOn);
00105          pro2->SetSourceEnabled(!fbExec2On);
00106          pro3->SetProcessEnabled(fbCollectorOn);
00107          pro3->SetSourceEnabled(!fbExec3On);
00108          ex12->SetProcessEnabled(fbExec12On);
00109       }
00110     TGo4AnalysisStep* pro12=ana->GetAnalysisStep("Output12Provider");
00111     TGo4AnalysisStep* fin=ana->GetAnalysisStep("Final");
00112     if(pro12 && fin)
00113       {
00114          pro12->SetProcessEnabled(fbCollectorOn);
00115          pro12->SetSourceEnabled(!fbExec12On);
00116          fin->SetProcessEnabled(fbCollectorOn);
00117 
00118       }
00119   cout <<"Parameter "<<GetName()<<" changed steps setup" << endl;
00120 
00121 
00122   }
00123      else
00124      cout << "Wrong parameter object: " << pp->ClassName() << endl;
00125   return kTRUE;
00126 }
00127 
00128 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:11 2008 for Go4-v3.04-1 by  doxygen 1.4.2