Public Member Functions | Protected Member Functions | Private Attributes | List of all members
CRT::TwoAxisView Class Reference

#include <TwoAxisView.h>

Inheritance diagram for CRT::TwoAxisView:
CRT::ChannelView

Public Member Functions

 TwoAxisView (const std::string &name="CRTEvd", const std::string &title="CRT Event Display", const std::string &zTitle="Hits")
 
 TwoAxisView (TPad *pad, const std::string &name="CRTEvd", const std::string &title="CRT Event Display", const std::string &zTitle="Hits")
 
 TwoAxisView (const std::string &name, const std::string &title, const std::string &xTitle, const std::string &yTitle, const std::string &zTitle)
 
 TwoAxisView (const std::string &name, const std::string &title, const std::string &xTitle, const std::string &yTitle, const std::string &zTitle, TPad *pad)
 
- Public Member Functions inherited from CRT::ChannelView
 ChannelView ()
 
 ChannelView (TPad *pad)
 
virtual ~ChannelView ()
 
void Fill (const size_t module, const size_t channel, const double weight=1.0)
 
void SetValue (const size_t module, const size_t channel, const double value)
 
void Draw (const char *option)
 
void Reset (const char *option)
 

Protected Member Functions

virtual void doFill (const size_t module, const size_t channel, const double weight) override
 
virtual void doSetValue (const size_t module, const size_t channel, const double value) override
 
virtual void doDraw (const char *option) override
 
virtual void doReset (const char *option) override
 
- Protected Member Functions inherited from CRT::ChannelView
TPad * GetMainPad ()
 

Private Attributes

TH2D fHist
 

Additional Inherited Members

- Static Protected Attributes inherited from CRT::ChannelView
static constexpr size_t NModules = 32
 
static constexpr size_t ChannelsPerModule = 64
 

Detailed Description

Definition at line 15 of file TwoAxisView.h.

Constructor & Destructor Documentation

CRT::TwoAxisView::TwoAxisView ( const std::string name = "CRTEvd",
const std::string title = "CRT Event Display",
const std::string zTitle = "Hits" 
)

Definition at line 44 of file TwoAxisView.cpp.

44  : TwoAxisView(name, title, "channel",
45  "module", zTitle)
46  {
47  }
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
CRT::TwoAxisView::TwoAxisView ( TPad *  pad,
const std::string name = "CRTEvd",
const std::string title = "CRT Event Display",
const std::string zTitle = "Hits" 
)

Definition at line 49 of file TwoAxisView.cpp.

49  :
50  TwoAxisView(name, title, "channel", "module", zTitle, pad)
51  {
52  }
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
CRT::TwoAxisView::TwoAxisView ( const std::string name,
const std::string title,
const std::string xTitle,
const std::string yTitle,
const std::string zTitle 
)

Definition at line 30 of file TwoAxisView.cpp.

31  : ChannelView()
32  {
33  fHist = TH2D(name.c_str(), (title+";"+xTitle+";"+yTitle+";"+zTitle).c_str(), ChannelsPerModule, 0, ChannelsPerModule, NModules, 0, NModules);
34  fHist.SetStats(false);
35  fHist.SetMaximum(4096); //Set range to hard-coded maximum ADC value in CRT hardware
36  }
static QCString name
Definition: declinfo.cpp:673
static constexpr size_t ChannelsPerModule
Definition: ChannelView.h:45
static constexpr size_t NModules
Definition: ChannelView.h:44
CRT::TwoAxisView::TwoAxisView ( const std::string name,
const std::string title,
const std::string xTitle,
const std::string yTitle,
const std::string zTitle,
TPad *  pad 
)

Definition at line 38 of file TwoAxisView.cpp.

39  : ChannelView(pad)
40  {
41  fHist = TH2D(name.c_str(), (title+";"+xTitle+";"+yTitle+";"+zTitle).c_str(), ChannelsPerModule, 0, ChannelsPerModule, NModules, 0, NModules);
42  }
static QCString name
Definition: declinfo.cpp:673
static constexpr size_t ChannelsPerModule
Definition: ChannelView.h:45
static constexpr size_t NModules
Definition: ChannelView.h:44

Member Function Documentation

void CRT::TwoAxisView::doDraw ( const char *  option)
overrideprotectedvirtual

Implements CRT::ChannelView.

Definition at line 64 of file TwoAxisView.cpp.

65  {
66  StyleSentry old; //Save the old style during this function so I don't change it
67 
68  gStyle->SetOptStat(0);
69  fHist.UseCurrentStyle();
70  fHist.Draw(option);
71  }
void CRT::TwoAxisView::doFill ( const size_t  module,
const size_t  channel,
const double  weight 
)
overrideprotectedvirtual

Implements CRT::ChannelView.

Definition at line 54 of file TwoAxisView.cpp.

55  {
56  fHist.Fill(channel, module, weight);
57  }
uint8_t channel
Definition: CRTFragment.hh:201
weight
Definition: test.py:257
void CRT::TwoAxisView::doReset ( const char *  option)
overrideprotectedvirtual

Implements CRT::ChannelView.

Definition at line 73 of file TwoAxisView.cpp.

74  {
75  fHist.Reset(option);
76  }
void CRT::TwoAxisView::doSetValue ( const size_t  module,
const size_t  channel,
const double  value 
)
overrideprotectedvirtual

Implements CRT::ChannelView.

Definition at line 59 of file TwoAxisView.cpp.

60  {
61  fHist.SetBinContent(fHist.GetBin(channel, module), value);
62  }
uint8_t channel
Definition: CRTFragment.hh:201

Member Data Documentation

TH2D CRT::TwoAxisView::fHist
private

Definition at line 36 of file TwoAxisView.h.


The documentation for this class was generated from the following files: