Commit 719e4937 authored by nkx Nicholas's avatar nkx Nicholas
Browse files

TRestBrowser class documentation updated

parent 275eae75
#ifndef RestCore_TRestBrowser
#define RestCore_TRestBrowser
#include <iostream>
#include "TApplication.h"
#include "TBrowser.h"
#include "TCanvas.h"
......@@ -13,12 +15,9 @@
#include "TGTextEntry.h"
#include "TObject.h"
#include "TROOT.h"
#include "TSystem.h"
#include "TRestEventViewer.h"
#include "TRestRun.h"
#include <iostream>
#include "TSystem.h"
/// Event browser for different input file
class TRestBrowser {
......@@ -37,7 +36,7 @@ class TRestBrowser {
TGNumberEntry* fEventSubIdNumberBox = 0; //! For sub Event number.
TGLabel* fPlotOptionLabel = 0; //!
TGTextEntry* fPlotOptionTextBox = 0; //!
TGTextEntry* fPlotOptionTextBox = 0; //! TextBox for plot options
TGTextButton* fButOptPrev = 0; //! Previous plot option
TGTextButton* fButOptRefresh = 0; //! Refresh plot
TGTextButton* fButOptNext = 0; //! Next plot option
......@@ -61,30 +60,24 @@ class TRestBrowser {
TRestEventViewer* fEventViewer = 0; //!
void SetButtons();
Bool_t LoadEventId(Int_t id, Int_t subid = -1);
Bool_t LoadEventEntry(Int_t n);
#endif
public:
// Constructors
TRestBrowser();
TRestBrowser(TString viewerName);
// Destructor
~TRestBrowser();
// tool method
void Initialize(TString opt = "FI");
void InitFromConfigFile();
Bool_t OpenFile(TString filename);
// setters
void SetViewer(TRestEventViewer* eV);
void SetViewer(TString viewerName);
void SetInputEvent(TRestEvent*);
void SetWindowName(TString wName) { frmMain->SetWindowName(wName.Data()); }
void setWindowName(TString wName) { frmMain->SetWindowName(wName.Data()); }
void setButtons();
// getters
TRestEventViewer* GetViewer() { return fEventViewer; }
// actions
......@@ -98,6 +91,11 @@ class TRestBrowser {
void PreviousPlotOptionAction();
void PlotAction();
// Constructors
TRestBrowser();
TRestBrowser(TString viewerName);
// Destructor
~TRestBrowser();
};
#endif
//////////////////////////////////////////////////////////////////////////
///
///
/// This class is inherted from TRestRun. It opens input file as TRestRun
/// defined, and shows a plot of the event contained in the file. The plot
/// is shown in a TBrowser embeded window, providing a customizable controller
/// on the side.
/// This class opens input file with TRestRun and shows the plot of each event
/// The plot is shown through TRestEventViewer interface on the right. On the left
/// there is a control bar to switch the events. Plot options can also be given.
///
/// \class TRestBrowser
///
......@@ -63,7 +62,7 @@ void TRestBrowser::Initialize(TString opt) {
frmMain = new TGMainFrame(gClient->GetRoot(), 300);
frmMain->SetCleanup(kDeepCleanup);
frmMain->SetWindowName("Controller");
setButtons();
SetButtons();
b->StopEmbedding();
b->StartEmbedding(1, -1);
......@@ -101,7 +100,7 @@ void TRestBrowser::SetViewer(TString viewerName) {
}
}
void TRestBrowser::setButtons() {
void TRestBrowser::SetButtons() {
TString icondir = (TString)getenv("ROOTSYS") + "/icons/";
auto fVFrame = new TGVerticalFrame(frmMain);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment