#include <HistSets.hpp>
Inheritance diagram for recocert::HistSets::

Public Methods | |
| HistSets (const std::string name, HepRootFileManager *manager=NULL) | |
| virtual | ~HistSets () |
| Destructor. | |
| virtual void | load (TFile *file, const std::string &dir) |
| Load histograms from a subdirectory in a given file. | |
| virtual void | add (TFile *file, const std::string &dir) |
| Add histograms from a subdirectory in a given file to the current ones. | |
| void | save (const std::string &file) |
| Save standard set of plots. More... | |
| virtual void | draw (const int &level=0, TPostScript *psfile=NULL, std::vector< HistSets *> *overlaySet=NULL)=0 |
| Draw standard plots. More... | |
| virtual void | stat (std::ostream &out, const int &level=0)=0 |
| Print summary statistics. More... | |
| TH1F* | get1DHist (std::string name) |
| Get 1D histogram. | |
| TH2F* | get2DHist (std::string name) |
| Get 2D histogram. | |
| TProfile* | getProfileHist (std::string name) |
| Get profile histogram. | |
| bool | exists (std::string name, std::string type="ANY") |
| Check if given histogram exists. More... | |
| void | newPage (std::string label, int nxpads, int nypads, TPostScript *psfile=NULL) |
| Create a new page for drawing histograms. More... | |
| void | draw1D (const std::string &histname, std::vector< HistSets *> *overlaySets=NULL, int logy=0, int logx=0, const std::string &normalize="EVENT", const std::string &option="") |
| Draw 1D histogram(s). More... | |
| void | draw2D (const std::string &histname, std::vector< HistSets *> *overlaySets=NULL, const std::string &option="") |
| Draw 2D histogram(s). More... | |
| void | drawProfile (const std::string &histname, std::vector< HistSets *> *overlaySets=NULL, int logy=0, int logx=0, const std::string &option="") |
| Draw profile histogram(s). More... | |
Protected Methods | |
| virtual void | init (HepRootFileManager *manager=NULL, const edm::RCP *rcp=NULL) |
| Initialize histograms. More... | |
| virtual void | create (const edm::RCP *rcp=NULL)=0 |
| Create the actual histograms. | |
| void | fill () |
| Fill special internal histograms. | |
Protected Attributes | |
| std::map<std::string, TH1F*> | _hists1D |
| The 1-dimensional histograms. | |
| std::map<std::string, TH2F*> | _hists2D |
| The 2-dimensional histograms. | |
| std::map<std::string, TProfile*> | _histsProfile |
| The profile histograms. | |
| const std::string | _name |
| The name of this histogram set. | |
| HCanvas* | _canvas |
| The current canvas when drawing histograms. | |
| int | _pad |
| The current pad when drawing histograms. | |
This abstract base class manages an arbitrary collection of 1D, 2D and profile histograms. Concrete implementations define these histograms, and provide support for filling them.
The base class provides support for loading saved histograms (load) from a file and combining (adding) instances (add) from multiple files. It also allows users direct access to individual histograms (getHist).
Concrete classes are required to provide create, draw and stat methods, which should create new sets of histograms, draw them and print statistics describing them.
In addition, concrete classes should provide appropriate fill methods, which depend specifically on their implementation.
|
|
Create a collection of histograms with a given name. If an optional file manager is supplied, then a subdirectory is created with that same name, and the histograms are created within that subdirectory. |
|
|
Destructor.
|
|
|
Add histograms from a subdirectory in a given file to the current ones.
|
|
|
|
Draw standard plots. Standard histograms are drawn depending on the user specified value of level. The higher the level, the more detailed the plots. The default level gives a summary, appropriate for simple testing. Histograms can be drawn into a postscript file, if supplied. This method can also optionally overlay histograms from other sets, by supplying a collection of other sets. Implementation depends on the concrete class (e.g. normalization choices, color choices, etc.). Reimplemented in recocert::CalHists, recocert::CftHists, recocert::CpsHists, recocert::ElectronHists, recocert::JetHists, recocert::MetHists, recocert::MuonHists, recocert::MuonMDTHists, recocert::MuonMSCHists, recocert::MuonPDTHists, recocert::MuonTrackHists, recocert::OccupancyHists, recocert::SmtClusterBHists, recocert::SmtClusterFDHists, recocert::SmtClusterHDHists, recocert::TimingHists, recocert::TrackEffIsolHists, recocert::TrackEffJetHists, recocert::TrackHists, recocert::TriggerHists, recocert::V0Hists, and recocert::VertexHists. |
|
|
Draw 1D histogram(s). Draw the specified histogram (by name) to the currently open canvas (use newPage() to open a new canvas). Optionally will overlay histograms with the same name in the supplied vector of HistSets. Each overlaid histogram will have a unique color (starting with red). Users can optionally select log scales for y and x axes by setting logy or logx equal to 1 respectively [default = linear scale]. If histograms are overlaid, they are by default normalized by the number of events processed. Use the normalize option to override. Currently supported:
|
|
|
Draw 2D histogram(s). Draw the specified histogram (by name) to the currently open canvas (use newPage() to open a new canvas). Optionally will overlay histograms with the same name in the supplied vector of HistSets. Each overlaid histogram will have a unique color (starting with red). NB - Currently, overlaying is not implemented for 2D histograms. Additional ROOT drawing options may be supplied via the option parameter. |
|
|
Draw profile histogram(s). Draw the specified histogram (by name) to the currently open canvas (use newPage() to open a new canvas). Optionally will overlay histograms with the same name in the supplied vector of HistSets. Each overlaid histogram will have a unique color (starting with red). Users can optionally select log scales for y and x axes by setting logy or logx equal to 1 respectively [default = linear scale]. Additional ROOT drawing options may be supplied via the option parameter. |
|
|
Check if given histogram exists. Return true if there is any histogram within this set with the given name. Optionally, the user can ask to check for a specific type of histogram. Supported types are:
|
|
|
Fill special internal histograms.
|
|
|
Get 1D histogram.
|
|
|
Get 2D histogram.
|
|
|
Get profile histogram.
|
|
|
Initialize histograms. If an optional file manager is supplied, then first create a subdirectory based on the name of the histogram set, and then create the histograms within that subdirectory. |
|
|
Load histograms from a subdirectory in a given file.
|
|
|
Create a new page for drawing histograms. Create a new canvas for drawing histogram, with the specified label. The number of zones (pads) is set to nxpads x nypads. Optionally the canvas is inserted into the user supplied postscript file (a new page is created). |
|
|
Save standard set of plots. This method is currently unsupported. It previously saved ROOT canvases containing the drawn histograms. It will soon be used to save merged histograms, created by using the add method. |
|
|
Print summary statistics. Selected statistics are written into the supplied ostream, depending on the user specified value of level. The higher the level, the more detailed the statistics. Reimplemented in recocert::CalHists, recocert::CftHists, recocert::CpsHists, recocert::ElectronHists, recocert::JetHists, recocert::MetHists, recocert::MuonHists, recocert::MuonMDTHists, recocert::MuonMSCHists, recocert::MuonPDTHists, recocert::MuonTrackHists, recocert::OccupancyHists, recocert::SmtClusterBHists, recocert::SmtClusterFDHists, recocert::SmtClusterHDHists, recocert::TimingHists, recocert::TrackEffIsolHists, recocert::TrackEffJetHists, recocert::TrackHists, recocert::TriggerHists, recocert::V0Hists, and recocert::VertexHists. |
|
|
The current canvas when drawing histograms.
|
|
|
The 1-dimensional histograms.
|
|
|
The 2-dimensional histograms.
|
|
|
The profile histograms.
|
|
|
The name of this histogram set.
Reimplemented in recocert::TrackEffHists. |
|
|
The current pad when drawing histograms.
|
1.2.6 written by Dimitri van Heesch,
© 1997-2001