Classes | Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Attributes | List of all members
CRT::ChannelView Class Referenceabstract

#include <ChannelView.h>

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

Classes

struct  MaybeDeleter
 

Public Member Functions

 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)=0
 
virtual void doSetValue (const size_t module, const size_t channel, const double value)=0
 
virtual void doDraw (const char *option)=0
 
virtual void doReset (const char *option)=0
 
TPad * GetMainPad ()
 

Static Protected Attributes

static constexpr size_t NModules = 32
 
static constexpr size_t ChannelsPerModule = 64
 

Private Attributes

std::unique_ptr< TPad, MaybeDeleter< TPad > > fPad
 

Detailed Description

Definition at line 20 of file ChannelView.h.

Constructor & Destructor Documentation

CRT::ChannelView::ChannelView ( )

Definition at line 12 of file ChannelView.cpp.

12  : fPad(new TPad("ChannelViewDefault", "CRT::ChannelView Default Pad", 0, 0, 1, 1), MaybeDeleter<TPad>(true))
13  {
14  }
std::unique_ptr< TPad, MaybeDeleter< TPad > > fPad
Definition: ChannelView.h:66
CRT::ChannelView::ChannelView ( TPad *  pad)

Definition at line 17 of file ChannelView.cpp.

17  : fPad(pad, MaybeDeleter<TPad>(false))
18  {
19  }
std::unique_ptr< TPad, MaybeDeleter< TPad > > fPad
Definition: ChannelView.h:66
CRT::ChannelView::~ChannelView ( )
virtual

Definition at line 22 of file ChannelView.cpp.

23  {
24  }

Member Function Documentation

virtual void CRT::ChannelView::doDraw ( const char *  option)
protectedpure virtual

Implemented in CRT::TwoAxisView, and CRT::SpaceView.

virtual void CRT::ChannelView::doFill ( const size_t  module,
const size_t  channel,
const double  weight 
)
protectedpure virtual

Implemented in CRT::TwoAxisView, and CRT::SpaceView.

virtual void CRT::ChannelView::doReset ( const char *  option)
protectedpure virtual

Implemented in CRT::TwoAxisView, and CRT::SpaceView.

virtual void CRT::ChannelView::doSetValue ( const size_t  module,
const size_t  channel,
const double  value 
)
protectedpure virtual

Implemented in CRT::TwoAxisView, and CRT::SpaceView.

void CRT::ChannelView::Draw ( const char *  option)

Definition at line 38 of file ChannelView.cpp.

39  {
40  fPad->cd();
41  doDraw(option);
42  }
std::unique_ptr< TPad, MaybeDeleter< TPad > > fPad
Definition: ChannelView.h:66
virtual void doDraw(const char *option)=0
void CRT::ChannelView::Fill ( const size_t  module,
const size_t  channel,
const double  weight = 1.0 
)

Definition at line 26 of file ChannelView.cpp.

27  {
28  //I could add "utility" processing here so that all derived classes benefit from it
29  doFill(module, channel, weight);
30  }
uint8_t channel
Definition: CRTFragment.hh:201
weight
Definition: test.py:257
virtual void doFill(const size_t module, const size_t channel, const double weight)=0
TPad* CRT::ChannelView::GetMainPad ( )
inlineprotected

Definition at line 47 of file ChannelView.h.

47 { return fPad.get(); } //Provide derived classes with observer pointer access to fPad
std::unique_ptr< TPad, MaybeDeleter< TPad > > fPad
Definition: ChannelView.h:66
void CRT::ChannelView::Reset ( const char *  option)

Definition at line 44 of file ChannelView.cpp.

45  {
46  doReset(option);
47  }
virtual void doReset(const char *option)=0
void CRT::ChannelView::SetValue ( const size_t  module,
const size_t  channel,
const double  value 
)

Definition at line 32 of file ChannelView.cpp.

33  {
34  //I could add "utility" processing here so that all derived classes benefit from it
35  doSetValue(module, channel, value);
36  }
uint8_t channel
Definition: CRTFragment.hh:201
virtual void doSetValue(const size_t module, const size_t channel, const double value)=0

Member Data Documentation

constexpr size_t CRT::ChannelView::ChannelsPerModule = 64
staticprotected

Definition at line 45 of file ChannelView.h.

std::unique_ptr<TPad, MaybeDeleter<TPad> > CRT::ChannelView::fPad
private

Definition at line 66 of file ChannelView.h.

constexpr size_t CRT::ChannelView::NModules = 32
staticprotected

Definition at line 44 of file ChannelView.h.


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