TSimpleExampleCanvas Class Reference

#include <TSimpleExampleCanvas.hxx>

Inheritance diagram for TSimpleExampleCanvas:
Inheritance graph
[legend]
Collaboration diagram for TSimpleExampleCanvas:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TSimpleExampleCanvas ()
void ResetCanvasHistograms ()
 Reset the histograms for this canvas.
void UpdateCanvasHistograms (TDataContainer &dataContainer)
 Update the histograms for this canvas.
void PlotCanvas (TDataContainer &dataContainer, TRootEmbeddedCanvas *embedCanvas)
 Plot the histograms for this canvas.
virtual void BeginRun (int transition, int run, int time)
 Take actions at begin run.
virtual void EndRun (int transition, int run, int time)
 Take actions at end run.
std::string GetTabName ()
TRootEmbeddedCanvas * GetEmbeddedCanvas ()
 This method is only.
virtual void SetUpCompositeFrame (TGCompositeFrame *, TRootanaDisplay *display)

Private Attributes

TH1F * tdcHistogram

Detailed Description

A simple example, using V1190 data

Definition at line 15 of file TSimpleExampleCanvas.hxx.


Constructor & Destructor Documentation

TSimpleExampleCanvas::TSimpleExampleCanvas (  ) 

Definition at line 6 of file TSimpleExampleCanvas.cxx.

References tdcHistogram.

00006                                           : TCanvasHandleBase("V1190 TDC Values"){
00007 
00008   tdcHistogram = new TH1F("tdcHistogram","Histogram of all V1190 TDC value",2000,0,100000);
00009 
00010 }


Member Function Documentation

virtual void TCanvasHandleBase::BeginRun ( int  transition,
int  run,
int  time 
) [inline, virtual, inherited]

Take actions at begin run.

Reimplemented in TComplicatedExampleCanvas, and TFancyHistogramCanvas.

Definition at line 33 of file TCanvasHandleBase.hxx.

00033 {};

virtual void TCanvasHandleBase::EndRun ( int  transition,
int  run,
int  time 
) [inline, virtual, inherited]

Take actions at end run.

Reimplemented in TFancyHistogramCanvas.

Definition at line 36 of file TCanvasHandleBase.hxx.

00036 {};

TRootEmbeddedCanvas* TCanvasHandleBase::GetEmbeddedCanvas (  )  [inline, inherited]

This method is only.

Definition at line 41 of file TCanvasHandleBase.hxx.

00041                                           {
00042     std::cerr<< "Not implemented for base class; exiting." << std::endl;
00043     exit(0);
00044     return 0;
00045   }

std::string TCanvasHandleBase::GetTabName (  )  [inline, inherited]

Definition at line 38 of file TCanvasHandleBase.hxx.

References TCanvasHandleBase::fTabName.

Referenced by TRootanaDisplay::AddSingleCanvas().

00038 {return fTabName;}

Here is the caller graph for this function:

void TSimpleExampleCanvas::PlotCanvas ( TDataContainer dataContainer,
TRootEmbeddedCanvas *  embedCanvas 
) [virtual]

Plot the histograms for this canvas.

Implements TCanvasHandleBase.

Definition at line 38 of file TSimpleExampleCanvas.cxx.

References tdcHistogram.

00038                                                                                                    {
00039 
00040   TCanvas* c1 = embedCanvas->GetCanvas();
00041   c1->Clear();
00042   tdcHistogram->Draw();
00043   c1->Modified();
00044   c1->Update();
00045 }

void TSimpleExampleCanvas::ResetCanvasHistograms (  )  [virtual]

Reset the histograms for this canvas.

Implements TCanvasHandleBase.

Definition at line 15 of file TSimpleExampleCanvas.cxx.

References tdcHistogram.

00015                                                 {
00016 
00017   tdcHistogram->Reset();
00018 }

virtual void TCanvasHandleBase::SetUpCompositeFrame ( TGCompositeFrame *  ,
TRootanaDisplay display 
) [inline, virtual, inherited]

Reimplemented in TComplicatedExampleCanvas, and TFancyHistogramCanvas.

Definition at line 48 of file TCanvasHandleBase.hxx.

Referenced by TRootanaDisplay::AddSingleCanvas().

00048 {}

Here is the caller graph for this function:

void TSimpleExampleCanvas::UpdateCanvasHistograms ( TDataContainer dataContainer  )  [virtual]

Update the histograms for this canvas.

Implements TCanvasHandleBase.

Definition at line 21 of file TSimpleExampleCanvas.cxx.

References TDataContainer::GetEventData(), TDCMeasurement::GetMeasurement(), TV1190Data::GetMeasurements(), and tdcHistogram.

00021                                                                               {
00022 
00023   TV1190Data *v1190 = dataContainer.GetEventData<TV1190Data>("TDC0");
00024   if(v1190){ 
00025     
00026     std::vector<TDCMeasurement>& measurements = v1190->GetMeasurements();
00027     for(unsigned int i = 0; i < measurements.size(); i++){
00028       TDCMeasurement tdcmeas = measurements[i];
00029       tdcHistogram->Fill(tdcmeas.GetMeasurement());      
00030     }     
00031     
00032   }
00033   
00034 
00035 }

Here is the call graph for this function:


Member Data Documentation


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

Generated on 12 Feb 2016 for ROOT Analyzer by  doxygen 1.6.1