HepMC3 event record library: HepMC3ViewerFrame Class Reference

HepMC3 event record library

Public Member Functions | Private Attributes | Static Private Attributes
HepMC3ViewerFrame Class Reference

## Detailed Description

Definition of class HepMC3ViewerFrame used for simple GUI viewer.

Definition of class HepMC3ViewerFrame.

Definition at line 34 of file HepMC3ViewerFrame.h.

`#include <HepMC3ViewerFrame.h>`

Inheritance diagram for HepMC3ViewerFrame:
[legend]
Collaboration diagram for HepMC3ViewerFrame:
[legend]

## Public Member Functions
void | ReadFile (const char *a)
| Open file.
| HepMC3ViewerFrame (const TGWindow *p, UInt_t w, UInt_t h)
| Constructor.
virtual | ~HepMC3ViewerFrame ()
| Destructor.
void | DrawEvent ()
| Draw evemt.
void | DoAnalysis ()
| Do analysis.
void | NextEvent ()
| slot
void | PreviousEvent ()
| slot
void | ClearEventCache ()
| slot
void | ChooseInput ()
| slot

## Private Attributes
TGCompositeFrame * | fMainFrame
| Main frame.
TGCompositeFrame * | fButtonFrame
| Button frame.
TGTextButton * | fNextEvent
| Button.
TGTextButton * | fPreviousEvent
| Button.
TGTextButton * | fExit
| Button.
TGTextButton * | fChooseInput
| Button.
TGTextButton * | fClearEventCache
| Button.
TRootEmbeddedCanvas * | fEmbEventImageCanvas
| Event canvas.
TRootEmbeddedCanvas * | fEmbAnalysisCanvas
| Analysis canvas.
std::shared_ptr< HepMC3::Reader > | fReader
| Reader.
HepMC3::GenEvent * | fCurrentEvent
| Event.
std::vector< HepMC3::GenEvent * > | fEventsCache
| Cache of events.
TCanvas * | fEventImageCanvas
| Event canvas.
TCanvas * | fAnalysisCanvas
| Analysis canvas.
TImage * | fGraphImage
| Image passed from graphviz.
std::map< std::string, TH1 * > | fAnalysisH
| Analysis histograms.

## Static Private Attributes
static const size_t | m_char_buffer_size =100000
| Size of writer buffer.

## Constructor & Destructor Documentation

## ◆ HepMC3ViewerFrame()

HepMC3ViewerFrame | ( | const TGWindow * | p,
|  | UInt_t | w,
|  | UInt_t | h )

Constructor.

Definition at line 276 of file HepMC3ViewerFrame.cc.

References fAnalysisCanvas, fButtonFrame, fChooseInput, fClearEventCache, fCurrentEvent, fEmbAnalysisCanvas, fEmbEventImageCanvas, fEventImageCanvas, fExit, fGraphImage, fMainFrame, fNextEvent, fPreviousEvent, and fReader.

## ◆ ~HepMC3ViewerFrame()

~HepMC3ViewerFrame | ( |  | ) |
| virtual

Destructor.

Definition at line 333 of file HepMC3ViewerFrame.cc.

References fMainFrame, and fReader.

## Member Function Documentation

## ◆ ChooseInput()

void ChooseInput | ( |  | ) |

slot

Definition at line 264 of file HepMC3ViewerFrame.cc.

References HepMC3::deduce_reader(), and fReader.

## ◆ ClearEventCache()

void ClearEventCache | ( |  | ) |

slot

Definition at line 222 of file HepMC3ViewerFrame.cc.

References fCurrentEvent, and fEventsCache.

## ◆ DoAnalysis()

void DoAnalysis | ( |  | ) |

Do analysis.

Definition at line 168 of file HepMC3ViewerFrame.cc.

References fAnalysisCanvas, fAnalysisH, fCurrentEvent, and fEmbAnalysisCanvas.

## ◆ DrawEvent()

void DrawEvent | ( |  | ) |

Draw evemt.

Definition at line 138 of file HepMC3ViewerFrame.cc.

References DoAnalysis(), fCurrentEvent, fEmbEventImageCanvas, fEventImageCanvas, fGraphImage, and m_char_buffer_size.

## ◆ NextEvent()

void NextEvent | ( |  | ) |

slot

Definition at line 242 of file HepMC3ViewerFrame.cc.

References DrawEvent(), fCurrentEvent, fEventsCache, and fReader.

## ◆ PreviousEvent()

void PreviousEvent | ( |  | ) |

slot

Definition at line 228 of file HepMC3ViewerFrame.cc.

References DrawEvent(), fCurrentEvent, and fEventsCache.

## ◆ ReadFile()

void ReadFile | ( | const char * | a | ) |

Open file.

Definition at line 238 of file HepMC3ViewerFrame.cc.

References HepMC3::deduce_reader(), and fReader.

## Field Documentation

## ◆ fAnalysisCanvas

TCanvas* fAnalysisCanvas
| private

Analysis canvas.

Definition at line 50 of file HepMC3ViewerFrame.h.

## ◆ fAnalysisH

std::map<std::string, TH1*> fAnalysisH
| private

Analysis histograms.

Definition at line 52 of file HepMC3ViewerFrame.h.

## ◆ fButtonFrame

TGCompositeFrame* fButtonFrame
| private

Button frame.

Definition at line 38 of file HepMC3ViewerFrame.h.

## ◆ fChooseInput

TGTextButton* fChooseInput
| private

Button.

Definition at line 42 of file HepMC3ViewerFrame.h.

## ◆ fClearEventCache

TGTextButton* fClearEventCache
| private

Button.

Definition at line 43 of file HepMC3ViewerFrame.h.

## ◆ fCurrentEvent

HepMC3::GenEvent* fCurrentEvent
| private

Event.

Definition at line 47 of file HepMC3ViewerFrame.h.

## ◆ fEmbAnalysisCanvas

TRootEmbeddedCanvas* fEmbAnalysisCanvas
| private

Analysis canvas.

Definition at line 45 of file HepMC3ViewerFrame.h.

## ◆ fEmbEventImageCanvas

TRootEmbeddedCanvas* fEmbEventImageCanvas
| private

Event canvas.

Definition at line 44 of file HepMC3ViewerFrame.h.

## ◆ fEventImageCanvas

TCanvas* fEventImageCanvas
| private

Event canvas.

Definition at line 49 of file HepMC3ViewerFrame.h.

## ◆ fEventsCache

std::vector<HepMC3::GenEvent*> fEventsCache
| private

Cache of events.

Definition at line 48 of file HepMC3ViewerFrame.h.

## ◆ fExit

TGTextButton* fExit
| private

Button.

Definition at line 41 of file HepMC3ViewerFrame.h.

## ◆ fGraphImage

TImage* fGraphImage
| private

Image passed from graphviz.

Definition at line 51 of file HepMC3ViewerFrame.h.

## ◆ fMainFrame

TGCompositeFrame* fMainFrame
| private

Main frame.

Definition at line 37 of file HepMC3ViewerFrame.h.

## ◆ fNextEvent

TGTextButton* fNextEvent
| private

Button.

Definition at line 39 of file HepMC3ViewerFrame.h.

## ◆ fPreviousEvent

TGTextButton* fPreviousEvent
| private

Button.

Definition at line 40 of file HepMC3ViewerFrame.h.

## ◆ fReader

std::shared_ptr<HepMC3::Reader> fReader
| private

Reader.

Definition at line 46 of file HepMC3ViewerFrame.h.

## ◆ m_char_buffer_size

const size_t m_char_buffer_size =100000
| staticprivate

Size of writer buffer.

Definition at line 53 of file HepMC3ViewerFrame.h.

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

- HepMC3ViewerFrame.h
- HepMC3ViewerFrame.cc