HepMC3 event record library: main.cc Source File

HepMC3 event record library

main.cc
1#include <TApplication.h>
2#include "HepMC3ViewerFrame.h"
3int main(int argc, char **argv)
4{
5 if (argc > 2)
6 {
7 fprintf(stderr, "%s: only one optional argument is supported: the name of file to open.\n", argv[0]);
8 return 1;
9 }
10 TApplication theApp("App", &argc, argv);
11
12 if (gROOT->IsBatch())
13 {
14 fprintf(stderr, "%s: cannot run in batch mode\n", argv[0]);
15 return 1;
16 }
17 HepMC3ViewerFrame *G = new HepMC3ViewerFrame(gClient->GetRoot(), 350, 80);
18 if (theApp.Argc() > 1) G->ReadFile(theApp.Argv()[1]);
19 theApp.Run();
20}
HepMC3ViewerFrame
Definition of class HepMC3ViewerFrame used for simple GUI viewer.
Definition HepMC3ViewerFrame.h:35
HepMC3ViewerFrame::ReadFile
void ReadFile(const char *a)
Open file.
Definition HepMC3ViewerFrame.cc:238