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