AltTimeHist Class Reference

#include <AltTimeHist.h>

Inheritance diagram for AltTimeHist:
MintView

List of all members.

Public Member Functions

 AltTimeHist ()
virtual ~AltTimeHist ()
void Refresh ()
void SetMint (Mint *mint)
void Draw (Option_t *="")
void SetTotTimeRange (RangeDouble &r)
TPad * GetAltTimePad ()

Private Member Functions

 AltTimeHist (const AltTimeHist &rhs)
AltTimeHistoperator= (const AltTimeHist &rhs)
void UpdatePad ()

Private Attributes

TPad * fPad
TH1F * fHist1
TH1F * fHist2
RangeDouble fTotTimeRange

Detailed Description

Id
AltTimeHist.h,v 1.1 2003/11/07 22:00:31 musser Exp

Definition at line 31 of file AltTimeHist.h.


Constructor & Destructor Documentation

AltTimeHist::AltTimeHist (  ) 

Definition at line 24 of file AltTimeHist.cxx.

References fHist1, fHist2, and fPad.

00025     : fPad(0)
00026     , fHist1(0)
00027     , fHist2(0)
00028 {
00029 
00030   fPad = new TPad("Alt Time Hist2", "Alt Time Hist2", 0.42,0.25,0.75,0.44);
00031   fPad->Draw();
00032   
00033   fPad->cd();
00034   fHist1 = new TH1F("AltTimeHist","Digit Times (ns)",100,0,100);
00035   fHist2 = new TH1F("AltTimeHistwin","Digit Times (ns)",100,0,100);
00036   fHist1->Draw();
00037   fHist2->Draw("same");
00038   fHist1->SetFillColor(2);
00039   fHist1->SetLineColor(2);
00040   fHist1->SetFillStyle(1001);
00041   fHist2->SetFillColor(3);
00042   fHist2->SetLineColor(3);
00043   fHist2->SetFillStyle(1001);
00044  
00045 }

AltTimeHist::~AltTimeHist (  )  [virtual]

Definition at line 48 of file AltTimeHist.cxx.

00049 {
00050 }

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

Member Function Documentation

void AltTimeHist::Draw ( Option_t *  = ""  ) 

Definition at line 52 of file AltTimeHist.cxx.

References fPad.

00053 {
00054     fPad->Draw();
00055 }

TPad* AltTimeHist::GetAltTimePad (  )  [inline]

Definition at line 46 of file AltTimeHist.h.

References fPad.

Referenced by UserHist::UserHist().

00046 {return fPad;}

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

Reimplemented from MintView.

void AltTimeHist::Refresh (  )  [virtual]

Implements MintView.

Definition at line 74 of file AltTimeHist.cxx.

References fHist1, fHist2, fTotTimeRange, OscFit::GetCharge(), Mint::GetDigits(), MintView::GetMint(), Mint::GetTimeRange(), Range< TYPE >::Max(), Range< TYPE >::Min(), Munits::ns, and UpdatePad().

Referenced by UserHist::Refresh(), and SetMint().

00075 {
00076 //    cerr << "AltTimeHist::Refresh()\n";
00077 
00078     fHist1->Reset();
00079 
00080     fHist2->Reset();
00081 
00082     const CandDigitListHandle *cdlh = this->GetMint().GetDigits();
00083     if (! cdlh) return;    
00084 
00085     RangeDouble& r = this->GetMint().GetTimeRange();
00086 
00087     if(fTotTimeRange.Max()-fTotTimeRange.Min()>0){
00088       fHist1->SetBins(300,fTotTimeRange.Min()/Munits::ns, fTotTimeRange.Max()/Munits::ns);    
00089       fHist2->SetBins(300,fTotTimeRange.Min()/Munits::ns, fTotTimeRange.Max()/Munits::ns);
00090       
00091       vector<const CandDigitHandle*> dc = CDL2STLvector<const CandDigitHandle>(*cdlh);
00092       
00093       int siz = dc.size();
00094       for (int ind=0; ind < siz; ++ind) {
00095         fHist1->Fill(dc[ind]->GetTime()/Munits::ns,dc[ind]->GetCharge());
00096       }
00097       
00098       for (int ind=0; ind < siz; ++ind) {
00099         Float_t t = dc[ind]->GetTime();
00100         if(t>r.Min() && t<r.Max()){
00101           fHist2->Fill(dc[ind]->GetTime()/Munits::ns,dc[ind]->GetCharge());
00102         }
00103       }
00104     }
00105 
00106     this->UpdatePad();
00107 }

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

Reimplemented from MintView.

Definition at line 56 of file AltTimeHist.cxx.

References Mint::GetTimeRange(), Range< TYPE >::modified, and Refresh().

Referenced by UserHist::UserHist().

00057 {
00058     this->MintView::SetMint(mint);
00059     mint->GetTimeRange().modified.connect(slot_class(*this,&AltTimeHist::Refresh));
00060         
00061 }

void AltTimeHist::SetTotTimeRange ( RangeDouble r  ) 

Definition at line 63 of file AltTimeHist.cxx.

References fTotTimeRange, Range< TYPE >::Max(), Range< TYPE >::Min(), Range< TYPE >::SetMax(), and Range< TYPE >::SetMin().

Referenced by EVD::Update().

00063                                                {
00064   fTotTimeRange.SetMin(r.Min()); 
00065   fTotTimeRange.SetMax(r.Max());
00066 }

void AltTimeHist::UpdatePad (  )  [private]

Definition at line 68 of file AltTimeHist.cxx.

References fPad.

Referenced by Refresh().

00069 {
00070     fPad->Modified();
00071     fPad->Update();
00072 }


Member Data Documentation

TH1F* AltTimeHist::fHist1 [private]

Definition at line 56 of file AltTimeHist.h.

Referenced by AltTimeHist(), and Refresh().

TH1F* AltTimeHist::fHist2 [private]

Definition at line 57 of file AltTimeHist.h.

Referenced by AltTimeHist(), and Refresh().

TPad* AltTimeHist::fPad [private]

Definition at line 55 of file AltTimeHist.h.

Referenced by AltTimeHist(), Draw(), GetAltTimePad(), and UpdatePad().

Definition at line 59 of file AltTimeHist.h.

Referenced by Refresh(), and SetTotTimeRange().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1