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 "TXXXParameter.h" 00017 00018 #include <iostream.h> 00019 00020 //*********************************************************** 00021 TXXXParameter::TXXXParameter() 00022 : TGo4Parameter("XXXParameter") 00023 { 00024 frP1=0; 00025 frP2=0; 00026 fiNum=0; 00027 fbEnab=kFALSE; 00028 fdTest=0; 00029 fsTest=0; 00030 fcTest=0; 00031 flTest=0; 00032 fuNum=0; 00033 fuShort=0; 00034 fuChar=0; 00035 fuLong=0; 00036 fxInputfile="No file specified"; 00037 for(Int_t ix=0;ix<__ARRAYSIZE__;++ix) 00038 { 00039 fiDataArray[ix]=0; 00040 } 00041 for(Int_t u=0;u<__MEVX__;++u) 00042 { 00043 for(Int_t v=0;v<__MEVY__;++v) 00044 { 00045 fdMeV[u][v]=0; 00046 } 00047 } 00048 for(Int_t x=0;x<__MEVX__;++x) 00049 { 00050 fdTestarr[x]=0; 00051 } 00052 } 00053 //*********************************************************** 00054 TXXXParameter::TXXXParameter(Text_t * name) 00055 : TGo4Parameter(name) 00056 { 00057 frP1=10; 00058 frP2=20; 00059 fiNum=-3; 00060 fbEnab=kFALSE; 00061 fdTest=3.141592665; 00062 fsTest=6; 00063 fcTest=7; 00064 flTest=20; 00065 fuNum=42; 00066 fuShort=8; 00067 fuChar=9; 00068 fuLong=10; 00069 fxInputfile="testdata.lmd"; 00070 for(Int_t ix=0;ix<__ARRAYSIZE__;++ix) 00071 { 00072 fiDataArray[ix]=ix+30; 00073 } 00074 for(Int_t u=0;u<__MEVX__;++u) 00075 { 00076 for(Int_t v=0;v<__MEVY__;++v) 00077 { 00078 fdMeV[u][v]=(u+v)*1.537; 00079 } 00080 } 00081 for(Int_t x=0;x<__MEVX__;++x) 00082 { 00083 fdTestarr[x]=x*3.1415; 00084 } 00085 } 00086 //*********************************************************** 00087 TXXXParameter::~TXXXParameter() 00088 { 00089 } 00090 //*********************************************************** 00091 00092 //----------------------------------------------------------- 00093 Int_t TXXXParameter::PrintParameter(Text_t * n, Int_t){ 00094 return 0; 00095 cout << "Parameter " << GetName()<<":" <<endl; 00096 cout << " P1="<<frP1<<endl; 00097 cout << " P2="<<frP2<< endl; 00098 cout << " fiNum="<<fiNum<<endl; 00099 cout << " fbEnab="<<fbEnab<<endl; 00100 cout << " fdTest="<<fdTest<<endl; 00101 cout << " fsTest="<<fsTest<<endl; 00102 cout << " fcTest="<<fcTest<<endl; 00103 cout << " flTest="<<flTest<<endl; 00104 cout << " fuNum="<<fuNum<<endl; 00105 cout << " fuShort="<<fuShort<<endl; 00106 cout << " fuChar="<<fuChar<<endl; 00107 cout << " fuLong="<<fuLong<<endl; 00108 for(Int_t ix=0;ix<__ARRAYSIZE__;++ix) 00109 { 00110 cout << "fiDataArray["<<ix<<"]="<<fiDataArray[ix]<<endl; 00111 } 00112 for(Int_t u=0;u<__MEVX__;++u) 00113 { 00114 for(Int_t v=0;v<__MEVY__;++v) 00115 { 00116 cout << "fdMeV["<<u<<"]["<<v<<"]="<<fdMeV[u][v]<<endl; 00117 } 00118 } 00119 for(Int_t x=0;x<__MEVX__;++x) 00120 { 00121 cout << "fdTestarr["<<x<<"]="<<fdTestarr[x]<<endl; 00122 } 00123 cout <<" fxInputfile="<<fxInputfile.Data() << endl; 00124 return 0; 00125 } 00126 //----------------------------------------------------------- 00127 Bool_t TXXXParameter::UpdateFrom(TGo4Parameter *pp){ 00128 if(pp->InheritsFrom("TXXXParameter")) 00129 { 00130 TXXXParameter * from; 00131 from = (TXXXParameter *) pp; 00132 cout << "Parameter " << GetName() << ": P1=" << frP1 << " P2="<< frP2 << endl; 00133 frP1=from->frP1; 00134 frP2=from->frP2; 00135 fiNum=from->fiNum; 00136 fbEnab=from->fbEnab; 00137 fdTest=from->fdTest; 00138 fsTest=from->fsTest; 00139 fcTest=from->fcTest; 00140 flTest=from->flTest; 00141 fuNum=from->fuNum; 00142 fuShort=from->fuShort; 00143 fuChar=from->fuChar; 00144 fuLong=from->fuLong; 00145 fxInputfile=from->fxInputfile; 00146 for(Int_t ix=0;ix<__ARRAYSIZE__;++ix) 00147 { 00148 fiDataArray[ix]=from->fiDataArray[ix]; 00149 } 00150 for(Int_t u=0;u<__MEVX__;++u) 00151 { 00152 for(Int_t v=0;v<__MEVY__;++v) 00153 { 00154 fdMeV[u][v]=from->fdMeV[u][v]; 00155 } 00156 } 00157 for(Int_t x=0;x<__MEVX__;++x) 00158 { 00159 fdTestarr[x]=from->fdTestarr[x]; 00160 } 00161 cout <<"Updated Parameter:" << endl; 00162 //PrintParameter(0,0); 00163 } 00164 else 00165 cout << "Wrong parameter object: " << pp->ClassName() << endl; 00166 return kTRUE; 00167 } 00168 ClassImp(TXXXParameter) 00169 00170 00171 00172 00173 //----------------------------END OF GO4 SOURCE FILE ---------------------