HepMC3 event record library
HepMC3ViewerFrame.h
1 #include <TGClient.h>
2 #include <TBuffer.h>
3 #include <TGButton.h>
4 #include <TGFrame.h>
5 #include "TImage.h"
6 #include "TCanvas.h"
7 #include "TGCanvas.h"
8 #include "TRootEmbeddedCanvas.h"
9 #include <TGClient.h>
10 #include <TCanvas.h>
11 #include <TBuffer.h>
12 #include <TGButton.h>
13 #include <TGFrame.h>
14 #include "TROOT.h"
15 #include "TImage.h"
16 #include "TH1S.h"
17 #include "TGFileDialog.h"
18 
19 #include "HepMC3/GenEvent.h"
20 #include "HepMC3/Reader.h"
21 class HepMC3ViewerFrame : public TGMainFrame
22 {
23 private:
24  TGCompositeFrame *fMainFrame;
25  TGCompositeFrame *fButtonFrame;
26  TGTextButton *fNextEvent, *fPreviousEvent, *fExit, *fChooseInput,*fClearEventCache;
27  TRootEmbeddedCanvas *fEmbEventImageCanvas, *fEmbAnalysisCanvas;
28  //Reader
29  std::shared_ptr<HepMC3::Reader> fReader;
30  //Pointer to current event in cache
31  HepMC3::GenEvent *fCurrentEvent;
32  //Event cache
33  std::vector<HepMC3::GenEvent*> fEventsCache;
34  TCanvas* fEventImageCanvas, *fAnalysisCanvas;
35  //Image passed from graphviz
36  TImage *fGraphImage;
37  std::map<std::string, TH1*> fAnalysisH;
38  static const size_t m_char_buffer_size=100000;
39 public:
40  void ReadFile(const char* a);
41  HepMC3ViewerFrame(const TGWindow *p, UInt_t w, UInt_t h);
42  virtual ~HepMC3ViewerFrame();
43 //Helper functions
44 //To get image from graphviz
45  void DrawEvent();
46 //To do extra analysiz of the event
47  void DoAnalysis();
48  // slots
49  void NextEvent();
50  void PreviousEvent();
51  void ClearEventCache();
52  void ChooseInput();
53 // ClassDef(HepMC3ViewerFrame, 0)
54 };
Definition of interface Reader.
Stores event-related information.
Definition: GenEvent.h:42
Definition of class GenEvent.