62 : QWidget( parent, fl )
64 setObjectName( name ? name :
"Go4ConfigStep");
68#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
103 SpinBoxPortNumber->setVisible(
false);
104 TextLabelPortNumber->setVisible(
false);
105 SpinBoxRetryNumber->setVisible(
false);
106 TextLabelRetryNumber->setVisible(
false);
107 SpinBoxTimeout->setVisible(
false);
108 TextLabelTimeout->setVisible(
false);
110 SpinBoxStartEvent->setVisible(
false);
111 SpinBoxStopEvent->setVisible(
false);
112 SpinBoxInterEvent->setVisible(
false);
114 LineEditArgs->setVisible(
false);
115 TextLabelArgs->setVisible(
false);
116 LineEditTagfile->setVisible(
false);
117 TextLabelTagfile->setVisible(
false);
125 ExtraBtn->setText(
fExtra ?
"-" :
"+");
128 OutputCombo->removeItem(3);
129 EventSourceCombo->removeItem(8);
136 for (
int n = 0; n <
ParsSize; n++) {
146 int ParId=SourcePar->
GetID();
156 bool stepon = EnableStepBox->isChecked();
157 bool on = EnableSourceBox->isChecked();
160 SourceBox->setEnabled(stepon && on);
171 switch (SourcePar->
GetID()) {
203 switch (SourcePar->
GetID()) {
227 fStepStatus->GetSourcePar()->SetName(name.trimmed().toLatin1().constData());
231 LineEditTagfile->setVisible(!islml);
232 TextLabelTagfile->setVisible(!islml);
234 SpinBoxStartEvent->setEnabled(!islml);
235 SpinBoxStopEvent->setEnabled(!islml);
236 SpinBoxInterEvent->setEnabled(!islml);
242 bool stepon = EnableStepBox->isChecked();
243 bool on = EnableStoreBox->isChecked();
246 StoreBox->setEnabled(stepon && on);
247 StoreBox->setVisible(on);
252 parentWidget()->adjustSize();
253 parentWidget()->parentWidget()->adjustSize();
256 fxPanel->parentWidget()->adjustSize();
261 fStepStatus->GetStorePar()->SetName(Name.trimmed().toLatin1().constData());
266 bool on = EnableStepBox->isChecked();
269 EnableSourceBox->setEnabled(on);
270 EnableStoreBox->setEnabled(on);
280 if (!StepStatus)
return;
306 EventSourceCombo->setCurrentIndex(srckind);
316 switch(StorePar->
GetID()) {
386 bool delsrcpar =
true;
398 if (delsrcpar)
delete srcpar;
402 TString filename, hostname;
405 switch(srcpar->
GetID()) {
409 filename = srcpar->GetName();
416 hostname = srcpar->GetName();
417 port = mbspar ? mbspar->
GetPort() : 0;
483 fPars[kind] = newpar;
490 if (delsrcpar)
delete srcpar;
495 SourceNameEdit->setText(name);
496 SpinBoxTimeout->setValue(timeout);
501 SpinBoxStartEvent->setValue(start);
502 SpinBoxStopEvent->setValue(stop);
503 SpinBoxInterEvent->setValue(interval);
504 SpinBoxPortNumber->setValue(port);
505 SpinBoxRetryNumber->setValue(0);
517 SpinBoxPortNumber->setVisible(
false);
518 TextLabelPortNumber->setVisible(
false);
519 SpinBoxRetryNumber->setVisible(
false);
520 TextLabelRetryNumber->setVisible(
false);
521 LineEditArgs->setVisible(
false);
522 TextLabelArgs->setVisible(
false);
523 LineEditTagfile->setVisible(
false);
524 TextLabelTagfile->setVisible(
false);
526 SpinBoxStartEvent->setVisible(
false);
527 SpinBoxStopEvent->setVisible(
false);
528 SpinBoxInterEvent->setVisible(
false);
529 SpinBoxTimeout->setVisible(
false);
530 TextLabelTimeout->setVisible(
false);
531 FileNameBtn->setEnabled(
false);
532 MbsMonitorBtn->setEnabled(
false);
538 SourceNameEdit->setText(srcpar->GetName());
539 SpinBoxTimeout->setValue(srcpar->
GetTimeout());
547 SpinBoxPortNumber->setValue(mbspar->
GetPort());
548 SpinBoxRetryNumber->setValue(mbspar->
GetRetryCnt());
559 FileNameBtn->setEnabled(
true);
563 FileNameBtn->setEnabled(
true);
568 LineEditTagfile->setText(tagfile);
571 LineEditTagfile->setText(
"");
574 LineEditTagfile->setVisible(
fExtra);
575 TextLabelTagfile->setVisible(
fExtra);
577 SpinBoxStartEvent->setVisible(
fExtra);
578 SpinBoxStopEvent->setVisible(
fExtra);
579 SpinBoxInterEvent->setVisible(
fExtra);
586 TextLabelTimeout->setVisible(
fExtra);
587 SpinBoxTimeout->setVisible(
fExtra);
588 TextLabelPortNumber->setVisible(
fExtra);
589 SpinBoxPortNumber->setVisible(
fExtra);
590 TextLabelRetryNumber->setVisible(
fExtra);
591 SpinBoxRetryNumber->setVisible(
fExtra);
593 SpinBoxStartEvent->setVisible(
fExtra);
594 SpinBoxStopEvent->setVisible(
fExtra);
595 SpinBoxInterEvent->setVisible(
fExtra);
602 FileNameBtn->setEnabled(
true);
603 SpinBoxPortNumber->setValue(userpar->
GetPort());
605 SpinBoxPortNumber->setVisible(
fExtra);
606 TextLabelPortNumber->setVisible(
fExtra);
607 LineEditArgs->setVisible(
fExtra);
608 TextLabelArgs->setVisible(
fExtra);
609 TextLabelTimeout->setVisible(
fExtra);
610 SpinBoxTimeout->setVisible(
fExtra);
614 FileNameBtn->setEnabled(
true);
621 parentWidget()->adjustSize();
622 parentWidget()->parentWidget()->adjustSize();
625 fxPanel->parentWidget()->adjustSize();
631 StoreNameEdit->setDisabled(
false);
634 SplitLevel->setDisabled(
false);
635 BufferSize->setDisabled(
false);
636 CompLevel->setDisabled(
false);
637 StoreOverwriteMode->setDisabled(
false);
638 FileNameOutput->setDisabled(
false);
639 TreeAutosave->setDisabled(
false);
641 StoreNameEdit->setDisabled(
true);
644 SplitLevel->setDisabled(
false);
645 BufferSize->setDisabled(
false);
646 CompLevel->setDisabled(
true);
647 StoreOverwriteMode->setDisabled(
true);
648 FileNameOutput->setDisabled(
true);
649 TreeAutosave->setDisabled(
true);
651 StoreNameEdit->setDisabled(
false);
654 SplitLevel->setDisabled(
true);
655 BufferSize->setDisabled(
true);
656 CompLevel->setDisabled(
true);
657 StoreOverwriteMode->setDisabled(
true);
658 FileNameOutput->setDisabled(
false);
659 TreeAutosave->setDisabled(
true);
662 StoreNameEdit->setDisabled(
false);
665 StoreOverwriteMode->setDisabled(
false);
666 FileNameOutput->setDisabled(
false);
667 CompLevel->setDisabled(
true);
668 TreeAutosave->setDisabled(
true);
669 SplitLevel->setDisabled(
true);
670 BufferSize->setDisabled(
true);
680 if(storepar->InheritsFrom(TGo4FileStoreParameter::Class()))
681 filters =
"Go4FileSource (*.root)";
682 else if (storepar->InheritsFrom(TGo4UserStoreParameter::Class()))
683 filters =
"Go4UserStore (*.root)";
685 else if (storepar->InheritsFrom(TGo4HDF5StoreParameter::Class())) {
686 filters=
"Go4HDF5 (*.h5)";
690 std::cout <<
"Unknown storepar " <<storepar->ClassName() << std::endl;
693 QFileDialog fd(
this,
"Select file name for step output",
694 fxPanel->GetStorePath(), filters);
695 fd.setFileMode( QFileDialog::AnyFile);
696 if (fd.exec() != QDialog::Accepted)
return;
698 QStringList flst = fd.selectedFiles();
699 if (flst.isEmpty())
return;
701 QString fileName = flst[0];
702 std::cout <<
"output file is "<<fileName.toLatin1().constData() << std::endl;
703 fxPanel->SetStorePath(fd.directory().path());
704 if(!fileName.endsWith(
".h5")) fileName.append(
".h5");
705 std::cout <<
"output file is now "<<fileName.toLatin1().constData() << std::endl;
706 StoreNameEdit->setText(fileName);
711 if(
fStepStatus->GetStorePar()->InheritsFrom(TGo4FileStoreParameter::Class())){
715 if (
fStepStatus->GetStorePar()->InheritsFrom(TGo4BackStoreParameter::Class())){
723 if(
fStepStatus->GetStorePar()->InheritsFrom(TGo4FileStoreParameter::Class())) {
727 if (
fStepStatus->GetStorePar()->InheritsFrom(TGo4BackStoreParameter::Class())) {
735 if(
fStepStatus->GetStorePar()->InheritsFrom(TGo4FileStoreParameter::Class())) {
743 if(
fStepStatus->GetStorePar()->InheritsFrom(TGo4FileStoreParameter::Class())){
749 else if(
fStepStatus->GetStorePar()->InheritsFrom(TGo4HDF5StoreParameter::Class())){
759 if (
fStepStatus->GetStorePar()->InheritsFrom(TGo4FileStoreParameter::Class())) {
770 int ParId=SourcePar->
GetID();
780 filpar->
SetTagName(tag.trimmed().toLatin1().constData());
825 bool mbsfilemode =
false;
828 if(sourcepar->InheritsFrom(TGo4FileSourceParameter::Class()))
829 filters =
"Go4FileSource (*.root)";
831 if (sourcepar->InheritsFrom(TGo4MbsFileParameter::Class())) {
833 filters=
"Go4MbsFile (*";
837 filters+=
");;Go4 list mode list (*";
843 if (sourcepar->InheritsFrom(TGo4UserSourceParameter::Class())) {
844 filters =
"all files (*.*)";
847 else if (sourcepar->InheritsFrom(TGo4HDF5SourceParameter::Class())) {
848 filters=
"Go4HDF5 (*.h5)";
852 std::cout <<
"Unknown sourcepar " <<sourcepar->ClassName() << std::endl;
855 QFileDialog fd(
this,
"Select file name for step input",
fxPanel->GetSourcePath(), filters);
856 fd.setFileMode(QFileDialog::ExistingFile);
858 if (fd.exec() != QDialog::Accepted)
return;
860 QStringList flst = fd.selectedFiles();
861 if (flst.isEmpty())
return;
863 QString fileName = flst[0];
864 fxPanel->SetSourcePath(fd.directory().path());
865 SourceNameEdit->setText(fileName);
869 LineEditTagfile->setVisible(!islml);
870 TextLabelTagfile->setVisible(!islml);
871 SpinBoxStartEvent->setEnabled(!islml);
872 SpinBoxStopEvent->setEnabled(!islml);
873 SpinBoxInterEvent->setEnabled(!islml);
887 res += EnableStepBox->isChecked() ?
"x" :
"o";
888 res += EnableSourceBox->isChecked() ?
"x" :
"o";
889 res += EnableStoreBox->isChecked() ?
"x" :
"o";
896 EnableStepBox->setChecked(process);
897 EnableSourceBox->setChecked(source);
898 EnableStoreBox->setChecked(store);
905 process = EnableStepBox->isChecked();
906 source = EnableSourceBox->isChecked();
907 store = EnableStoreBox->isChecked();
920 LineEditTagfile->setText(TagFile);
922 LineEditTagfile->setText(
"");
944 SpinBoxPortNumber->setValue(port>0 ? port : 0);
949 SpinBoxPortNumber->setValue(port > 0 ? port : 0);
954 SpinBoxRetryNumber->setValue(retry > 0 ? retry : 0);
966 SpinBoxPortNumber->setValue(port);
967 LineEditArgs->setText(expr);
973 EventSourceCombo->setCurrentIndex(
kind_HDF5);
974 LineEditArgs->setText(name);
981 name = SourceNameEdit->text();
982 timeout = SpinBoxTimeout->value();
983 start = SpinBoxStartEvent->value();
984 stop = SpinBoxStopEvent->value();
985 interval = SpinBoxInterEvent->value();
995 nport = SpinBoxPortNumber->value();
996 nretry = SpinBoxRetryNumber->value();
1001 return EventSourceCombo->currentIndex();
1006 TagFile = LineEditTagfile->text();
1012 port = SpinBoxPortNumber->value();
1013 expr = LineEditArgs->text();
1018 StoreNameEdit->setEnabled(
true);
1019 StoreNameEdit->setText(name);
1020 OutputCombo->setCurrentIndex(0);
1021 StoreOverwriteMode->setChecked(overwrite);
1022 StoreOverwriteMode->setEnabled(
true);
1023 BufferSize->setEnabled(
true);
1024 SplitLevel->setEnabled(
true);
1025 BufferSize->setValue(bufsize/1000);
1026 SplitLevel->setValue(splitlevel);
1027 CompLevel->setValue(compression);
1028 TreeAutosave->setValue(autosave);
1029 CompLevel->setEnabled(
true);
1030 FileNameOutput->setEnabled(
true);
1036 StoreNameEdit->setEnabled(
false);
1038 OutputCombo->setCurrentIndex(1);
1039 BufferSize->setEnabled(
true);
1040 SplitLevel->setEnabled(
true);
1041 BufferSize->setValue(bufsize/1000);
1042 SplitLevel->setValue(splitlevel);
1043 StoreOverwriteMode->setEnabled(
false);
1044 CompLevel->setEnabled(
false);
1045 FileNameOutput->setEnabled(
false);
1051 StoreNameEdit->setEnabled(
true);
1052 StoreNameEdit->setText(name);
1053 OutputCombo->setCurrentIndex(2);
1055 BufferSize->setEnabled(
false);
1056 SplitLevel->setEnabled(
false);
1057 StoreOverwriteMode->setEnabled(
false);
1058 CompLevel->setEnabled(
false);
1059 FileNameOutput->setEnabled(
true);
1067 StoreNameEdit->setEnabled(
false);
1068 StoreNameEdit->setText(name);
1069 OutputCombo->setCurrentIndex(3);
1070 StoreOverwriteMode->setEnabled(
true);
1078 FileNameOutput->setEnabled(
true);
1086 QString name =
"BackStoreTree_";
1093 int typ = OutputCombo->currentIndex();
1095 else name = StoreNameEdit->text();
1101 overwrite = StoreOverwriteMode->isChecked();
1102 bufsize = BufferSize->value() * 1000;
1103 splitlevel = SplitLevel->value();
1104 compression = CompLevel->value();
1105 autosaveperiod = TreeAutosave->value();
1110 bufsize = BufferSize->value() * 1000;
1111 splitlevel = SplitLevel->value();
1124 fxPanel->DisplayMbsMonitor(SourceNameEdit->text());
1130 ExtraBtn->setText(
fExtra ?
"-" :
"+");
const char * TGo4MbsFile__fgcLMDSUF
const char * TGo4MbsFile__fgcFILELISTSUF
const char * TGo4MbsFile__fgcNOTAGFILE
Status object of one analysis step.
Int_t GetSplitlevel() const
void SetSplitlevel(Int_t split)
void SetBufsize(Int_t bufsize)
virtual void OutputFileDialog()
virtual void OutputStateChanged(int)
virtual void SetMbsTransportSource()
virtual void ChangeStopEvent(int num)
virtual void GetBackStore(int &bufsize, int &splitlevel)
virtual void SetMbsFileSource(const QString &TagFile)
virtual void ExtraBtn_clicked()
virtual void StoreComboHighlighted(int k)
virtual void InputArguments(const QString &Arg)
virtual void SetFileSource()
virtual void InputPortChanged(int)
virtual void ChangeEventInterval(int num)
virtual void SetMbsSourceWidgets(int start, int stop, int interval, int port=0)
virtual void GetUserSource(int &port, QString &expr)
TGo4AnalysisStepStatus * fStepStatus
virtual void GetHDF5Store(int &flags)
virtual void SetMbsRetryCnt(int retry)
virtual void StepStateChanged(int)
virtual void GetStepControl(bool &process, bool &source, bool &store)
virtual void SetHDF5Source(QString name)
virtual void SetMbsPort(int port)
virtual void SetMbsRevServSource(int port)
virtual void StoreBufferSize(int t)
virtual void OutputNameText(const QString &Name)
virtual void SetUserStore(QString name)
virtual void StoreOverWrite(bool overwrite)
virtual QString GetBackStoreName()
virtual void SetSourceWidgets(const QString &name, int timeout)
void ChangeSourceParameter(int kind)
TGo4AnalysisConfiguration * fxPanel
virtual void InputTagfile(const QString &tag)
virtual void SetHDF5Store(QString name, int flags)
virtual ~TGo4ConfigStep()
virtual void RetryCntChanged(int)
virtual void InputFileDialog()
virtual void SetBackStore(QString name, int bufsize, int splitlevel)
TGo4EventSourceParameter * fPars[ParsSize]
virtual void StoreTreeAutoSave(int t)
virtual void StoreSplitLevel(int t)
virtual void SetUserSource(int port, QString expr)
virtual void SetRandomSource()
virtual void ChangeSourceTimeout(int tim)
virtual void SourceComboHighlighted(int kind)
virtual void GetMbsFileSource(QString &TagFile)
virtual void SetStepStatus(TGo4AnalysisConfiguration *panel, TGo4AnalysisStepStatus *StepStatus, int number=-1)
virtual void StoreCompLevel(int t)
virtual void GetFileStore(bool &overwrite, int &bufsize, int &splitlevel, int &compression, int &autosaveinterval)
virtual int GetSourceSetup(QString &name, int &timeout, int &start, int &stop, int &interval, int &port, int &nretry)
virtual void ChangeStartEvent(int num)
virtual void InputSourceText(const QString &Name)
virtual int GetStoreSetup(QString &name)
virtual void SetStepControl(bool process, bool source, bool store)
virtual void InputStateChanged(int)
virtual void SetMbsEventServerSource()
virtual QString GetStepName()
virtual void SetFileStore(QString name, bool overwrite, int bufsize, int splitlevel, int compression, int autosave=0)
TGo4ConfigStep(QWidget *parent=nullptr, const char *name=nullptr, Qt::WindowFlags fl=Qt::Widget)
virtual void SetMbsStreamSource()
virtual void MbsMonitorBtn_clicked()
virtual QString GetTabTitle()
Basic type for all classes containing information to parameterize the event source.
void SetTimeout(Int_t out)
Basic type for all classes containing information to parametrize the event store.
void SetSplitlevel(Int_t split)
Int_t IsOverwriteMode() const
void SetCompression(Int_t comp)
void SetOverwriteMode(Bool_t over=kTRUE)
void SetBufsize(Int_t bufsize)
Int_t GetCompression() const
void SetAutosaveSize(Int_t interval)
Int_t GetSplitlevel() const
Int_t GetAutosaveSize() const
void SetHDF5Flags(Go4_H5_File_Flags flags)
Go4_H5_File_Flags GetHDF5Flags() const
MBS event server parameter.
const char * GetTagName() const
Name of the Tagfile.
void SetTagName(const char *name)
Name of the Tagfile.
void SetStartEvent(UInt_t firstindex)
Define the Start index for the NextEvent.
void SetPort(Int_t port)
Set optional port number, 0 or negative value means that default port number will be used.
Int_t GetPort() const
Return optional port number, 0 or negative value means that default port number will be used.
UInt_t GetEventInterval() const
Returns event interval.
UInt_t GetStopEvent() const
Returns the index of Stop event.
Int_t GetRetryCnt() const
Return allowed number of reconnection retries.
void SetStopEvent(UInt_t lastindex)
Define the index of Stop event.
void SetRetryCnt(Int_t cnt)
Set number of allowed reconnection retries.
UInt_t GetStartEvent() const
Returns the Start index for the NextEvent.
void SetEventInterval(UInt_t skipinterval)
Defines event interval.
const char * GetExpression() const
User expression as string.
void SetExpression(const char *name)