PmtPixels Class Reference

#include <PmtPixels.h>

Inheritance diagram for PmtPixels:

MintView List of all members.

Public Member Functions

 PmtPixels ()
 PmtPixels (double x1, double y1, double x2, double y2)
virtual ~PmtPixels ()
virtual void SetMint (Mint *mint)
virtual void Refresh ()

Private Member Functions

 PmtPixels (const PmtPixels &rhs)
PmtPixelsoperator= (const PmtPixels &rhs)
void BuildImp ()

Private Attributes

PmtPixelsMxxfImp
SigC::Connection fCon

Detailed Description

Id
PmtPixels.h,v 1.5 2007/11/11 07:13:47 rhatcher Exp

Definition at line 46 of file PmtPixels.h.


Constructor & Destructor Documentation

PmtPixels::PmtPixels (  ) 

Definition at line 17 of file PmtPixels.cxx.

00018     : TPad("PmtPixels","Signals in the PMT",0,0,1,1)
00019     , fImp(0)
00020 {
00021     cerr << "PmtPixels()\n";
00022 }

PmtPixels::PmtPixels ( double  x1,
double  y1,
double  x2,
double  y2 
)

Definition at line 23 of file PmtPixels.cxx.

00024     : TPad("PmtPixels","Signals in the PMT",x1,y1,x2,y2)
00025     , fImp(0)
00026 {
00027     cerr << "PmtPixels()\n";
00028 }

PmtPixels::~PmtPixels (  )  [virtual]

Definition at line 30 of file PmtPixels.cxx.

00031 {
00032 }

PmtPixels::PmtPixels ( const PmtPixels rhs  )  [private]


Member Function Documentation

void PmtPixels::BuildImp (  )  [private]

Definition at line 42 of file PmtPixels.cxx.

References fImp, Mint::GetDetector(), MintView::GetMint(), Detector::kFar, and Detector::kNear.

Referenced by Refresh().

00043 {
00044     // This build the implementation.  It is assumed that we only need
00045     // to build it once.
00046 
00047 
00048     Detector::Detector_t det_type = this->GetMint().GetDetector();
00049 
00050     switch (det_type) {
00051     case Detector::kNear:
00052         this->cd();
00053         fImp = new PmtPixelsMxx(8);
00054         break;
00055     case Detector::kFar:
00056         this->cd();
00057         fImp = new PmtPixelsMxx(4);
00058         break;
00059     default:
00060         delete fImp;
00061         fImp = 0;
00062         cerr << "PmtPixels::BuildImp() unknown detector type: " 
00063              << det_type << endl;
00064         break;
00065     }
00066 }

PmtPixels& PmtPixels::operator= ( const PmtPixels rhs  )  [private]

void PmtPixels::Refresh (  )  [virtual]

Implements MintView.

Definition at line 68 of file PmtPixels.cxx.

References BuildImp(), PmtPixelsMxx::Clear(), fImp, PlexSEIdAltL::GetBestItem(), CandDigitHandle::GetCharge(), Mint::GetChargeRange(), MintView::GetMint(), Mint::GetPickedDigit(), PlexSEIdAltLItem::GetPixelSpotId(), CandDigitHandle::GetPlexSEIdAltL(), Range< TYPE >::Relative(), PmtPixelsMxx::SetPixelSpot(), and EVD::Update().

Referenced by PageDisplay::MakePmtPixels(), SetMint(), and PageDisplay::UpdateDisplay().

00069 {
00070     if (!fImp) this->BuildImp();
00071     if (!fImp) return;
00072 
00073 
00074     const CandDigitHandle* cdh = this->GetMint().GetPickedDigit();
00075         
00076     if (!cdh) return;
00077 
00078     PlexPixelSpotId ppsid = 
00079         cdh->GetPlexSEIdAltL().GetBestItem().GetPixelSpotId();
00080 
00081     RangeDouble& rd = this->GetMint().GetChargeRange();
00082     double relval = rd.Relative(cdh->GetCharge());
00083 
00084     fImp->Clear();
00085     fImp->SetPixelSpot(ppsid,relval);
00086 
00087     this->TPad::Modified();
00088     this->TPad::Update();
00089 
00090     // get data from Mint and feed the imp.
00091 }

void PmtPixels::SetMint ( Mint mint  )  [virtual]

Reimplemented from MintView.

Definition at line 34 of file PmtPixels.cxx.

References Mint::digits_selected, fCon, Refresh(), and MintView::SetMint().

Referenced by PageDisplay::MakePmtPixels().

00035 {
00036     fCon.disconnect();
00037     this->MintView::SetMint(mint);
00038     fCon = mint->digits_selected.connect
00039         (SigC::slot_class(*this,&PmtPixels::Refresh));
00040 }


Member Data Documentation

SigC::Connection PmtPixels::fCon [private]

Definition at line 67 of file PmtPixels.h.

Referenced by SetMint().

PmtPixelsMxx* PmtPixels::fImp [private]

Definition at line 66 of file PmtPixels.h.

Referenced by BuildImp(), and Refresh().


The documentation for this class was generated from the following files:
Generated on Mon Aug 11 01:06:44 2014 for loon by  doxygen 1.4.7