00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <iostream.h>
00025
00026 void TGo4ConfigStep::InputArguments(const QString& Arg) {
00027 TGo4LockGuard glob;
00028 TGo4EventSourceParameter* SourcePar=fxTGo4AnalysisStepStatus->GetSourcePar();
00029 int ParId=SourcePar->GetID();
00030 if (ParId==GO4EV_USER){
00031 TGo4UserSourceParameter* usrpar=dynamic_cast<TGo4UserSourceParameter*>(SourcePar);
00032 if (usrpar!=0)
00033 usrpar->SetExpression(Arg.stripWhiteSpace().data());
00034 }
00035 }
00036
00037 void TGo4ConfigStep::InputDisable(int ) {
00038 TGo4LockGuard glob;
00039 if(Disable_in_2->isChecked()) {
00040 fxTGo4AnalysisStepStatus->SetSourceEnabled(kFALSE);
00041 SourceBox->setEnabled(false);
00042 } else {
00043 fxTGo4AnalysisStepStatus->SetSourceEnabled(kTRUE);
00044 SourceBox->setEnabled(true);
00045 }
00046 }
00047
00048 void TGo4ConfigStep::InputPort(const QString& fxPort)
00049 {
00050 TGo4LockGuard glob;
00051 TGo4EventSourceParameter* SourcePar=fxTGo4AnalysisStepStatus->GetSourcePar();
00052 int ParId=SourcePar->GetID();
00053 if (ParId==GO4EV_MBS_REVSERV){
00054 TGo4RevServParameter* revpar=dynamic_cast<TGo4RevServParameter*>(SourcePar);
00055 if (revpar!=0){
00056 revpar->SetPort(fxPort.toInt());
00057 }
00058 }else if (ParId==GO4EV_USER){
00059 TGo4UserSourceParameter* usrpar=dynamic_cast<TGo4UserSourceParameter*>(SourcePar);
00060 if (usrpar!=0){
00061 usrpar->SetPort(fxPort.toInt());
00062
00063 }
00064 }
00065 }
00066
00067 void TGo4ConfigStep::InputSourceText(const QString& Name)
00068 {
00069 TGo4LockGuard glob;
00070 fxTGo4AnalysisStepStatus->GetSourcePar()->SetName(Name.stripWhiteSpace().data());
00071 }
00072
00073 void TGo4ConfigStep::OutputDisable(int )
00074 {
00075 TGo4LockGuard glob;
00076 if(Disable_out_2->isChecked()){
00077 fxTGo4AnalysisStepStatus->SetStoreEnabled(kFALSE);
00078 StoreBox->setEnabled(false);
00079 StoreBox->setHidden(true);
00080 }else{
00081 fxTGo4AnalysisStepStatus->SetStoreEnabled(kTRUE);
00082 StoreBox->setEnabled(true);
00083 StoreBox->setShown(true);
00084 }
00085
00086 parentWidget()->parentWidget()->parentWidget()->parentWidget()->adjustSize();
00087 }
00088
00089 void TGo4ConfigStep::OutputNameText(const QString& Name)
00090 {
00091 TGo4LockGuard glob;
00092 fxTGo4AnalysisStepStatus->GetStorePar()->SetName(Name.stripWhiteSpace().data());
00093 }
00094
00095 void TGo4ConfigStep::StepDisable(int )
00096 {
00097 TGo4LockGuard glob;
00098 if(Step_Disable_b->isChecked()){
00099 fxTGo4AnalysisStepStatus->SetProcessEnabled(kFALSE);
00100 SourceBox->setEnabled(false);
00101 StoreBox->setEnabled(false);
00102
00103 }else{
00104 fxTGo4AnalysisStepStatus->SetProcessEnabled(kTRUE);
00105 InputDisable(0);
00106 OutputDisable(0);
00107 }
00108
00109 }
00110
00111
00112
00113 void TGo4ConfigStep::OutArguments(const QString&)
00114 {
00115
00116 }
00117
00118
00119 void TGo4ConfigStep::init()
00120 {
00121 }
00122
00123
00124
00125
00126
00127 void TGo4ConfigStep::GetParameters( TGo4AnalysisStatus *AnalysisStatus, TGo4AnalysisStepStatus *StepStatus , int id)
00128 {
00129 if (StepStatus==0) return;
00130
00131 TGo4LockGuard glob;
00132 StepId=id;
00133
00134 fxTGo4AnalysisStatus = AnalysisStatus;
00135 fxTGo4AnalysisStepStatus = StepStatus;
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156 TGo4EventSourceParameter* srcpar = StepStatus->GetSourcePar();
00157
00158 ResetSourceWidgets(srcpar->GetName(), srcpar->GetTimeout());
00159
00160 switch(srcpar->GetID()) {
00161 case GO4EV_FILE: {
00162 SetFileSource();
00163 break;
00164 }
00165 case GO4EV_MBS_FILE: {
00166 TGo4MbsFileParameter* filpar=dynamic_cast<TGo4MbsFileParameter*>(srcpar);
00167 SetMbsFileSource(filpar ? filpar->GetTagName() : "",
00168 filpar ? filpar->GetStartEvent() : 0,
00169 filpar ? filpar->GetStopEvent() : 0,
00170 filpar ? filpar->GetEventInterval() : 0);
00171 break;
00172 }
00173 case GO4EV_MBS_STREAM: {
00174 SetMbsStreamSource();
00175 break;
00176 }
00177 case GO4EV_MBS_TRANSPORT: {
00178 SetMbsTransportSource();
00179 break;
00180 }
00181 case GO4EV_MBS_EVENTSERVER: {
00182 SetMbsEventServerSource();
00183 break;
00184 }
00185 case GO4EV_MBS_REVSERV: {
00186 TGo4RevServParameter* revpar = dynamic_cast<TGo4RevServParameter*>(srcpar);
00187 SetMbsRevServSource(revpar ? revpar->GetPort() : 0);
00188 break;
00189 }
00190 case GO4EV_MBS_RANDOM: {
00191 SetRandomSource();
00192 break;
00193 }
00194 case GO4EV_USER: {
00195 TGo4UserSourceParameter* usrpar = dynamic_cast<TGo4UserSourceParameter*>(srcpar);
00196 SetUserSource(usrpar ? usrpar->GetPort() : 0,
00197 usrpar ? usrpar->GetExpression() : "");
00198 break;
00199 }
00200 default:
00201 break;
00202
00203 }
00204
00205
00206
00207
00208
00209
00210 TGo4EventStoreParameter* StorePar = fxTGo4AnalysisStepStatus->GetStorePar();
00211
00212 if (StorePar!=0)
00213 switch(StorePar->GetID()) {
00214 case GO4EV_FILE: {
00215 TGo4FileStoreParameter* fstor = dynamic_cast<TGo4FileStoreParameter*>(StorePar);
00216 SetFileStore(fstor->GetName(),
00217 fstor->IsOverwriteMode(),
00218 fstor->GetBufsize(),
00219 fstor->GetSplitlevel(),
00220 fstor->GetCompression());
00221 break;
00222 }
00223 case GO4EV_BACK: {
00224 TGo4BackStoreParameter* bstor = dynamic_cast<TGo4BackStoreParameter*>(StorePar);
00225 SetBackStore(bstor->GetName(),
00226 bstor->GetBufsize(),
00227 bstor->GetSplitlevel());
00228 break;
00229 }
00230 default:
00231 break;
00232 }
00233
00234
00235
00236
00237 SetStepControl(fxTGo4AnalysisStepStatus->IsProcessEnabled(),
00238 fxTGo4AnalysisStepStatus->IsSourceEnabled(),
00239 fxTGo4AnalysisStepStatus->IsStoreEnabled());
00240 }
00241
00242 void TGo4ConfigStep::SourceComboHighlighted(int k) {
00243 TGo4LockGuard glob;
00244 LineEditPortNumber->setEnabled(false);
00245 LineEditTagfile->setEnabled(false);
00246 SpinBoxStartEvent->setEnabled(false);
00247 SpinBoxStopEvent->setEnabled(false);
00248 SpinBoxInterEvent->setEnabled(false);
00249 SpinBoxTimeout->setEnabled(false);
00250 LineEditArgumentsIn_2->setEnabled(false);
00251 FileNameInput->setEnabled(false);
00252 if(k==0) {
00253 TGo4FileSourceParameter* newpar1 = new TGo4FileSourceParameter(LineEditInputSource_2->text().data());
00254 fxTGo4AnalysisStepStatus->SetSourcePar(newpar1);
00255 FileNameInput->setEnabled(true);
00256 delete newpar1;
00257 } else
00258 if (k==1) {
00259 TGo4MbsFileParameter* newpar4 = new TGo4MbsFileParameter(LineEditInputSource_2->text().data());
00260 fxTGo4AnalysisStepStatus->SetSourcePar(newpar4);
00261 if(LineEditInputSource_2->text().contains(TGo4MbsFile::fgcFILELISTSUF))
00262 {
00263
00264 LineEditTagfile->setEnabled(false);
00265 SpinBoxStartEvent->setEnabled(false);
00266 SpinBoxStopEvent->setEnabled(false);
00267 SpinBoxInterEvent->setEnabled(false);
00268 }
00269 else
00270 {
00271
00272 LineEditTagfile->setEnabled(true);
00273 SpinBoxStartEvent->setEnabled(true);
00274 SpinBoxStopEvent->setEnabled(true);
00275 SpinBoxInterEvent->setEnabled(true);
00276 }
00277 FileNameInput->setEnabled(true);
00278 delete newpar4;
00279 } else
00280 if (k==2) {
00281 TGo4MbsStreamParameter* newpar5 = new TGo4MbsStreamParameter(LineEditInputSource_2->text().data());
00282 fxTGo4AnalysisStepStatus->SetSourcePar(newpar5);
00283 SpinBoxTimeout->setEnabled(true);
00284 delete newpar5;
00285 } else
00286 if (k==3) {
00287 TGo4MbsTransportParameter* newpar6 = new TGo4MbsTransportParameter(LineEditInputSource_2->text().data());
00288 fxTGo4AnalysisStepStatus->SetSourcePar(newpar6);
00289 SpinBoxTimeout->setEnabled(true);
00290 delete newpar6;
00291 }else
00292 if (k==4) {
00293 TGo4MbsEventServerParameter* newpar7 = new TGo4MbsEventServerParameter(LineEditInputSource_2->text().data());
00294 fxTGo4AnalysisStepStatus->SetSourcePar(newpar7);
00295 SpinBoxTimeout->setEnabled(true);
00296 delete newpar7;
00297 } else
00298 if (k==5) {
00299 TGo4RevServParameter* newpar8 = new TGo4RevServParameter(LineEditInputSource_2->text().data());
00300 newpar8->SetPort(LineEditPortNumber->text().toInt());
00301 fxTGo4AnalysisStepStatus->SetSourcePar(newpar8);
00302 LineEditPortNumber->setEnabled(true);
00303 delete newpar8;
00304 } else
00305 if (k==6) {
00306 TGo4MbsRandomParameter* newpar8 = new TGo4MbsRandomParameter(LineEditInputSource_2->text().data());
00307 fxTGo4AnalysisStepStatus->SetSourcePar(newpar8);
00308 delete newpar8;
00309 } else
00310 if (k==7) {
00311 TGo4UserSourceParameter *newpar9 = new TGo4UserSourceParameter(LineEditInputSource_2->text().data());
00312 newpar9->SetPort(LineEditPortNumber->text().toInt());
00313 newpar9->SetExpression(LineEditArgumentsIn_2->text().stripWhiteSpace().data());
00314 fxTGo4AnalysisStepStatus->SetSourcePar(newpar9);
00315 LineEditPortNumber->setEnabled(true);
00316 LineEditArgumentsIn_2->setEnabled(true);
00317 SpinBoxTimeout->setEnabled(true);
00318 delete newpar9;
00319 }
00320 }
00321
00322 void TGo4ConfigStep::StoreComboHighlighted(int k)
00323 {
00324 TGo4LockGuard glob;
00325 if(k==0) {
00326 StoreNameEdit->setDisabled(FALSE);
00327 TGo4FileStoreParameter* newpar1 = new TGo4FileStoreParameter(StoreNameEdit->text().data());
00328 fxTGo4AnalysisStepStatus->SetStorePar(newpar1);
00329 delete newpar1;
00330 CompLevel->setDisabled(FALSE);
00331 StoreOverwriteMode->setDisabled(FALSE);
00332 FileNameOutput->setDisabled(FALSE);
00333 } else
00334 if(k==1) {
00335 StoreNameEdit->setDisabled(TRUE);
00336 TGo4BackStoreParameter *newpar3 = new TGo4BackStoreParameter(GetBackStoreName().data());
00337 fxTGo4AnalysisStepStatus->SetStorePar(newpar3);
00338 delete newpar3;
00339 CompLevel->setDisabled(TRUE);
00340 StoreOverwriteMode->setDisabled(TRUE);
00341 FileNameOutput->setDisabled(TRUE);
00342 }
00343 }
00344
00345
00346 void TGo4ConfigStep::destroy()
00347 {
00348
00349
00350 }
00351
00352 void TGo4ConfigStep::OutPutFileDialog()
00353 {
00354 QString fileName;
00355 QFileDialog* fd = new QFileDialog( this, "file name", kTRUE );
00356 fd->setMode( QFileDialog::AnyFile);
00357 fd->setCaption( "Select file name for step output");
00358 fd->setDir(fxConfigStatus->GetStorePath());
00359 fd->setFilter( "Go4FileStore (*.root)" );
00360 if ( fd->exec() == QDialog::Accepted ) {
00361 fileName = fd->selectedFile();
00362 fxConfigStatus->SetStorePath(fd->dirPath());
00363 if(!fileName.endsWith(".root")) fileName.append(".root");
00364 StoreNameEdit->setText(fileName);
00365 }
00366 delete fd;
00367 }
00368
00369 void TGo4ConfigStep::StoreBufferSize( int t )
00370 {
00371 if(fxTGo4AnalysisStepStatus->GetStorePar()->InheritsFrom("TGo4FileStoreParameter")){
00372 TGo4FileStoreParameter *StorePar=(TGo4FileStoreParameter *)fxTGo4AnalysisStepStatus->GetStorePar();
00373 StorePar->SetBufsize(1000*t);
00374 }else if (fxTGo4AnalysisStepStatus->GetStorePar()->InheritsFrom("TGo4BackStoreParameter")){
00375 TGo4BackStoreParameter * StorePar = (TGo4BackStoreParameter *)fxTGo4AnalysisStepStatus->GetStorePar();
00376 StorePar->SetBufsize(1000*t);
00377 }
00378 }
00379 void TGo4ConfigStep::StoreSplitLevel( int t)
00380 {
00381 if(fxTGo4AnalysisStepStatus->GetStorePar()->InheritsFrom("TGo4FileStoreParameter")){
00382 TGo4FileStoreParameter *StorePar=(TGo4FileStoreParameter *)fxTGo4AnalysisStepStatus->GetStorePar();
00383 StorePar->SetSplitlevel(t);
00384 }else if (fxTGo4AnalysisStepStatus->GetStorePar()->InheritsFrom("TGo4BackStoreParameter")){
00385 TGo4BackStoreParameter * StorePar = (TGo4BackStoreParameter *)fxTGo4AnalysisStepStatus->GetStorePar();
00386 StorePar->SetSplitlevel(t);
00387 }
00388 }
00389 void TGo4ConfigStep::StoreCompLevel( int t)
00390 {
00391 if(fxTGo4AnalysisStepStatus->GetStorePar()->InheritsFrom("TGo4FileStoreParameter")){
00392 TGo4FileStoreParameter *StorePar=(TGo4FileStoreParameter *)fxTGo4AnalysisStepStatus->GetStorePar();
00393 StorePar->SetCompression(t);
00394 }
00395
00396 }
00397
00398 void TGo4ConfigStep::StoreOverWrite( bool overwrite)
00399 {
00400 if(fxTGo4AnalysisStepStatus->GetStorePar()->InheritsFrom("TGo4FileStoreParameter")){
00401 TGo4FileStoreParameter *StorePar=dynamic_cast <TGo4FileStoreParameter *> (fxTGo4AnalysisStepStatus->GetStorePar());
00402 if(overwrite)StorePar->SetOverwriteMode(kTRUE);
00403 else StorePar->SetOverwriteMode(kFALSE);
00404 }
00405 }
00406
00407
00408
00409
00410
00411 void TGo4ConfigStep::InputTagfile( const QString & tag )
00412 {
00413 TGo4EventSourceParameter* SourcePar=fxTGo4AnalysisStepStatus->GetSourcePar();
00414 int ParId=SourcePar->GetID();
00415 if (ParId==GO4EV_MBS_FILE)
00416 {
00417 TGo4MbsFileParameter* filpar=dynamic_cast<TGo4MbsFileParameter*>(SourcePar);
00418 if (filpar!=0)
00419 {
00420 if(tag.isEmpty())
00421 {
00422
00423 filpar->SetTagName(TGo4MbsFile::fgcNOTAGFILE);
00424 }
00425 else
00426 {
00427 filpar->SetTagName(tag.stripWhiteSpace().data());
00428 }
00429
00430 }
00431 }
00432 }
00433
00434 void TGo4ConfigStep::StoreStartEvent( int num )
00435 {
00436 TGo4EventSourceParameter* SourcePar=fxTGo4AnalysisStepStatus->GetSourcePar();
00437 int ParId=SourcePar->GetID();
00438 if (ParId==GO4EV_MBS_FILE)
00439 {
00440 TGo4MbsFileParameter* filpar=dynamic_cast<TGo4MbsFileParameter*>(SourcePar);
00441 if (filpar!=0)
00442 filpar->SetStartEvent(num);
00443 }
00444 }
00445
00446 void TGo4ConfigStep::StoreStopEvent( int num )
00447 {
00448 TGo4EventSourceParameter* SourcePar=fxTGo4AnalysisStepStatus->GetSourcePar();
00449 int ParId=SourcePar->GetID();
00450 if (ParId==GO4EV_MBS_FILE)
00451 {
00452 TGo4MbsFileParameter* filpar=dynamic_cast<TGo4MbsFileParameter*>(SourcePar);
00453 if (filpar!=0)
00454 filpar->SetStopEvent(num);
00455 }
00456
00457 }
00458
00459 void TGo4ConfigStep::StoreEventInterval( int num )
00460 {
00461 TGo4EventSourceParameter* SourcePar=fxTGo4AnalysisStepStatus->GetSourcePar();
00462 int ParId=SourcePar->GetID();
00463 if (ParId==GO4EV_MBS_FILE)
00464 {
00465 TGo4MbsFileParameter* filpar=dynamic_cast<TGo4MbsFileParameter*>(SourcePar);
00466 if (filpar!=0)
00467 filpar->SetEventInterval(num);
00468 }
00469 }
00470
00471 void TGo4ConfigStep::StoreTimeout( int tim )
00472 {
00473 TGo4EventSourceParameter* sourcepar=fxTGo4AnalysisStepStatus->GetSourcePar();
00474 if (sourcepar!=0)
00475 sourcepar->SetTimeout(tim);
00476
00477 }
00478
00479
00480 void TGo4ConfigStep::InputFileDialog()
00481 {
00482 QString fileName;
00483 QFileDialog* fd = new QFileDialog( this, "file name", kTRUE );
00484 fd->setMode( QFileDialog::ExistingFile);
00485 fd->setCaption( "Select file name for step input");
00486 fd->setDir(fxConfigStatus->GetSourcePath());
00487 TGo4AnalysisStepStatus* ststate=fxTGo4AnalysisStepStatus;
00488 bool mbsfilemode=false;
00489 if(ststate)
00490 {
00491 TGo4EventSourceParameter* sourcepar=ststate->GetSourcePar();
00492 if(sourcepar->InheritsFrom("TGo4FileSourceParameter"))
00493 fd->setFilter( "Go4FileSource (*.root)" );
00494 else if (sourcepar->InheritsFrom("TGo4MbsFileParameter"))
00495 {
00496 mbsfilemode=true;
00497 QString filters="Go4MbsFile (*";
00498 filters+=TGo4MbsFile::fgcLMDSUF;
00499 filters+=" *";
00500 filters+=QString(TGo4MbsFile::fgcLMDSUF).upper();
00501 filters+=");;Go4 list mode list (*";
00502 filters+=TGo4MbsFile::fgcFILELISTSUF;
00503 filters+=")";
00504 fd->setFilters(filters);
00505
00506
00507 }
00508 else
00509 cout <<"Unknown sourcepar " <<sourcepar->IsA()->GetName() << endl;;
00510 }
00511 if ( fd->exec() == QDialog::Accepted ) {
00512 fileName = fd->selectedFile();
00513 fxConfigStatus->SetSourcePath(fd->dirPath());
00514 LineEditInputSource_2->setText(fileName);
00515 if(mbsfilemode)
00516 {
00517 if(fd->selectedFilter().contains(TGo4MbsFile::fgcFILELISTSUF))
00518 {
00519 LineEditTagfile->setEnabled(false);
00520 SpinBoxStartEvent->setEnabled(false);
00521 SpinBoxStopEvent->setEnabled(false);
00522 SpinBoxInterEvent->setEnabled(false);
00523 }
00524 else
00525 {
00526 LineEditTagfile->setEnabled(true);
00527 SpinBoxStartEvent->setEnabled(true);
00528 SpinBoxStopEvent->setEnabled(true);
00529 SpinBoxInterEvent->setEnabled(true);
00530 }
00531 }
00532 }
00533 delete fd;
00534 }
00535
00536
00537
00538 QString TGo4ConfigStep::GetStepName() {
00539 return fxTGo4AnalysisStepStatus->GetName();
00540 }
00541
00542 void TGo4ConfigStep::SetStepControl(bool process, bool source, bool store) {
00543 Step_Disable_b->setChecked(!process);
00544 Disable_in_2->setChecked(!source);
00545 Disable_out_2->setChecked(!store);
00546 }
00547
00548 void TGo4ConfigStep::GetStepControl(bool& process, bool& source, bool& store) {
00549 process = !Step_Disable_b->isChecked();
00550 source = !Disable_in_2->isChecked();
00551 store = !Disable_out_2->isChecked();
00552 }
00553
00554 void TGo4ConfigStep::ResetSourceWidgets(const QString& name, int timeout) {
00555 LineEditInputSource_2->setText(name);
00556 SpinBoxTimeout->setValue(timeout);
00557
00558 LineEditPortNumber->setEnabled(false);
00559 LineEditArgumentsIn_2->setEnabled(false);
00560 LineEditTagfile->setEnabled(false);
00561 SpinBoxStartEvent->setEnabled(false);
00562 SpinBoxStopEvent->setEnabled(false);
00563 SpinBoxInterEvent->setEnabled(false);
00564 SpinBoxTimeout->setEnabled(false);
00565 FileNameInput->setEnabled(false);
00566 }
00567
00568 void TGo4ConfigStep::SetFileSource() {
00569 Input_Combo_1_2->setCurrentItem(0);
00570 FileNameInput->setEnabled(true);
00571 SourceComboHighlighted(0);
00572 }
00573
00574 void TGo4ConfigStep::SetMbsFileSource(QString TagFile, int start, int stop, int interval) {
00575 Input_Combo_1_2->setCurrentItem(1);
00576 LineEditTagfile->setEnabled(true);
00577 SpinBoxStartEvent->setEnabled(true);
00578 SpinBoxStopEvent->setEnabled(true);
00579 SpinBoxInterEvent->setEnabled(true);
00580 FileNameInput->setEnabled(true);
00581 if(!strstr(TagFile.latin1(),TGo4MbsFile::fgcNOTAGFILE ))
00582 LineEditTagfile->setText(TagFile);
00583 else
00584 LineEditTagfile->setText("");
00585 SpinBoxStartEvent->setValue(start);
00586 SpinBoxStopEvent->setValue(stop);
00587 SpinBoxInterEvent->setValue(interval);
00588 SourceComboHighlighted(1);
00589 }
00590
00591 void TGo4ConfigStep::SetMbsStreamSource() {
00592 Input_Combo_1_2->setCurrentItem(2);
00593 SpinBoxTimeout->setEnabled(true);
00594 SourceComboHighlighted(2);
00595 }
00596
00597 void TGo4ConfigStep::SetMbsTransportSource() {
00598 Input_Combo_1_2->setCurrentItem(3);
00599 SpinBoxTimeout->setEnabled(true);
00600 SourceComboHighlighted(3);
00601 }
00602
00603 void TGo4ConfigStep::SetMbsEventServerSource() {
00604 Input_Combo_1_2->setCurrentItem(4);
00605 SpinBoxTimeout->setEnabled(true);
00606 SourceComboHighlighted(4);
00607 }
00608
00609 void TGo4ConfigStep::SetMbsRevServSource(int port) {
00610 Input_Combo_1_2->setCurrentItem(5);
00611 QString PortNo;
00612 PortNo.setNum(port);
00613 LineEditPortNumber->setText(PortNo);
00614 LineEditPortNumber->setEnabled(true);
00615 LineEditArgumentsIn_2->setEnabled(true);
00616 SourceComboHighlighted(5);
00617 }
00618
00619 void TGo4ConfigStep::SetRandomSource() {
00620 Input_Combo_1_2->setCurrentItem(6);
00621 SourceComboHighlighted(6);
00622 }
00623
00624 void TGo4ConfigStep::SetUserSource(int port, QString expr) {
00625 Input_Combo_1_2->setCurrentItem(7);
00626 QString PortNo;
00627 PortNo.setNum(port);
00628 LineEditPortNumber->setText(PortNo);
00629 LineEditArgumentsIn_2->setText(expr);
00630 LineEditPortNumber->setEnabled(true);
00631 LineEditArgumentsIn_2->setEnabled(true);
00632 SpinBoxTimeout->setEnabled(true);
00633 SourceComboHighlighted(7);
00634 }
00635
00636 int TGo4ConfigStep::GetSourceSetup(QString& name, int& timeout) {
00637 name = LineEditInputSource_2->text();
00638 timeout = SpinBoxTimeout->value();
00639 return Input_Combo_1_2->currentItem();
00640 }
00641
00642 void TGo4ConfigStep::GetMbsFileSource(QString& TagFile, int& start, int& stop, int& interval) {
00643 TagFile = LineEditTagfile->text();
00644
00645 start = SpinBoxStartEvent->value();
00646 stop = SpinBoxStopEvent->value();
00647 interval = SpinBoxInterEvent->value();
00648 }
00649
00650 void TGo4ConfigStep::GetMbsRevServSource(int& port)
00651 {
00652 port = LineEditPortNumber->text().toInt();
00653 }
00654
00655 void TGo4ConfigStep::GetUserSource(int& port, QString& expr)
00656 {
00657 port = LineEditPortNumber->text().toInt();
00658 expr = LineEditArgumentsIn_2->text();
00659 }
00660
00661 void TGo4ConfigStep::SetFileStore(QString name, bool overwrite, int bufsize, int splitlevel, int compression)
00662 {
00663 StoreNameEdit->setEnabled(TRUE);
00664 StoreNameEdit->setText(name);
00665 Output_Combo_1_2->setCurrentItem(0);
00666 StoreOverwriteMode->setChecked(overwrite);
00667 StoreOverwriteMode->setEnabled(TRUE);
00668 BufferSize->setValue(bufsize/1000);
00669 SplitLevel->setValue(splitlevel);
00670 CompLevel->setValue(compression);
00671 CompLevel->setEnabled(TRUE);
00672 FileNameOutput->setEnabled(TRUE);
00673 StoreComboHighlighted(0);
00674 }
00675
00676 void TGo4ConfigStep::SetBackStore(QString name, int bufsize, int splitlevel)
00677 {
00678 StoreNameEdit->setEnabled(FALSE);
00679 StoreNameEdit->setText(GetBackStoreName());
00680 Output_Combo_1_2->setCurrentItem(1);
00681 BufferSize->setValue(bufsize/1000);
00682 SplitLevel->setValue(splitlevel);
00683 StoreOverwriteMode->setEnabled(FALSE);
00684 CompLevel->setEnabled(FALSE);
00685 FileNameOutput->setEnabled(FALSE);
00686 StoreComboHighlighted(1);
00687 }
00688
00689 QString TGo4ConfigStep::GetBackStoreName()
00690 {
00691 QString name = "BackStoreTree_";
00692 name += GetStepName();
00693 return name;
00694 }
00695
00696 int TGo4ConfigStep::GetStoreSetup(QString& name)
00697 {
00698 int typ = Output_Combo_1_2->currentItem();
00699 if (typ==1) name = GetBackStoreName();
00700 else name = StoreNameEdit->text();
00701 return typ;
00702 }
00703
00704 void TGo4ConfigStep::GetFileStore(bool& overwrite, int& bufsize, int& splitlevel, int& compression)
00705 {
00706 overwrite = StoreOverwriteMode->isChecked();
00707 bufsize = BufferSize->value() * 1000;
00708 splitlevel = SplitLevel->value();
00709 compression = CompLevel->value();
00710 }
00711
00712 void TGo4ConfigStep::GetBackStore(int& bufsize, int& splitlevel) {
00713 bufsize = BufferSize->value() * 1000;
00714 splitlevel = SplitLevel->value();
00715 }
00716
00717
00718 void TGo4ConfigStep::SetConfigurationStatus( TGo4AnalysisConfigurationStatus * state )
00719 {
00720 fxConfigStatus=state;
00721 }
00722
00723