#include "TGFrame.h"
#endif
-// #include <TGButton.h>
-// #include <TGListBox.h>
-// #include <TGComboBox.h>
-// #include <TGNumberEntry.h>
-// #include <TRootEmbeddedCanvas.h>
-// #include <TGSplitter.h>
-// #include <TGButtonGroup.h>
-// #include <TGLabel.h>
-// #include <TGTab.h>
+#include <TGComboBox.h>
#include <TString.h>
#include <TVectorT.h>
class TGRadioButton;
class TGGroupFrame;
class TGLabel;
-class TGComboBox;
class TGTabElement;
+class TGTextEntry;
class TFile;
class TTree;
class TChain;
class TGraph;
+class TObjArray;
+
+class TMap;
class AliTPCCalibViewerGUI;
class AliTPCConfigParser;
AliTPCCalibViewerGUItime(const TGWindow *p, UInt_t w, UInt_t h);
virtual ~AliTPCCalibViewerGUItime();
- static TObjArray* ShowGUI(const char* fileName = 0); // initialize and show GUI standalone
-
+ static TObjArray* ShowGUI(const char* fileName = 0, const char* treeName="dcs"); // initialize and show GUI standalone
+ static TObjArray* ShowGUI(TChain* chain); // initialize and show GUI standalone
+
void DrawGUI(const TGWindow */*p*/, UInt_t w, UInt_t h);
- void UseFile(const char* fileName);
+ void UseFile(const char* fileName, const char* treeName);
+ void UseChain(TChain *const chain);
+ void UseConfigFile(const char* file="");
void Reload(Int_t first=1);
+ void AddReferenceTree(const char* treeFileName, const char* refName="R");
- void SetCalibViewerGUI(AliTPCCalibViewerGUI *gui) {fCalibViewerGUI=gui;}
- void SetCalibViewerGUItab(TGTabElement *tab) {fCalibViewerGUItab=tab;}
- void SetConfigFile(const char* file) {fConfigFile=file;}
+ void SetCalibViewerGUI(AliTPCCalibViewerGUI *const gui) {fCalibViewerGUI=gui;}
+ void SetCalibViewerGUItab(TGTabElement *const tab) {fCalibViewerGUItab=tab;}
void SetCacheDir(const char* cachedir) {fOutputCacheDir=cachedir;}
+ void SetConfigFileName(const char* file) {fConfigFile=file;}
- const char* GetDrawString();
- const char* GetCutString();
+ const TString GetDrawString();
+ const TString GetDrawOptionString();
+ const char* GetCustomDrawString() const {return fComboCustomDraw->GetTextEntry()?fComboCustomDraw->GetTextEntry()->GetText():"";}
+ void GetCutString(TString &cutStr);
+ TChain* GetChain() const {return fTree;}
+ //
+ TGTextEntry* GetDrawEntry() {return fComboCustomDraw->GetTextEntry();}
+ TGTextEntry* GetCutsEntry() {return fComboCustomCuts->GetTextEntry();}
+ TGTextEntry* GetDrawOptEntry() {return fComboAddDrawOpt->GetTextEntry();}
//Slots
void DoDraw();
void DoDumpRuns();
void DoChangeSelectionList() {Reload(0);}
void HandleButtonsDrawSel(Int_t id = -1);
void MouseMove(Int_t event, Int_t x, Int_t y, TObject */*selected*/);
-
-// private:
+ void DoNewSelectionAliases();
+ void DoAddAlias();
+ void DoDelAlias();
+ void UpdateAliasList();
+ TCanvas * GetCanvas(){ return fCanvMain->GetCanvas();}
+ private:
TFile* fFile; //file that keeps the tree
- TChain* fTree; //internal tree
+ TChain* fTree; //internal tree
AliTPCCalibViewerGUI *fCalibViewerGUI; //calib viewer gui used to display verbose information for one run
TGTabElement *fCalibViewerGUItab; //tab the calib view gui redies in
TH1* fCurrentHist; //histogram currently drawn in main canvas
TVectorD fTimeStamps; //timr stamps of current selection
TVectorD fValuesX; //values of current selection
TVectorD fValuesY; //values of current selection
-
+ //
+ Bool_t fNoGraph; //Whether to create a graph
+ Long64_t fGraphLimitEntries; //limit in number of entries in the chain for producing a graph
+ //
+ TMap *fMapRefTrees; //map of reference trees for the CalibViewer
//GUI elements
//main canvas Top part, bottom part
TGCompositeFrame *fContTopBottom; // container for all GUI elements, vertical divided
TGCompositeFrame *fContLCR; // container for all GUI elements, horizontal divided
//content left
TGCompositeFrame *fContLeft; // container for GUI elements on left side
+ TGGroupFrame *fContDrawOpt; // Subgroup for draw selection
+ TGCheckButton *fChkDrawOptSame; // draw option 'same'
+ TGCheckButton *fChkDrawOptSparse; // draw option 'sparse'
+ TGComboBox *fComboAddDrawOpt; // additional draw options combo box
TGGroupFrame *fContDrawSel; // Subgroup for draw selection
TGCompositeFrame *fContDrawSelSubRunTime; //Radio button subframe
TGRadioButton *fRadioXhist; // Radio button x-variable: show only 1D distribution
TGLabel *fLblValueXVal; // value of the data point hoovered
TGLabel *fLblValueYVal; // value of the data point hoovered
TGTextButton *fBtnDumpRuns; // draw button
+ TGGroupFrame *fContAliases; // container to keep data point information
+ TGListBox *fListAliases; // list of aliases
//content bottom
TGCompositeFrame *fContCustom; // container for custom draw command GUI elements
TGCompositeFrame *fContCustomCuts; // container for custom cut options GUI elements
TGLabel *fLblCustomCuts; // label for custom cuts string
TGComboBox *fComboCustomDraw; // combo box custom draw string
TGComboBox *fComboCustomCuts; // combo box custom cuts string
+ //
+ TObjArray *fTrashBox; //graphics objects to be deleted (histograms, graphs,...)
enum { kRadioXhist=10, kRadioXrun=11, kRadioXtime=12 };
enum { kBranchOnOff=0, kBranchTitle=1, kCalibType=2, kParamNames=3 };
void FillRunTypes();
void FillCalibTypes();
void SetInitialValues();
- const char* SubstituteUnderscores(const char* in);
-
+ void CheckDrawGraph();
+ Bool_t CheckChain();
+ void UpdateValueArrays(Bool_t withGraph, const Double_t *xArr);
+ void SubstituteUnderscores(TString &s);
+ void GetHistogramTitle(TString &title);
+ void AdjustYRange();
+private:
AliTPCCalibViewerGUItime(const AliTPCCalibViewerGUItime &v);
AliTPCCalibViewerGUItime &operator = (const AliTPCCalibViewerGUItime &v); // assignment operator
};
+////////////////////////////////////////////////////////////////////////
+//
+// GUI Alias frame
+//
+////////////////////////////////////////////////////////////////////////
+
+class AliTPCCalibViewerGUItimeAddAliasFrame : public TObject {
+public:
+ AliTPCCalibViewerGUItimeAddAliasFrame(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h,
+ UInt_t options, AliTPCCalibViewerGUItime *gui, TString strAlias="");
+ virtual ~AliTPCCalibViewerGUItimeAddAliasFrame();
+
+ // slots
+ void DoOK();
+ void DoCancel();
+
+
+private:
+ TGTransientFrame *fMain; //Main frame
+ TGTextEntry *fTxt1, *fTxt2; //text input
+
+ AliTPCCalibViewerGUItime *fGUI; //pointer to mother process
+
+ AliTPCCalibViewerGUItimeAddAliasFrame(const AliTPCCalibViewerGUItimeAddAliasFrame &r);
+ AliTPCCalibViewerGUItimeAddAliasFrame &operator = (const AliTPCCalibViewerGUItimeAddAliasFrame &r);
+
+ ClassDef(AliTPCCalibViewerGUItimeAddAliasFrame,0)
+};
+
#endif