Ryan's attempt at Plot Tools
Where to get the files:
- Check out the Globe Analyzer
cvs co -rHEAD -d PlotTools !UserCode/rwkelley/Development/PlotTools2
Remember to switch to UCSD cvs. To Build type:
cd ~/<your path>/PlotTools
make
Add the following to your .roologin.C
TString HOME = gSystem->HomeDirectory();
gSystem->AddIncludePath("-Iinterface");
gSystem->AddIncludePath("-I" + HOME + "/<your path>/PlotTools/interface");
gSystem->Load(HOME + "/<your path>/PlotTools/lib/libPlotManager.so");
gROOT->ProcessLine("#include \"" + HOME + "<your path>/PlotTools/interface/TypeDefs.h\"");
using namespace pm; // this is optional if you don't want to deal with the pm namespace
This will load the library when root loads.
Source Code
The source code can be found @
http://uaf-1.t2.ucsd.edu/viewvc/UserCode/rwkelley/Development/PlotTools2/
List of problems
- THStack::Draw("HIST") causes the stat box to not be drawn
- fixed with a work-around (THStack issue). Redraw statboxes manually after draw. Causes one more refresh (annoying)
- Plot cannot be added a root file with the hadd command
- hadd only has support for histograms and trees.
- StatBox? position was non dynamic
- fixed so that the calculation is dependent on the TFrame's position
- Plot::DrawStacked("",/*reverse=*/true) doesn't work as intended
- gPad does not exist when there is no canvas. automation for statbox placement need to be fixed. possibly use TStyle
- Legend defaults to hist title if hist is added to Plot. Don't really like this.
- Legends and stat boxes are not align to the TFrame dynamically
- Can't handle and Tree1/var1 Tree2/var1 Tree3/var2
Feature to Implement
- add automatic axis albes for drawing
- A vector of cuts for the from tree
- Need a better way to dynamically name histograms
- Need to implement more ways to constuct
- Plot( FromRoot? (), ...)
- Plot( FromFile? (), ...)
- Plot( FromGlobe? (), ...)
- Plot( TH1*, ...)
- Plot( TH2*, ...)
- Manage Legend font and size better
- Black outline on stacked plots
--
RyanKelley - 2009/02/13
Topic revision: r7 - 2009/05/17 - 22:25:32 -
RyanKelley