4 #ifndef __KVTreeAnalyzer_H
5 #define __KVTreeAnalyzer_H
6 #ifndef ROOT_TGDockableFrame
12 #ifndef ROOT_TGMdiDecorFrame
18 #ifndef ROOT_TGMdiFrame
21 #ifndef ROOT_TGMdiMainFrame
24 #ifndef ROOT_TGMdiMenu
27 #ifndef ROOT_TGListBox
30 #ifndef ROOT_TGNumberEntry
33 #ifndef ROOT_TGScrollBar
36 #ifndef ROOT_TGComboBox
39 #ifndef ROOT_TRootBrowser
45 #ifndef ROOT_TGFileDialog
48 #ifndef ROOT_TGShutter
51 #ifndef ROOT_TGButtonGroup
54 #ifndef ROOT_TGCommandPlugin
60 #ifndef ROOT_TGFSContainer
63 #ifndef ROOT_TGColorSelect
66 #ifndef ROOT_TGTextEdit
72 #ifndef ROOT_TGFSComboBox
81 #ifndef ROOT_TGFileBrowser
87 #ifndef ROOT_TGListView
90 #ifndef ROOT_TGSplitter
93 #ifndef ROOT_TGTextEditor
96 #ifndef ROOT_TRootCanvas
99 #ifndef ROOT_TGStatusBar
102 #ifndef ROOT_TGListTree
105 #ifndef ROOT_TGToolTip
108 #ifndef ROOT_TGToolBar
111 #ifndef ROOT_TGHtmlBrowser
117 #include "KVListView.h"
122 #include "KVUniqueNameList.h"
124 #include <KVUnownedList.h>
153 Bool_t fDeletedByGUIClose;
160 Bool_t fAnalysisModifiedSinceLastSave;
183 Double_t fXmin, fXmax, fYmin, fYmax;
190 bool got_histos_or_tree_from_file =
false;
196 return fMain_histolist;
219 void HistoFileMenu_Open();
221 void HistoFileMenu_Save();
238 Int_t fSameColorIndex;
276 Int_t fSelectionNumber;
287 TString fRelativePathToAnalysisFile;
288 void SetRelativePathToAnalysisFile(
const Char_t*
p)
290 fRelativePathToAnalysisFile =
p;
297 void ResetMethodCalled()
303 return !fMethodCalled;
309 void ReconnectTree();
314 void AnalysisSaveCheck();
315 void SetAnalysisModifiedSinceLastSave(
Bool_t);
320 bool DefineUserBinning();
321 bool DefineUserBinning1F();
322 bool DefineUserBinningD();
324 double GetTreeMaximum(
const TString& leafname);
325 double GetTreeMinimum(
const TString& leafname);
403 return fPROOFEnabled;
411 return (
gEnv->
GetValue(
"KVTreeAnalyzer.PROOFSelections", 0) && fPROOFEnabled);
437 fAutoSaveHisto = yes;
447 fNormHistoEvents = (yes ?
kFALSE : fNormHistoEvents);
452 fNormHistoEvents = yes;
453 fNormHisto = (yes ?
kFALSE : fNormHisto);
465 if (G_histo_same->
IsOn()) {
475 if (G_histo_new_can->
IsOn()) {
486 fApplySelection = yes;
495 void SaveAs(
const char* filename =
"",
Option_t* option =
"")
const override;
538 return fOrderedDalitz;
575 return fgAnalyzerList;
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Wrapper for histograms and graphical cuts used by KVTreeAnalyzer.
Enhanced version of ROOT TGListView widget.
Extended TList class which owns its objects by default.
KaliVeda extensions to ROOT collection classes.
virtual TObject * FindObjectByType(const Char_t *) const
virtual TObject * FindObjectByTitle(const Char_t *) const
Will return object with given title (value of TObject::GetTitle() method).
GUI for simple intuitive analysis of data in TTree ,.
void DeleteHisto(const Char_t *expr, const Char_t *selection, const Char_t *weight)
Bool_t IsPROOFEnabledForSelections() const
void SetDrawOption(Option_t *option="") override
static KVTreeAnalyzer * OpenFile(const Char_t *filename, Bool_t nogui=kFALSE)
TList * GetHistosByData(const Char_t *expr)
KVHistogram * GetHistoByTitle(const Char_t *title)
Bool_t IsPROOFEnabled() const
void MakeAbsoluteIPScale(const char *name, Double_t sigmaTot)
void SetTreeFileName(TTree *t)
void SetNewCanvas(Bool_t yes=kTRUE)
void SetTree(TTree *t)
Connects a TChain for analysis.
void DeleteSelections()
Delete the currently selected selection(s)
void OpenAnyFile(const Char_t *filepath)
Bool_t MakeSelection(const Char_t *selection)
void ReapplyAnyFile(const Char_t *filepath)
void SetUpHistoAutoSave()
void GenerateAllAliases(TCollection *list)
Generate all user aliases in list which are not already defined.
void SaveAs(const char *filename="", Option_t *option="") const override
void Copy(TObject &obj) const override
TH1 * RemakeHisto(TH1 *h, const Char_t *expr, const Char_t *weight="")
TH1 * MakeHisto(const Char_t *expr, const Char_t *selection, Int_t nX, Int_t nY=0, const Char_t *weight="", Double_t xmin=-1, Double_t xmax=-1, Double_t ymin=-1, Double_t ymax=-1)
void SetAlias(const Char_t *name, const Char_t *expr)
void SetDrawLog(Bool_t yes=kTRUE)
void HistoFileMenu_Apply()
void DeleteSelectedHisto()
Delete all currently selected histograms.
void GUIClosed()
Called when graphical window is closed.
void GenerateConstantXSecSelections(const char *name, Double_t sigmaTot, Double_t sigmaBin)
TEntryList * GetSelection(const Char_t *)
Look for selection in list of selections.
Bool_t IsCurrentSelection(const Char_t *sel)
void AutoSaveHisto(TH1 *h)
void SetUserWeight(Bool_t uw)
void SetAutoSaveHisto(Bool_t yes=kTRUE)
void SetDrawSame(Bool_t yes=kTRUE)
static KVTreeAnalyzer * GetAnalyzer(const Char_t *title)
const KVList * GetHistoList() const
void GenerateAllHistograms(TCollection *)
void SetSelection(TObject *)
void CurrentSelection()
Print the currently active selection (TEntryList set on TTree).
static KVSeqCollection * GetListOfAnalyzers()
void UpdateEntryLists()
regenerate entry lists for all selections
void HistoAddition(Double_t c1=1, Double_t c2=1)
void OpenGUI()
Launch the GUI (unless fNoGui=kTRUE in which case this does nothing)
void HistoFileMenu_OpenFriend()
void SetProfileHisto(Bool_t yes=kTRUE)
void CombineSelectionsAnd()
KVTreeAnalyzer(Bool_t nogui=kTRUE)
void HandleHistoFileMenu(Int_t)
void SetNormHisto(Bool_t yes=kTRUE)
ClassDefOverride(KVTreeAnalyzer, 5) void OpenSingleFile(TFile *file)
void HandleOptionsMenu(Int_t opt)
void GetHistosFromFile(TFile *file, const KVUnownedList &keys)
void CombineSelectionsOr()
void HandleSelectionsMenu(Int_t)
void DrawHistogram(TH1 *histo, Bool_t same=false, Bool_t logscale=false)
void SetNormHistoEvents(Bool_t yes=kTRUE)
void EnablePROOF(Bool_t yes=kTRUE)
TList * GetHistosBySelection(const Char_t *expr)
void OpenAnyFriendFile(const Char_t *filepath)
TChain * GetChain() const
void GenerateAllSelections(TCollection *)
For applying existing analysis to new data.
TH1 * GetHistogram(const Char_t *name) const
Return histogram with given name.
Long64_t GetEntriesInCurrentSelection() const
Bool_t GetOrderedDalitz()
TH1 * MakeIntHisto(const Char_t *expr, const Char_t *selection, Int_t Xmin, Int_t Xmax, const Char_t *weight="")
virtual ~KVTreeAnalyzer()
Destructor.
void SelectionChanged()
Method called whenever the selected selection in the GUI list changes.
TH1 * GetHisto(const Char_t *expr, const Char_t *selection, const Char_t *weight="")
TNamed * GetAlias(const Char_t *expr)
void HistoSelectionChanged()
Method called when user histo selection changes in GUI histogram list.
void SetUserBinning(Bool_t ub)
void ReadFromFile(const Char_t *filename)
open a previously saved analysis session.
void DrawLeaf(TObject *)
Method called when user double-clicks a leaf/alias in list.
void SetApplySelection(Bool_t yes=kTRUE)
void DrawHisto(TObject *o, Bool_t gen=kTRUE)
void SetStatsHisto(Bool_t yes=kTRUE)
Optimised list in which named objects can only be placed once.
Extended TList class which does not own its objects by default.
void ls(Option_t *option="") const override
virtual const char * GetValue(const char *name, const char *dflt) const
void SetWindowName(const char *name=nullptr) override
virtual TObjArray * GetListOfLeaves()
RVec< PromoteType< T > > exp(const RVec< T > &v)