TwoAxisView.h
Go to the documentation of this file.
1 //File: TwoAxisView.h
2 //Brief: A TwoAxisView is a ChannelView (mapping from (module, channel) pairs to histogram bins)
3 // that draws module number on one axis and channel number on the other. Basically, just
4 // calls TH2D::Fill(channel, module) in doFill(module, channel).
5 //Author: Andrew Olivier aolivier@ur.rochester.edu
6 
7 //Include header
8 #include "plot/ChannelView.h"
9 
10 //ROOT includes
11 #include "TH2D.h"
12 
13 namespace CRT
14 {
15  class TwoAxisView: public ChannelView
16  {
17  public:
18  //Axis labels are automatically generated for x and y axes
19  TwoAxisView(const std::string& name="CRTEvd", const std::string& title="CRT Event Display", const std::string& zTitle="Hits");
20  TwoAxisView(TPad* pad, const std::string& name="CRTEvd", const std::string& title="CRT Event Display", const std::string& zTitle="Hits");
21 
22  //Axis labels are provided explicitly for all axes
23  TwoAxisView(const std::string& name, const std::string& title, const std::string& xTitle, const std::string& yTitle,
24  const std::string& zTitle);
25  TwoAxisView(const std::string& name, const std::string& title, const std::string& xTitle, const std::string& yTitle,
26  const std::string& zTitle, TPad* pad);
27 
28  //Public interface is defined in base class
29  protected:
30  virtual void doFill(const size_t module, const size_t channel, const double weight) override;
31  virtual void doSetValue(const size_t module, const size_t channel, const double value) override;
32  virtual void doDraw(const char* option) override;
33  virtual void doReset(const char* option) override;
34 
35  private:
36  TH2D fHist; //Implement drawing as a simple TH2D.
37  };
38 }
static QCString name
Definition: declinfo.cpp:673
TwoAxisView(const std::string &name="CRTEvd", const std::string &title="CRT Event Display", const std::string &zTitle="Hits")
Definition: TwoAxisView.cpp:44
std::string string
Definition: nybbler.cc:12
uint8_t channel
Definition: CRTFragment.hh:201
virtual void doFill(const size_t module, const size_t channel, const double weight) override
Definition: TwoAxisView.cpp:54
weight
Definition: test.py:257
virtual void doReset(const char *option) override
Definition: TwoAxisView.cpp:73
virtual void doSetValue(const size_t module, const size_t channel, const double value) override
Definition: TwoAxisView.cpp:59
virtual void doDraw(const char *option) override
Definition: TwoAxisView.cpp:64