HistPage Class Reference

A Midad Page with histogram based displays. More...

#include <HistPage.h>

Inheritance diagram for HistPage:
CanvasPage PageABC

List of all members.

Public Member Functions

 HistPage ()
virtual ~HistPage ()
virtual TObject * Init (Mint *mint, PageDisplay *pd, GuiBox &box)
virtual void Clear ()
virtual void Update ()
 Implement to respond to a change in the data.
virtual void Unzoom ()
virtual void Rezoom ()
virtual void FullZoom ()
virtual void AutoZoom ()

Private Member Functions

void Setup ()

Private Attributes

MintfMint
HistDispfHistDisp

Detailed Description

A Midad Page with histogram based displays.

Definition at line 15 of file HistPage.h.


Constructor & Destructor Documentation

HistPage::HistPage (  ) 

Definition at line 32 of file HistPage.cxx.

00033     : fMint(0), fHistDisp(0)
00034 {
00035 }

HistPage::~HistPage (  )  [virtual]

Definition at line 36 of file HistPage.cxx.

References fHistDisp.

00037 {
00038     if (fHistDisp) delete fHistDisp; fHistDisp = 0;
00039 }


Member Function Documentation

void HistPage::AutoZoom (  )  [virtual]

Reimplemented from PageABC.

Definition at line 98 of file HistPage.cxx.

References HistDisp::AutoZoom(), fHistDisp, and HistDisp::Update().

00099 {
00100     fHistDisp->AutoZoom();
00101     fHistDisp->Update();
00102 }

void HistPage::Clear ( void   )  [virtual]

Implement to respond to a new record read in, the actual record is accessible in the subsequent Update() call.

Reimplemented from PageABC.

Definition at line 55 of file HistPage.cxx.

References HistDisp::Clear(), fHistDisp, and Setup().

00056 {
00057     this->Setup();
00058     fHistDisp->Clear();
00059 }

void HistPage::FullZoom ( void   )  [virtual]

Reimplemented from PageABC.

Definition at line 93 of file HistPage.cxx.

References fHistDisp, HistDisp::Unzoom(), and HistDisp::Update().

00094 {
00095     fHistDisp->Unzoom();
00096     fHistDisp->Update();
00097 }

TObject * HistPage::Init ( Mint mint,
PageDisplay pd,
GuiBox box 
) [virtual]

Implement to fill box with whatever your page displays. If the page wishes to return a class to the initializer, then return an object which inherits from TObject, o.w. just return 0.

Reimplemented from CanvasPage.

Definition at line 41 of file HistPage.cxx.

References fMint.

00042 {
00043     this->CanvasPage::Init(mint,pd,box);
00044     fMint = mint;
00045     return 0;
00046 }

void HistPage::Rezoom ( void   )  [virtual]

Reimplemented from PageABC.

Definition at line 90 of file HistPage.cxx.

00091 {
00092 }

void HistPage::Setup (  )  [private]

Definition at line 48 of file HistPage.cxx.

References fHistDisp, fMint, CanvasPage::GetCanvas(), and Mint::GetUgliGeomHandle().

Referenced by Clear().

00049 {
00050     if (fHistDisp) return;
00051     TCanvas& can = this->GetCanvas();
00052     fHistDisp = new HistDisp(fMint->GetUgliGeomHandle(),&can);
00053 }

void HistPage::Unzoom ( void   )  [virtual]

Reimplemented from PageABC.

Definition at line 85 of file HistPage.cxx.

References fHistDisp, HistDisp::Unzoom(), and HistDisp::Update().

00086 {
00087     fHistDisp->Unzoom();
00088     fHistDisp->Update();
00089 }

void HistPage::Update ( void   )  [virtual]

Implement to respond to a change in the data.

Reimplemented from PageABC.

Definition at line 60 of file HistPage.cxx.

References HistDisp::AutoZoom(), fHistDisp, HistDisp::FillU(), HistDisp::FillV(), fMint, PlexSEIdAltL::GetBestSEId(), CandDigitHandle::GetCharge(), Mint::GetDigits(), PlexSEIdAltL::GetPlaneView(), CandDigitHandle::GetPlexSEIdAltL(), UgliGeomHandle::GetStripHandle(), UgliStripHandle::GetTPos(), Mint::GetUgliGeomHandle(), UgliStripHandle::GlobalPos(), PlaneView::kU, and HistDisp::Update().

00061 {
00062     const CandDigitListHandle* cdlh = fMint->GetDigits();
00063     vector<const CandDigitHandle*> dv =
00064         DataUtil::CDL2STLvector<CandDigitHandle>(*cdlh);
00065 
00066 
00067     for (size_t ind=0; ind < dv.size(); ++ind) {
00068         const CandDigitHandle& cdh = *dv[ind];
00069         float q = cdh.GetCharge();
00070         const PlexSEIdAltL &seidaltl = cdh.GetPlexSEIdAltL();
00071         UgliStripHandle ush =
00072             fMint->GetUgliGeomHandle().GetStripHandle(seidaltl.GetBestSEId());
00073         float w = ush.GetTPos();
00074         float z = ush.GlobalPos(0).Z();
00075         if (seidaltl.GetPlaneView() == PlaneView::kU)
00076             fHistDisp->FillU(w,z,q);
00077         else
00078             fHistDisp->FillV(w,z,q);
00079     }
00080 
00081     fHistDisp->AutoZoom();
00082     fHistDisp->Update();
00083 }


Member Data Documentation

Definition at line 18 of file HistPage.h.

Referenced by AutoZoom(), Clear(), FullZoom(), Setup(), Unzoom(), Update(), and ~HistPage().

Mint* HistPage::fMint [private]

Definition at line 17 of file HistPage.h.

Referenced by Init(), Setup(), and Update().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1