displayDoc.cxx

Go to the documentation of this file.
00001 
00002 /*! \page displayClass Display Classes
00003 
00004 \section displayIntro Introduction
00005 
00006 TRootanaDisplay is an attempt to provide a simple way of 
00007 making ROOT event displays that can quickly be used to show
00008 ADC/TDC spectrum or whatever else you'd like to plot.
00009 
00010 
00011 \section displayUsage Using TRootanaDisplay
00012 
00013 TRootanaDisplay is an abstract base class for event displays.  
00014 Users need to define a class that derives from this class in order to 
00015 make an event display.  The only method that users must implement
00016 is the method AddAllCanvas(), where the user defines which tabs to use.
00017 
00018 The user then needs to define how they what to update and plot histograms.
00019 The updating of histograms happens for each event.
00020 In online mode, the plotting of histograms only happens for each NN events, where
00021 NN is controlled by the user.
00022 For offline mode the plotting happens for each event.
00023 
00024 There are three ways that users can decide to update and plot histograms:
00025 1) They can create histograms in their event display class and then fill 
00026    the methods UpdateHistograms(TDataContainer) and PlotCanvas(TDataContainer).
00027    This histograms can then fill in the canvases that are added using 
00028    AddSingleCanvas(std::string name).
00029 2) They can create classes that are derived from TCanvasHandleBase.  The derived
00030    classes are then added using the method AddSingleCanvas(TCanvasHandleBase* handleClass).
00031 3) They can create a histogram-set class (derived from THistogramArrayBase) and
00032 pass it to TFancyHistogramCanvas.  This provides a richer set of button control
00033 of the histogram display.
00034 
00035 There is no substantial difference between the first two methods.  The second method
00036 is mainly meant to allow the user to separate the methods into separate files
00037 for code cleaniness.
00038 
00039 The actual ROOT GUI is encapsulated in a separate class TMainDisplayWindow.
00040 The TRootanaDisplay has an instance of this TMainDisplayWindow class.
00041 Users will be need to access the TMainDisplayWindow by calling
00042 
00043 TRootanaDisplay::GetDisplayWindow()
00044 
00045 in order to grab the particular canvas that we want plot on.
00046 
00047 The program display_example.cxx shows an nice example plot using all three 
00048 methods for histogram filling.
00049 
00050 \section displayFlowControl Program Flow Control
00051 
00052 The following images try to describe the program flow graphically. This is largely the same information
00053 as what is described above, but presently differently.
00054 
00055 
00056 
00057 
00058 \image html event_display_offline_diagram.png "Program flow for offline rootana display" width=10cm
00059 
00060 \image html event_display_online_diagram.png "Program flow for online rootana display" width=10cm
00061 
00062 
00063 
00064 
00065 \section roodyComp Comparison of RootanaDisplay and Roody
00066 
00067 rootana also provides a different way of visualizing histograms
00068 through roody and the TNetDirectoryServer.  Should the user use TRootanaDisplay 
00069 or roody?  The following are some of the differences between the two tools:
00070 
00071 - roody requires two programs to be running: an analyzer that produces the histogram 
00072 and the roody program for displaying them.  This has some advantages in that you can 
00073 independently restart the roody part; also you can run the analyzer on the midas server
00074 machine, but run roody on your desktop. 
00075 But it also some disadvantages in complexity, since you need to keep track of both programs. 
00076 - Using roody is simpler from a coding point of view, since all the visualization is 
00077 handled for you.  The TRootanaDisplay option requires some understanding of ROOT canvases
00078 and GUIs.
00079 - roody can only handle a limited set of ROOT classes, like TH1 histograms.  If you 
00080 want to be able to plot more complicated ROOT options or plot them in a more complicated
00081 way (overlaying histograms, fits and labels) then TRootanaDisplay is a better option.
00082 
00083 So, in summary: if you are only producing a simple set of ROOT histograms and/or
00084 you don't want to do much programming then roody might be the right solution; if you want
00085 complicated plots and don't mind using ROOT display classes, then TRootanaDisplay is the way
00086 to go.
00087 
00088 Of course, the user can easily have a program that implements both solutions 
00089 and get the best of both worlds.
00090 
00091 
00092 
00093 
00094 
00095 T. Lindner
00096 */

Generated on 12 Feb 2016 for ROOT Analyzer by  doxygen 1.6.1