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
484 void SaveAs(
const char* filename =
"",
Option_t* option =
"")
const;
R__EXTERN KVTreeAnalyzer * gTreeAnalyzer
................ global variable
Wrapper for histograms and graphical cuts used by KVTreeAnalyzer.
Enhanced version of ROOT TGListView widget.
Extended TList class which owns its objects by default.
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)
Int_t fSelectionNumber
used for automatic naming of selections
Bool_t IsPROOFEnabledForSelections() const
Bool_t fNoGui
=kTRUE if no graphical interface is required
static KVTreeAnalyzer * OpenFile(const Char_t *filename, Bool_t nogui=kFALSE)
TList * GetHistosByData(const Char_t *expr)
KVHistogram * GetHistoByTitle(const Char_t *title)
TChain * fChain
the analyzed TTree or TChain
bool DefineUserBinningD()
Bool_t fNormHisto
=kTRUE: generate normalised histograms (normalise to integral of histo)
TGCheckButton * G_histo_norm
void SaveAs(const char *filename="", Option_t *option="") const
Bool_t IsPROOFEnabled() const
void MakeAbsoluteIPScale(const char *name, Double_t sigmaTot)
void SetTreeFileName(TTree *t)
void SetNewCanvas(Bool_t yes=kTRUE)
Int_t fHistoNumber
used for automatic naming of histograms
void SetTree(TTree *t)
Connects a TChain for analysis.
TGGroupFrame * fMain_leaflist
GUI for access to TTree leaves and aliases.
void DeleteSelections()
Delete the currently selected selection(s)
void ReconnectTree()
Backwards compatibility: to read old analysis files.
const TGMainFrame * GetMainWindow() const
void OpenAnyFile(const Char_t *filepath)
KVListView * G_histolist
GUI list of histograms.
void HistoFileMenu_Save()
Bool_t MakeSelection(const Char_t *selection)
void ReapplyAnyFile(const Char_t *filepath)
void SetAnalysisModifiedSinceLastSave(Bool_t)
TString fAutoSaveDir
directory for autosaving histos
Bool_t fStatsHisto
=kTRUE: display histo stats box
TGCheckButton * G_histo_app_sel
const Char_t * get_leaf_type_name(const TNamed *l)
Bool_t fApplySelection
=kTRUE: apply current selection to existing histogram
TString fTreeName
name of analyzed TTree
Bool_t fDrawSame
=kTRUE: draw histograms in same plot
void SetUpHistoAutoSave()
void GenerateAllAliases(TCollection *list)
Generate all user aliases in list which are not already defined.
Int_t fAliasNumber
used for automatic naming of TTree aliases
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)
Bool_t fDeletedByGUIClose
void SetDrawLog(Bool_t yes=kTRUE)
static KVList * fgAnalyzerList
static list of all analyzers in memory
void HistoFileMenu_Apply()
TString fTreeFileName
name of file containing analyzed TTree
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)
TGTextEntry * G_alias_text
TGPopupMenu * fSelCombMenu
TGTextButton * G_make_ip_scale
void SetDrawSame(Bool_t yes=kTRUE)
Bool_t fNewCanvas
=kTRUE: draw each histogram in a new canvas
void init()
Default initialization.
TString fRelativePathToAnalysisFile
TGCheckButton * G_histo_log
static KVTreeAnalyzer * GetAnalyzer(const Char_t *title)
TGComboBox * G_histo_draw_option
KVUniqueNameList fSelections
list of TEntryList user selections
const KVList * GetHistoList() const
void GenerateAllHistograms(TCollection *)
Bool_t fNormHistoEvents
=kTRUE: generate normalised histograms (normalise to number of events)
void SetSelection(TObject *)
void CurrentSelection()
Print the currently active selection (TEntryList set on TTree).
KVList fLeafList
clones of leaves in TChain
TGCheckButton * G_histo_weight
void UpdateEntryLists()
regenerate entry lists for all selections
TGCheckButton * G_histo_prof
ClassDef(KVTreeAnalyzer, 5) void OpenSingleFile(TFile *file)
void SetEntryList(TEntryList *)
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)
TGPictureButton * G_histo_add
void SetRelativePathToAnalysisFile(const Char_t *p)
TGPictureButton * G_histo_del
void CombineSelectionsAnd()
TGCheckButton * G_histo_stats
KVTreeAnalyzer(Bool_t nogui=kTRUE)
TGCheckButton * G_histo_new_can
void HandleHistoFileMenu(Int_t)
void SetNormHisto(Bool_t yes=kTRUE)
TGCheckButton * G_histo_bin
void HandleOptionsMenu(Int_t opt)
TGGroupFrame * fMain_selectionlist
GUI for handling selections.
void GetHistosFromFile(TFile *file, const KVUnownedList &keys)
TString fSaveAnalysisFileName
TGPopupMenu * fMenuSelections
void CombineSelectionsOr()
TGPictureButton * G_leaf_draw
Bool_t fAutoSaveHisto
=kTRUE: on draw, generate image file of current displayed histo
bool DefineUserBinning1F()
void HandleSelectionsMenu(Int_t)
void SetDrawOption(Option_t *option="")
void DrawHistogram(TH1 *histo, Bool_t same=false, Bool_t logscale=false)
void SetNormHistoEvents(Bool_t yes=kTRUE)
void EnablePROOF(Bool_t yes=kTRUE)
KVList fHistolist
list of generated histograms
TList * GetHistosBySelection(const Char_t *expr)
TGTextEntry * G_make_ip_selection
void OpenAnyFriendFile(const Char_t *filepath)
TTree * fTree
for backwards compatibility
TGCheckButton * G_histo_norm_events
TChain * GetChain() const
void GenerateAllSelections(TCollection *)
For applying existing analysis to new data.
TGPopupMenu * fSelGenerate
TString fAutoSaveType
filetype for autosaving histos
TH1 * GetHistogram(const Char_t *name) const
Return histogram with given name.
TGPopupMenu * fOptionMenu
Long64_t GetEntriesInCurrentSelection() const
KVListView * G_selectionlist
GUI list of TEntryList selections.
static KVList * GetListOfAnalyzers()
Bool_t GetOrderedDalitz()
TGStatusBar * G_selection_status
status bar in selections GUI
void AddSelection(TEntryList *)
TGLayoutHints * fMenuBarItemLayout
TGCheckButton * G_histo_same
TH1 * MakeIntHisto(const Char_t *expr, const Char_t *selection, Int_t Xmin, Int_t Xmax, const Char_t *weight="")
virtual ~KVTreeAnalyzer()
Destructor.
void OpenChain()
Open a file or files containing TTrees to analyse.
void SelectionChanged()
Method called whenever the selected selection in the GUI list changes.
TGMainFrame * fMain_histolist
GUI for handling histograms.
TH1 * GetHisto(const Char_t *expr, const Char_t *selection, const Char_t *weight="")
Bool_t fAnalysisModifiedSinceLastSave
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 GenerateHistoTitle(TString &title, const Char_t *exp, const Char_t *sel, const Char_t *weight="")
void ReadFromFile(const Char_t *filename)
open a previously saved analysis session.
Bool_t fDrawLog
=kTRUE: draw histograms with log-Y (1-D) or log-Z (2-D) scale
void HistoFileMenu_Open()
Open a previous analysis session.
void DrawLeaf(TObject *)
Method called when user double-clicks a leaf/alias in list.
void SetApplySelection(Bool_t yes=kTRUE)
KVList fAliasList
list of TTree aliases
TList * fSelectedSelections
void Copy(TObject &obj) const
void DrawHisto(TObject *o, Bool_t gen=kTRUE)
TGCheckButton * G_histo_autosave
TGTextEntry * G_selection_text
KVListView * G_leaflist
GUI list of TTree leaves and aliases.
Bool_t fMethodCalled
allows to know if context menu methods are called
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.
virtual void ls(Option_t *option="") const
virtual const char * GetValue(const char *name, const char *dflt) const
virtual TObjArray * GetListOfLeaves()