71 if (!cl)
return false;
73 return cl->InheritsFrom(TGo4DynamicEntry::Class()) ||
74 cl->InheritsFrom(TH1::Class()) ||
75 cl->InheritsFrom(TTree::Class()) ||
76 cl->InheritsFrom(TGo4Condition::Class());
83 if (cl->InheritsFrom(TGo4DynamicEntry::Class()))
85 else if (cl->InheritsFrom(TH1::Class()))
87 else if (cl->InheritsFrom(TGo4Condition::Class()))
89 else if (cl->InheritsFrom(TTree::Class()))
95 if (strcmp(linkname,
"Entry") == 0)
107 if (!entry || !br)
return;
113 EntryBox->setTitle(QString(
"Entry: ") + entry->ClassName());
114 EntryEnabledButton->setChecked(entry->IsEnabledProcessing());
116 EntryBox->setEnabled(
true);
117 HistogramBox->setEnabled(
true);
118 EntryTabs->setEnabled(
true);
128 EntryTabs->setTabEnabled(EntryTabs->indexOf(EventTab),
true);
129 EntryTabs->setTabEnabled(EntryTabs->indexOf(ConditionTab),
true);
130 EntryTabs->setTabEnabled(EntryTabs->indexOf(TreeTab),
false);
131 EntryTabs->setCurrentIndex(EntryTabs->indexOf(EventTab));
137 HistoNameLbl->setText(hitemname.Data());
138 DrawButton->setVisible(hitemname.Length()>0);
139 ClearButton->setVisible(hitemname.Length()>0);
142 if (fname.length()>0) fname +=
"/";
144 EvXnameEdit->setText(fname);
147 if (fname.length()>0) fname +=
"/";
149 EvYnameEdit->setText(fname);
152 if (fname.length()>0) fname +=
"/";
154 EvZnameEdit->setText(fname);
160 CondNameLbl->setText(citemname.Data());
163 if (fname.length()>0) fname +=
"/";
165 ConXnameEdit->setText(fname);
168 if (fname.length()>0) fname +=
"/";
170 ConYnameEdit->setText(fname);
176 EntryTabs->setTabEnabled(EntryTabs->indexOf(EventTab),
false);
177 EntryTabs->setTabEnabled(EntryTabs->indexOf(ConditionTab),
false);
178 EntryTabs->setTabEnabled(EntryTabs->indexOf(TreeTab),
true);
179 EntryTabs->setCurrentIndex(EntryTabs->indexOf(TreeTab));
185 HistoNameLbl->setText(hitemname.Data());
186 DrawButton->setVisible(hitemname.Length()>0);
187 ClearButton->setVisible(hitemname.Length()>0);
193 TreeNameLbl->setText(titemname.Data());
195 DrawExprEdit->setText(tentry->
GetVarExp());
196 CutExprEdit->setText(tentry->
GetCutExp());
205 TString folder, name;
211 return QString(folder.Data());
216 TString folder, name;
218 return QString(name.Data());
227 if (entry && oldname && PleaseUpdateLabel->isVisible()) {
229 QMessageBox msgBox(QMessageBox::Question,
"Dynamic list entry editor",
230 QString(
"Current entry %1 is modified!\nNew entry %2 is selected.").arg(oldname).arg(itemname));
232 auto btnContinue = msgBox.addButton(
"Continue with current", QMessageBox::ActionRole);
233 msgBox.addButton(
"Start with new", QMessageBox::ActionRole);
234 msgBox.setDefaultButton(btnContinue);
237 if (msgBox.clickedButton() == btnContinue)
245 EntryNameLbl->setText(itemname);
247 QString iconname =
":/icons/right.png";
248 QString tooltip =
"Refresh dynamic entry from analysis";
250 iconname =
":/icons/refresh.png";
251 tooltip =
"Refresh dynamic entry from source";
253 RefreshButton->setIcon( QIcon(iconname) );
254 RefreshButton->setToolTip(tooltip);
260 parentWidget()->adjustSize();
261 parentWidget()->setFocus();
266 if (!itemname)
return;
270 HistoNameLbl->setText(itemname);
271 DrawButton->setVisible(
true);
272 ClearButton->setVisible(
true);
289 CondNameLbl->setText(itemname);
291 EntryTabs->setCurrentIndex(EntryTabs->indexOf(ConditionTab));
294 hentry->SetConditionName(itemname);
303 TreeNameLbl->setText(itemname);
307 tentry->SetTreeName(itemname);
316 EntryNameLbl->setText(
"");
317 EntryBox->setTitle(QString(
"Entry: "));
319 EntryBox->setEnabled(
false);
320 HistogramBox->setEnabled(
false);
321 EntryTabs->setEnabled(
false);
323 DrawButton->setVisible(
false);
325 RefreshButton->setIcon( QIcon(
":/icons/right.png" ) );
348 PleaseUpdateLabel->setVisible(on);
356 if(!PleaseUpdateLabel->isVisible())
405 if (!edt || !
Browser())
return;
407 QString value = edt->text();
417 QString serachfor(
"EventObjects/Events/");
418 int pos = value.indexOf(serachfor);
424 value.remove(0, pos+serachfor.length());
431 if (!edt || !
Browser())
return;
433 QString value = edt->text();
439 int kind = br->
ItemKind(value.toLatin1().constData());
449 TString lfolder, lname;
451 edt->setText(lname.Data());
479 if (cl->InheritsFrom(TH1::Class()))
482 if (cl->InheritsFrom(TGo4Condition::Class()))
490 if (!entry)
return false;
496 TString folder, name;
508 TString folder, name;
526 entry->EnableProcessing(on);
535 hentry->SetHisEventName(0,
GetEventName(xname).toLatin1().constData());
536 hentry->SetHisVarName(0,
GetEventMember(xname).toLatin1().constData());
545 hentry->SetHisEventName(1,
GetEventName(yname).toLatin1().constData());
546 hentry->SetHisVarName(1,
GetEventMember(yname).toLatin1().constData());
555 hentry->SetHisEventName(2,
GetEventName(zname).toLatin1().constData());
556 hentry->SetHisVarName(2,
GetEventMember(zname).toLatin1().constData());
565 hentry->SetConEventName(0,
GetEventName(xname).toLatin1().constData());
566 hentry->SetConVarName(0,
GetEventMember(xname).toLatin1().constData());
575 hentry->SetConEventName(1,
GetEventName(yname).toLatin1().constData());
576 hentry->SetConVarName(1,
GetEventMember(yname).toLatin1().constData());
584 tentry->SetVarExp(value.toLatin1().constData());
591 tentry->SetCutExp(value.toLatin1().constData());
598 tentry->SetDynListInterval(value);
Bool_t DefineTreeName(const char *itemname, TString &treename)
TGo4ServerProxy * DefineAnalysisObject(const char *itemname, TString &analysisname)
TObject * GetBrowserObject(const char *name, Int_t update=0)
Int_t ItemKind(const char *name)
Bool_t DefineRelatedObject(const char *itemname, const char *objectname, TString &objectitem, Int_t mask=3)
virtual void CutExprEdit_dropped()
bool IsAcceptDrag(const char *itemname, TClass *cl, int kind) override
virtual void DrawExprEdit_textChanged(const QString &value)
virtual void ConNewButton_clicked()
virtual QString GetEventMember(const QString &itemname)
virtual void DrawButton_clicked()
virtual void ConYnameEdit_dropped()
virtual void DropCondition(const char *itemname)
virtual void ApplyClicked()
virtual void RefreshClicked()
void DropItem(const char *itemname, TClass *cl, int kind) override
virtual void ConYnameEdit_textChanged(const QString &yname)
virtual void EvYnameEdit_dropped()
virtual void ClearHistogramClicked()
virtual void EvZnameEdit_dropped()
virtual void HisInfoButton_clicked()
void requestedObjectCreated(const char *itemname, TClass *cl) override
virtual void ProcessDropEvent(QGo4LineEdit *edt)
virtual void HisCreateButton_clicked()
void linkedObjectUpdated(const char *linkname, TObject *obj) override
virtual void EvYnameEdit_textChanged(const QString &yname)
virtual void EvZnameEdit_textChanged(const QString &zname)
TGo4EditDynEntry(QWidget *parent=nullptr, const char *name=nullptr)
virtual void RefreshWidget()
virtual void EntryEnabledButton_toggled(bool on)
virtual void EvXnameEdit_textChanged(const QString &xname)
virtual void CutExprEdit_textChanged(const QString &value)
virtual void ConXnameEdit_dropped()
virtual void DropTree(const char *itemname)
virtual void DynIntervalSpin_valueChanged(int value)
virtual void DrawExprEdit_dropped()
void ResetWidget() override
virtual void EntryChangedSlot()
virtual void DropHistogram(const char *itemname)
virtual void ProcessTreeDropEvent(QGo4LineEdit *edt)
virtual void EvXnameEdit_dropped()
virtual void SaveEntrySlot()
virtual void PrintDynList()
virtual void WorkWithEntry(const char *itemname)
virtual void SetPleaseUpdate(bool on)
virtual void ConXnameEdit_textChanged(const QString &xname)
virtual void ConRemoveButton_clicked()
virtual void ConInfoButton_clicked()
virtual bool PrepareEntryForAnalysis()
virtual QString GetEventName(const QString &itemname)
Entry for the dynamic list, specialized for histogram like objects.
const char * GetConVarName(Int_t ix) const
void SetHistogramName(const char *name)
Set name of the external histogram to be filled.
const char * GetHistogramName() const
Get name of the external histogram to be filled.
const char * GetHistEventName(Int_t ix) const
void SetConditionName(const char *name)
Set name of the external condition to be referenced.
const char * GetConEventName(Int_t ix) const
const char * GetConditionName() const
const char * GetHistVarName(Int_t ix) const
special base class for remote data servers like DABC, HTTP, hist server
virtual void PrintDynListEntry(const char *fullpath)
virtual void ExecuteLine(const char *line)
virtual void ClearAnalysisObject(const char *fullpath)
static void ProduceFolderAndName(const char *fullname, TString &foldername, TString &objectname)
Dynamic list entry which links a histogram to a certain tree.
Int_t GetDynListInterval() const
const char * GetTreeName() const
const char * GetHistogramName() const
Get name of the external histogram to be filled.
const char * GetVarExp() const
void SetTreeName(const char *name)
const char * GetCutExp() const
void SetHistogramName(const char *name)
Set name of the external histogram to be filled.