PedViewer Class Reference

#include <PedStudy.h>

List of all members.

Public Member Functions

 PedViewer (PedStudy &ps)
void Next ()
void Prev ()
void Update ()

Public Attributes

PedStudyps
TCanvas * colz
TCanvas * oned
PedStudy::HistMap::iterator cur
int cur_file_num

Detailed Description

Definition at line 47 of file PedStudy.h.


Constructor & Destructor Documentation

PedViewer::PedViewer ( PedStudy ps  ) 

Definition at line 165 of file PedStudy.cxx.

References colz, cur, PedStudy::fHist, Form(), oned, ps, and Update().

00166     : ps(pedstudy)
00167 {
00168     colz = new TCanvas("colz","",600,500);
00169     oned = new TCanvas("oned","",600,500);
00170     colz->AddExec("updater",Form("pedviewer_updater((void*)%d)",this));
00171     oned->AddExec("clicker",Form("pedviewer_clicker((void*)%d)",this));
00172     cur = ps.fHist.begin();
00173 
00174     this->Update();
00175         
00176 }


Member Function Documentation

void PedViewer::Next (  ) 

Definition at line 178 of file PedStudy.cxx.

References cur, PedStudy::fHist, ps, and Update().

00179 {
00180     PedStudy::HistMap::iterator next = cur;
00181     ++next;
00182     if (next == ps.fHist.end()) {
00183         cerr << "At end, looping to begin\n";
00184         cur = ps.fHist.begin();
00185     }
00186     else cur = next;
00187     this->Update();
00188 }

void PedViewer::Prev (  ) 

Definition at line 189 of file PedStudy.cxx.

References cur, PedStudy::fHist, ps, and Update().

00190 {
00191     if (cur == ps.fHist.begin()) {
00192         cerr << "At begining, looping to end\n";
00193         cur = ps.fHist.end();
00194     }
00195     --cur;
00196     this->Update();
00197 }

void PedViewer::Update (  ) 

Definition at line 199 of file PedStudy.cxx.

References PedStudy::Hists::all, colz, and cur.

Referenced by Next(), PedViewer(), and Prev().

00200 {
00201     PedStudy::Hists& h = cur->second;
00202     if (!h.all) {
00203         cerr << "No histogram to update!\n";
00204         return;
00205     }
00206 
00207     colz->cd();
00208     h.all->Draw("COLZ");
00209 }


Member Data Documentation

TCanvas* PedViewer::colz

Definition at line 52 of file PedStudy.h.

Referenced by PedViewer(), and Update().

PedStudy::HistMap::iterator PedViewer::cur

Definition at line 53 of file PedStudy.h.

Referenced by Next(), PedViewer(), pedviewer_clicker(), pedviewer_updater(), Prev(), and Update().

Definition at line 54 of file PedStudy.h.

Referenced by pedviewer_clicker(), and pedviewer_updater().

TCanvas * PedViewer::oned

Definition at line 52 of file PedStudy.h.

Referenced by PedViewer(), and pedviewer_updater().

Definition at line 51 of file PedStudy.h.

Referenced by Next(), PedViewer(), and Prev().


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

Generated on 3 Oct 2018 for loon by  doxygen 1.6.1