#include <TimeHist.h>
Inheritance diagram for TimeHist:

Public Member Functions | |
| TimeHist () | |
| virtual | ~TimeHist () |
| void | Refresh () |
| void | SetMint (Mint *mint) |
| void | Draw (Option_t *="") |
Private Member Functions | |
| TimeHist (const TimeHist &rhs) | |
| TimeHist & | operator= (const TimeHist &rhs) |
| void | UpdatePad () |
Private Attributes | |
| ZoomPad * | fPad |
| TH1F * | fHist |
| SigC::Ptr< RangeDouble > | fTimeRange |
Definition at line 30 of file TimeHist.h.
| TimeHist::TimeHist | ( | ) |
Definition at line 24 of file TimeHist.cxx.
References fHist, fPad, and ZoomPad::SetScales().
00025 : fPad(0) 00026 , fHist(0) 00027 { 00028 fPad = new ZoomPad("TimeHistPad","Time Hist Pad"); 00029 fPad->SetScales(1.0e9,1.0); 00030 fPad->Draw(); 00031 00032 TVirtualPad* old_pad = gPad; 00033 00034 fPad->cd(); 00035 fHist = new TH1F("TimeHist","Digit Times (ns)",100,0,100); 00036 fHist->Draw(); 00037 00038 gPad = old_pad; 00039 }
| TimeHist::~TimeHist | ( | ) | [virtual] |
| TimeHist::TimeHist | ( | const TimeHist & | rhs | ) | [private] |
| void TimeHist::Draw | ( | Option_t * | = "" |
) |
Definition at line 46 of file TimeHist.cxx.
References fPad.
Referenced by PageDisplay::MakeTimeHist().
00047 { 00048 fPad->Draw(); 00049 }
| void TimeHist::Refresh | ( | ) | [virtual] |
Implements MintView.
Definition at line 64 of file TimeHist.cxx.
References fHist, Mint::GetDigits(), MintView::GetMint(), Mint::GetTimeRange(), Range< TYPE >::Max(), Range< TYPE >::Min(), Munits::ns, and UpdatePad().
Referenced by PageDisplay::MakeTimeHist(), UserHist::Refresh(), SetMint(), and PageDisplay::UpdateDisplay().
00065 { 00066 // cerr << "TimeHist::Refresh()\n"; 00067 00068 fHist->Reset(); 00069 fHist->SetFillColor(2); 00070 fHist->SetFillStyle(1001); 00071 00072 const CandDigitListHandle *cdlh = this->GetMint().GetDigits(); 00073 if (! cdlh) return; 00074 00075 RangeDouble& r = this->GetMint().GetTimeRange(); 00076 fHist->SetBins(100,r.Min()/Munits::ns, r.Max()/Munits::ns); 00077 00078 vector<const CandDigitHandle*> dc = CDL2STLvector<const CandDigitHandle>(*cdlh); 00079 00080 int siz = dc.size(); 00081 for (int ind=0; ind < siz; ++ind) { 00082 fHist->Fill(dc[ind]->GetTime()/Munits::ns,dc[ind]->GetCharge()); 00083 } 00084 this->UpdatePad(); 00085 }
| void TimeHist::SetMint | ( | Mint * | mint | ) | [virtual] |
Reimplemented from MintView.
Definition at line 50 of file TimeHist.cxx.
References Mint::GetTimeRange(), Range< TYPE >::modified, Refresh(), and MintView::SetMint().
Referenced by PageDisplay::MakeTimeHist(), and UserHist::UserHist().
00051 { 00052 this->MintView::SetMint(mint); 00053 00054 mint->GetTimeRange().modified.connect(slot_class(*this,&TimeHist::Refresh)); 00055 00056 }
| void TimeHist::UpdatePad | ( | ) | [private] |
Definition at line 58 of file TimeHist.cxx.
References fPad, and ZoomPad::Update().
Referenced by Refresh().
TH1F* TimeHist::fHist [private] |
ZoomPad* TimeHist::fPad [private] |
SigC::Ptr<RangeDouble> TimeHist::fTimeRange [private] |
Definition at line 55 of file TimeHist.h.
1.4.7