Roody.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  
00003   Name:         Roody.h
00004   Created by:   Greg King
00005  
00006   Contents:     MIROODAS
00007  
00008   $Log$
00009   Revision 1.6  2006/08/21 20:34:26  olchansk
00010   Improvements from ALPHA:
00011   - can show contents of a TDirectory
00012   - better Zoom and Rebinning controls
00013 
00014   Revision 1.5  2006/05/31 16:40:34  chuma
00015   Copied new TNetFolder.h and .cpp from ROME
00016   Modified reset to use TNetFolder::executeCommand
00017 
00018   Revision 1.4  2006/04/18 19:04:54  chuma
00019   Added "Pause/Restart Refresh" button.  The button string changes to reflect
00020   the current state.
00021 
00022   Revision 1.3  2005/12/21 18:10:56  midas
00023   remove export from template
00024 
00025   Revision 1.2  2005/12/13 19:15:54  chuma
00026   Modified Roody to fix problems with choosing which graphics pad to use.
00027 
00028   Revision 1.1  2005/11/29 19:29:36  chuma
00029   Added directories:  lib/, include/ and /mxml and their files.
00030   Added Makefile.
00031 
00032   Revision 1.49  2005/11/21 20:38:38  chuma
00033   XML fixed.  xml code localized into RoodyXML to allow for future
00034   conversion to ROME xml.
00035 
00036   Revision 1.48  2005/08/22 22:03:12  qinggu
00037   Changes:
00038   - add functions to mark object is "online" (by Konstantin)
00039   - fix crash in NULL fUpdateTimer (wrong initialization order)
00040   - add "restore default.xml file"
00041   - cosmetic gui cleanup
00042 
00043   Revision 1.47  2005/08/22 20:41:26  qinggu
00044   Changes:
00045   - add dialog for entering arbitrary refresh period
00046   - add dialog for entering arbitrary zone settings
00047   - removed fZoneChoice
00048   - save current canvas settings
00049   - restore canvas settings from xml file
00050 
00051   Revision 1.46  2005/07/05 21:27:08  chuma
00052   add capability to set default zone settings in XML file
00053   submitted by Qing Gu
00054 
00055   Revision 1.45  2005/05/04 19:47:02  chuma
00056   1) Memory leak fixed:
00057    when plotting destination set to replace, cloned objects with the canvas
00058    about to be closed were not being deleted.
00059   2) Group restore fixed:
00060    when restoring a saved session, and objects from file subdirectories were
00061    added to a group, they were not being included in that group.  Now the
00062    data file is searched recursively for subdirectories.
00063   3) Group draw fixed:
00064    TH2 and TH3 objects in a group were not being drawn.
00065 
00066   Revision 1.44  2005/03/18 17:31:07  chuma
00067   Changed the group context menu to "Draw group", "Reset group" and
00068   "Delete group".  Reset group means reset any online members of the group.
00069   Multiple selections, i.e., left click while holding down the control key,
00070   now have the same context menu (right click to open) as single selections.
00071   Online folders now have a context menu with "New canvas", "Add to group"
00072   and "Reset" options.
00073 
00074   Revision 1.43  2005/03/11 22:50:40  chuma
00075   Roody can now reset online histograms via context menu or main menu.  This
00076   requires a small change in mana.c  Also, fixed a problem with segmentation
00077   faults when trying to connect to an invalid server port.
00078 
00079   Revision 1.42  2005/02/07 19:44:41  chuma
00080   Modified timer for testing whether online connection is still valid.
00081   If the connection is broken, the timer tests the connection every second
00082   until it has reconnected.  When the connection is finally remade, any
00083   online histograms will again be refreshed as before.
00084 
00085   Revision 1.41  2005/01/31 23:51:32  chuma
00086   A timer has been added to check if the online socket remains valid.  If, say,
00087   the analyzer has been stopped while running Roody, this will be detected
00088   and the connection closed, then, every second, that connection will be
00089   attempted until successful.  Also, the external dtd file, roody.dtd, has
00090   been eliminated in favour of internal dtd verification.  Roody is being
00091   linked with Root version 4.00.08, as version 4.02.00 introduces problems,
00092   such as context menu errors.
00093 
00094   Revision 1.40  2005/01/28 22:35:13  chuma
00095   The y-axis scales can now be fixed just like the x-axis scales.
00096 
00097   Revision 1.39  2005/01/26 23:11:00  chuma
00098   Added "ZoomOption" option to the context menu produced by right clicking
00099   anywhere on histogram frame.  This opens up a new canvas, titled
00100   "Zoom Canvas", containing a copy of the histograms in the original frame.
00101 
00102   Revision 1.38  2005/01/21 22:24:24  chuma
00103   When opening a .root file, if there are more than 1000 histograms
00104   in the file, the display is divided up into folders, where each
00105   folder holds 250 histograms (except for the final folder, which
00106   may be smaller).  This was done because of a problem with TGListTree
00107   which shows up with large numbers of objects.
00108 
00109   Revision 1.37  2005/01/08 01:11:07  odonnell
00110   Roody will display polygons (TCutG) from online TNetFolder or offline TFile.
00111   With a suitable analyzer, you can right click on any polygon and send it to
00112   an analyzer.
00113 
00114   Revision 1.36  2004/11/04 23:14:02  chuma
00115   To set the x-axis limits, right click anywhere on a histogram frame and
00116   choose "XaxisLimits" from the popup context menu.  This brings up a
00117   dialog box where you can enter the xmin and xmax values. Click "OK" and
00118   all pads within the currently selected canvas will be redrawn with
00119   that x-axis scale.  To reset all pads so the x-axes are unzoomed, click
00120   "Unzoom".
00121 
00122   Every overlayed histogram on a currently drawn histogram, will have be drawn
00123   in a different color (up to the max number of colors).
00124 
00125   When choosing a new pad division for a canvas (from the "Zones" menu),
00126   all currently drawn histograms will be redrawn in the new zones. If there
00127   are fewer pads in the new configuration, the extra histograms are
00128   not drawn.  Overlays (with their color) and x-axis scaling are preserved
00129   in the new configuration.
00130 
00131   Revision 1.35  2004/10/28 22:53:45  chuma
00132   When the number of zones (sub-pads) is changed, the histograms on the
00133   active canvas will be redrawn on the new canvas.  Also, more general
00134   code cleanup.
00135 
00136   Revision 1.34  2004/10/26 10:29:10  schneebeli
00137   Peakfinder is available also when clicking on the TFrame; Zones get activated by all mouse button clicks
00138 
00139   Revision 1.33  2004/10/21 20:10:14  chuma
00140   Command line argument change:
00141    the space between -h and hostname is optional
00142    the space between -r and filename is optional
00143 
00144   The save file is now an xml file validated with roody.dtd
00145   When saving or restoring, if you enter a filename without an extension,
00146   .xml will be appended.  The previous save file format is no longer
00147   supported.
00148 
00149   New files:  RoodyXML.h, RoodyXML.cxx, roody.dtd
00150 
00151   Fixed up group problems when an online file is located in a folder.
00152 
00153   Makefile modified to support libxml2.
00154 
00155   Revision 1.32  2004/09/30 19:03:43  chuma
00156   Right click on the Offline folder opens file dialog.
00157   Right click on the Online folder opens hostname dialog.
00158   If only one group exists, you will not be asked to choose the group
00159   when adding items to a group.
00160   Right click on multiple histogram selection allows for adding to a group.
00161 
00162   Revision 1.31  2004/09/29 18:51:18  olchansk
00163   Rename "TTriumfFileGUI" to "Roody"
00164 
00165   Revision 1.30  2004/09/24 22:08:35  chuma
00166   Added TNetFolder support
00167 
00168   Revision 1.29  2004/09/20 19:39:24  chuma
00169   multiple selection of histograms with CTRL key updated
00170 
00171   Revision 1.28  2004/09/16 16:30:36  schneebeli
00172   Linking on windows and multiple selection of items
00173 
00174   Revision 1.27  2004/07/20 18:36:21  chuma
00175   Added right click on online hostname to choose "Disconnect online".
00176   Moved groups to top of the list displayed in the gui.
00177   If the user entered save file name does not contain ".save" it will
00178   be appended to the filename.
00179 
00180   Revision 1.26  2004/07/19 19:39:40  chuma
00181   Fixed some minor bugs:
00182    do not make group named "-1" when TGTextDialog returns "-1" if canceled;
00183    get the port number correct on a restore;
00184    rationalize the host name and port number code;
00185 
00186   Revision 1.25  2004/07/15 22:25:06  chuma
00187   Added the run number (extracted from the root data file name) to the
00188   title for histogram plots.
00189 
00190   Revision 1.24  2004/07/15 18:40:57  chuma
00191   Fixed the online refresh problem when drawing groups.
00192 
00193   Revision 1.23  2004/07/15 16:16:21  chuma
00194   Implemented SAVE and RESTORE, but without xml (linking trouble).
00195   Draw Group also modified to title the window with the group name.
00196   Still to check, online refresh mode for group canvas.
00197 
00198   Revision 1.22  2004/07/05 21:47:05  olchansk
00199   implement HBOOK files
00200   consolidate DisplayFile() code
00201 
00202   Revision 1.21  2004/06/25 21:46:34  chuma
00203   Added:  current online host name is displayed in message dialog
00204   Fixed:  online histograms can now be added and displayed in groups
00205 
00206   Revision 1.20  2004/06/16 21:45:53  chuma
00207   Added:  right click on filename brings up "Close file" option
00208           automatic creation of TEMP folder (under Offline)
00209           right click on Groups folder brings up "Make new group" option
00210           right click on group name brings up "Delete group" and "Draw" options
00211           right click on histogram brings up "Add to group" option which
00212             brings up a list of existing groups
00213 
00214   Revision 1.19  2004/05/08 03:43:34  olchansk
00215   RTFM on TGListTree shows how to place the popup menu without doing the event handler kludge
00216   Implement right-click menus for other list tree items
00217 
00218   Revision 1.18  2004/05/08 03:08:02  olchansk
00219   fix context menu handling:
00220   - pop context menu at the pointer coordinates (kludged from TGFrame.cxx)
00221   - plot histogram from popup does not change the menu "plot in" setting
00222   - changing menu "plot in" setting does not replot the histogram
00223 
00224   Revision 1.17  2004/05/08 01:53:01  olchansk
00225   fPeakFindPanel becomes a global (static) variable
00226 
00227   Revision 1.16  2004/04/08 17:27:40  chuma
00228   Peak find added to context menu for right click on histograms.
00229   Updated TPeakFindPanel sources added to cvs at the same level as
00230   TTriumfFileGUI sources.  Clear All online histograms added to menu.
00231 
00232   Revision 1.15  2004/04/02 18:52:00  chuma
00233   the previously committed files were the same old files
00234   this commit is to correct that mistake only
00235   these files should make a square gui window with one canvas and no buttons
00236 
00237   Revision 1.13  2004/01/19 19:34:09  chuma
00238   modified TTriumfFileGUI.cxx and .h so the plotting context menu opens when
00239   right clicking on an online histogram, also duplicate online histograms will
00240   not be listed in the lower ListView
00241 
00242   Revision 1.12  2004/01/16 22:36:42  chuma
00243   modified TTriumfFileGUI.cxx and .h so that x-axis zooming is not lost when an
00244   online histogram is refreshed, also fixed the refresh menu so the current
00245   refresh rate is checked correctly
00246 
00247   Revision 1.11  2004/01/15 22:38:57  chuma
00248   create plotting context menu for upper TreeView, prevent duplicate items in
00249   lower ListView, more code cleanup
00250 
00251   Revision 1.10  2004/01/12 23:45:32  chuma
00252   add check marks to menu items so user knows what is in effect
00253 
00254   Revision 1.9  2004/01/09 20:41:16  chuma
00255   modified to draw in first pad when divided into zones
00256 
00257   Revision 1.8  2004/01/01 01:22:44  olchansk
00258   sanitize zone handling
00259   implement "draw in new canvas", "draw in current pad",
00260             "overlay into current pad", "draw in next pad"
00261 
00262   Revision 1.7  2003/12/10 18:07:36  chuma
00263   first pass by Joe Chuma
00264 
00265   Revision 1.6  2003/08/22 19:08:07  gking
00266   Methods CanvasHistToListView and PadHistToListView have been added
00267 
00268   Revision 1.5  2003/08/18 22:34:37  gking
00269   Improved Class Definition
00270 
00271   Revision 1.4  2003/08/08 22:22:38  gking
00272   Online Updates
00273 
00274   Revision 1.3  2003/07/25 22:14:55  gking
00275   Updated Constructor
00276 
00277   Revision 1.2  2003/07/23 01:46:07  gking
00278   Added <TTreeViewer.h>
00279 
00280   Revision 1.1.1.1  2003/07/22 19:53:24  gking
00281   INITIAL
00282 
00283 *********************************************************************/
00284 ///////////////////////////////////////////////////////////////////
00285 // ROOT implementation of an Online/Offline Analysis GUI
00286 // 
00287 // To run this do the following:
00288 // $ root
00289 // root [0] gSystem->Load("Roody")
00290 // root [1] Roody t(gClient->GetRoot(), 800, 800);
00291 // ...
00292 // root [n] .quit
00293 //  or
00294 // $ ./Roody
00295 //
00296 ///////////////////////////////////////////////////////////////////
00297 
00298 #ifndef Roody_H
00299 #define Roody_H
00300 
00301 #include <cstdlib>
00302 #include <iostream>
00303 #include <fstream>
00304 #include <sstream>
00305 #include <string>
00306 #include <vector>
00307 #include <memory>
00308 #include <map>
00309 #include <algorithm>
00310 #include <locale>
00311 
00312 #include "TROOT.h"
00313 #include "TApplication.h"
00314 #include "TVirtualX.h"
00315 #include "TGListTree.h"
00316 #include "TGClient.h"
00317 #include "TGFrame.h"
00318 #include "TGIcon.h"
00319 #include "TGLabel.h"
00320 #include "TGButton.h"
00321 #include "TGTextEntry.h"
00322 #include "TGNumberEntry.h"
00323 #include "TGMsgBox.h"
00324 #include "TGMenu.h"
00325 #include "TGCanvas.h"
00326 #include "TGFileDialog.h"
00327 #include "TGTextDialog.h"
00328 #include "TGTextEdit.h"
00329 #include "TCanvas.h"
00330 #include "TFrame.h"
00331 #include "TH1.h"
00332 #include "TH2.h"
00333 #include "TH3.h"
00334 #include "TProfile.h"
00335 #include "TProfile2D.h"
00336 #include "TF1.h"
00337 #include "TRandom.h"
00338 #include "TSystem.h"
00339 #include "TSystemDirectory.h"
00340 #include "TFile.h"
00341 #include "TKey.h"
00342 #include "TEnv.h"
00343 #include "TString.h"
00344 #include "TList.h"
00345 #include "TGStatusBar.h"
00346 #include "TSpectrum.h"
00347 #include "TVirtualFitter.h"
00348 #include "TPolyMarker.h"
00349 #include "TLine.h"
00350 #include "TGraphErrors.h"
00351 #include "TText.h"
00352 #include "TTree.h"
00353 #include "TTreeViewer.h"
00354 #include "TNtuple.h"
00355 #include "TExec.h"
00356 #include "Riostream.h"
00357 #include "TStyle.h"
00358 #include "TSocket.h"
00359 #include "TMessage.h"
00360 #include "TObjArray.h"
00361 #include "TObjString.h"
00362 #include "TTimer.h"
00363 #include "TContextMenu.h"
00364 #include "TClassMenuItem.h"
00365 #include "TFolder.h"
00366 #include "TCutG.h"
00367 
00368 #ifdef HAVE_HBOOK
00369 #include "THbookKey.h"
00370 #include "THbookFile.h"
00371 #include "THbookTree.h"
00372 #include "THbookBranch.h"
00373 #endif
00374 
00375 #include "MTGListTree.h"
00376 #include "TPeakFindPanel.h"
00377 #include "TNetFolder.h"
00378 
00379 template <typename T>
00380 bool StringTo( T &t, std::string const &s,
00381                std::ios_base &(*f)(std::ios_base&) )
00382 {
00383   // template to convert a string to int, double, etc. in decimal, hex or octal
00384   // e.g.  int i;
00385   //       StringTo<int>( i, string, std::dec );
00386   //       double d;
00387   //       StringTo<double>( d, string, std::dec );
00388   //
00389   std::istringstream iss(s);
00390   return !(iss >> f >> t).fail();
00391 }
00392 
00393 inline char UCase( char c ) // used with transform to change case of strings
00394 { return toupper(c); }
00395 
00396 inline void Trim( std::string &s )
00397 {
00398   // trim leading and trailing blanks
00399   //
00400   std::size_t rTemp = s.find_last_not_of( ' ' );
00401   if( rTemp != s.npos )
00402   {
00403     std::size_t lTemp = s.find_first_not_of( ' ' );
00404     if( lTemp != s.npos )s = s.substr( lTemp, rTemp-lTemp+1 );
00405   }
00406   else
00407   {
00408     s.clear();
00409   }
00410 }
00411 
00412 template <typename T> std::string NumberToString( T number )
00413 {
00414   std::stringstream ss;
00415   ss << number;
00416   return ss.str();
00417 }
00418 
00419 #include "CanvasLimits.h"
00420 
00421 //#include "RQ_OBJECT.h"
00422 //
00423 // Only required if a class is constructed which doesn't inherit from
00424 // a class which has the line RQ_OBJECT(class name)
00425 //
00426 class Roody : public TGMainFrame
00427 {
00428   //  RQ_OBJECT("Roody")
00429 
00430 public:
00431   Roody();
00432   Roody( TGWindow const *, UInt_t, UInt_t, char **, int, char const *, char const * );
00433   virtual ~Roody();
00434 
00435   Bool_t ProcessMessage( Long_t, Long_t, Long_t );
00436   void CloseWindow();
00437 
00438   void UpdateHistograms();
00439   void UpdateHistograms( TPad * );
00440 
00441   void PopupPlot( int, int, bool =false );
00442   void PopupFileMenu( int, int );
00443   void PopupOnlineMenu( int, int );
00444   void PopupNewGroup( int, int );
00445   void PopupGroup( int, int );
00446   void AddNewGroup();
00447   void PopupAddToGroup();
00448   void DeleteGroup();
00449   void DrawGroup();
00450   void PeakFind();
00451   void SelectPad( Int_t, Int_t, Int_t, TObject* );
00452   void XaxisLimits();
00453   void YaxisLimits();
00454   void SetCut( TObject * );
00455   void ZoomOption();
00456 
00457   void RedrawCanvas();
00458 
00459   ClassDef(Roody,0); // ROOT implementation of ONLINE/OFFLINE GUI
00460 
00461 protected:
00462   enum ECommandMenuEntry
00463   {
00464       M_FILE_OPEN,
00465       M_FILE_ONLINE,
00466       M_FILE_SAVE_DEFAULT,
00467       M_FILE_SAVE,
00468       M_FILE_RESTORE,
00469       M_FILE_EXIT,
00470 
00471       M_REFRESH_OFF,
00472       M_REFRESH_NOW,
00473       M_REFRESH_1SEC,
00474       M_REFRESH_3SEC,
00475       M_REFRESH_5SEC,
00476       M_REFRESH_10SEC,
00477       M_REFRESH_DIALOG,
00478 
00479       M_REFRESH_BUTTON,
00480 
00481       M_ZONES_11,
00482       M_ZONES_12,
00483       M_ZONES_21,
00484       M_ZONES_22,
00485       M_ZONES_33,
00486       M_ZONES_44,
00487       M_ZONES_USER,
00488       M_ZONES_DIALOG,
00489 
00490       M_PLOT_NEW,
00491       M_PLOT_SAME,
00492       M_PLOT_REPLACE,
00493       M_PLOT_NEXT,
00494 
00495       C_PLOT_NEW,
00496       C_PLOT_SAME,
00497       C_PLOT_REPLACE,
00498       C_PLOT_NEXT,
00499 
00500       C_CLOSE_FILE,
00501       C_CLOSE_ONLINE,
00502 
00503       C_NEW_GROUP,
00504       C_DELETE_GROUP,
00505       C_DRAW_GROUP,
00506       C_ADD_TO_GROUP,
00507       C_RESET_GROUP,
00508       C_RESET_OBJECT,
00509 
00510       M_RESET_ALL,
00511 
00512       M_HELP_ABOUT,
00513       M_HELP_CONTENTS,
00514       
00515       M_CURRENT_PAD,
00516       M_NEXT_PAD,
00517       M_NEW_PAD
00518   };
00519 
00520   enum EDrawDestination
00521   {
00522       D_PLOT_NEW = M_PLOT_NEW,
00523       D_PLOT_SAME = M_PLOT_SAME,
00524       D_PLOT_REPLACE = M_PLOT_REPLACE,
00525       D_PLOT_NEXT = M_PLOT_NEXT
00526   };
00527 
00528   typedef std::vector<TGListTreeItem*> ItemVec;
00529   
00530   MTGListTree *fFileOnlineContents;
00531   TGListTreeItem *fTreeItemOnline, *fTreeItemFiles, *fTreeItemCurrent, *fTreeItemGroups;
00532   ItemVec fTreeItems;
00533 
00534 private:
00535   TGMenuBar *fMenuBar;
00536   TGPopupMenu *fMenuFile, *fMenuRefresh, *fMenuHelp;
00537   TGPopupMenu *fMenuZones, *fMenuPlot, *fMenuClear;
00538   TGPopupMenu *fPopupMenu;
00539   TGLayoutHints *fMenuBarLayout1, *fMenuBarLayout2, *fMenuBarLayout3;
00540   TGVerticalFrame *fVerticalFrame;
00541   TGHorizontalFrame *fHorizontalFrame;
00542   TGLayoutHints *fFrameLayout1, *fFrameLayout2, *fFrameLayout3;
00543   TGLayoutHints *fStatusBarLayout;
00544   TGStatusBar *fStatusBar;
00545   TGCanvas *fFileOnlineCanvas; // a canvas with 2 scrollbars and a viewport
00546 
00547   static TPeakFindPanel *fgPeakFindPanel;
00548 
00549   EDrawDestination fDrawDestination; // where to Draw() things, value is one of D_PLOT_XXX
00550   int fUpdateTimerSec;  // refresh time in sec, 0 means no refresh
00551 
00552   Int_t fZoneRows;      // default zone setting: rows
00553   Int_t fZoneColumns;   // default zone setting: columns
00554 
00555   TGFileInfo fFileInfo;
00556 
00557   TH1 *fCurrentTH1;
00558   TH2 *fCurrentTH2;
00559   TH3 *fCurrentTH3;
00560   
00561   TDirectory *fParentDir;
00562   TFile      *fCurrentFile, *fSaveFile, *fCloseFile;
00563 #ifdef HAVE_HBOOK
00564   THbookFile *fCurrentHbook;
00565 #endif
00566 
00567   TList *fFileList, *fHistList, *fTreeList;
00568   TObjArray *fHistNames;
00569 
00570   TObjString *fHistName;
00571   TString fHostName, fPortName;
00572   TString fIdName;
00573 
00574   TTree *fT1;
00575 #ifdef HAVE_HBOOK
00576   THbookTree *fHT1;
00577 #endif
00578 
00579   // Stuff needed from RMidasFrame
00580   // see: midtis06:/send/home/olchansk/daq/midas/src
00581   TSocket *fSock;
00582 
00583   TTimer *fUpdateTimer; // used for updating online histograms
00584   Bool_t fOnlineAborted;
00585 
00586   Int_t fHbookSupport;
00587   Bool_t fUpdateTimerOn;
00588   Bool_t fOpeningFile;
00589 
00590   ItemVec fGroupFolders;
00591 
00592   struct GroupItem
00593   {
00594     TGListTreeItem *item;
00595     std::string source;
00596   };
00597 
00598   typedef std::multimap<int,GroupItem> GroupMap;
00599   typedef GroupMap::value_type value_type;
00600   GroupMap fGroupHists;
00601 
00602   map <std::string, std::string> fZoneSetting;
00603 
00604   TGPopupMenu *fAddToGroupPopup;
00605   int fXSave, fYSave;
00606 
00607   Int_t fCanvasCount;
00608 
00609   std::vector<CanvasLimits*> fCanvasLimitsVector;
00610 
00611   struct HistPad
00612   {
00613     Int_t padNumber;
00614     TH1 *hist;
00615   };
00616   
00617   TCanvas *fZoomCanvas, *fCurrentCanvas;
00618 
00619   TGTextButton *fRefreshButton;
00620 
00621   void LayoutGUI();
00622   void LayoutMenuBar();
00623   void OpenFileDialog();
00624   bool OpenRootFile( char const * );
00625   bool OpenHbookFile( char const * );
00626 
00627   void AddPeakFind();
00628   void AddAxisLimits();
00629   void AddSetCut();
00630   void AddZoomOption();
00631 
00632   void AddFileEntryTreeView( TFile * );
00633 #ifdef HAVE_HBOOK
00634   void AddFileEntryTreeView( THbookFile * );
00635 #endif
00636 
00637   void DisplayFile( TGListTreeItem * );
00638 #ifdef HAVE_HBOOK
00639   void DisplayFile( THbookFile *, TGListTreeItem * );
00640 #endif
00641   void DisplayFile( TFile *, TGListTreeItem * );
00642   void DisplayFile( TDirectory *, TGListTreeItem * );
00643   void DisplayObject( TObject *, TGListTreeItem *, char const * );
00644   TObject *SearchDirectory( TDirectory *, char const * );
00645   
00646   void AddOnlineEntryTreeView();
00647   //void DisplayOnline( TGListTreeItem * ); // Display contents of host
00648   
00649   void SetupZones( int, int );
00650   void SetDestination( EDrawDestination );
00651   void SetPad();
00652   void PlotItem();
00653   void DrawObject( TObject * );
00654   void DrawItemsOnNewCanvas();
00655   std::string GetZoneSetting();
00656   
00657   void ConnectServer( char const *, Bool_t =kTRUE );
00658   TObjArray* GetHistList( TSocket * );
00659   void GetHistList( TGListTreeItem *, char const * ="histos" );
00660   void DrawOnlineObject( TObjString * );
00661   TObject *GetNetFolderObject( char const *, char const * ="histos" );
00662 
00663   void StartOnlineTimer();
00664   void StopOnlineTimer();
00665 
00666   void SetRefreshRate(int newrefresh);
00667 
00668   void OpenRefreshDialog();
00669   void OpenZoneDialog();
00670   void UncheckAllZones();
00671 
00672   void CloseFile();
00673   void CloseOnline();
00674 
00675   void ResetMultiple();
00676   void ResetObject( TObject * );
00677   void GetFolderItems( TGListTreeItem * );
00678   void GetItemsRecursive( TGListTreeItem * );
00679 
00680   bool MakeNewGroup( char const * );
00681   bool AddHistogramToGroup( int, TObject *, char const * );
00682 
00683   void OpenRestoreDialog();
00684   void RestoreFile( char const * );
00685   void OpenSaveDialog();
00686   void SaveFile( char const * );
00687 
00688   void MarkObjectAsOnline( TObject *);
00689   bool ObjectIsOnline( TObject * );
00690   
00691   std::string GetFileFromHist( TH1 * );
00692 
00693   TString GetRunNumber( char const * );
00694 
00695   TH1* SetCanvasLimits(TCanvas*, TH1*);
00696   void RedrawPad( TPad * );
00697 
00698   TH1 *GetHist( TPad *, TObject * );
00699 
00700   void MakeNewCanvas();
00701   TCanvas* MakeGroupCanvas( char const *, int, int );
00702   void MakeZoomCanvas();
00703   void CleanupCurrentCanvas();
00704   void SetZonesUser();
00705   void SetupZonesMenu();
00706 
00707   CanvasLimits* FindCanvasLimits(Int_t canvasId);
00708 
00709   void ResetAll();
00710 };
00711 
00712 #endif

Roody DOC Version 1.0.1 ---- TRIUMF ----
Contributions: Pierre-Andre Amaudruz - Joe Chuma - Doxygen - Greg King - Konstantin Olchanski - Matthias Schneebeli