HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hrecomonitor.cxx
Go to the documentation of this file.
1 //
2 // Demo code for harpo analyse framework in C++ and Root
3 //
4 
5 #include <stdlib.h>
6 #include <stdio.h>
7 #include <iostream>
8 
9 #include "HarpoConfig.h"
10 #include "HarpoReader.h"
11 #include "HarpoEvent.h"
12 #include "HarpoRunHeader.h"
13 //#include "HarpoAnalyseRecoMonitor.h"
14 #include "HarpoRecoMonitorGui.h"
15 
16 #include "TROOT.h"
17 #include "TStyle.h"
18 #include "TApplication.h"
19 
20 int main(int argc, char **argv)
21 {
22  // Long_t processed = -1; // Processed events counter , negative on error
24 
25  TApplication *theApp = new TApplication("App", 0, 0);
26  gROOT->SetStyle("Plain");
27  gStyle->SetPalette(1);
28  HarpoRecoMonitorGui mainWin(gClient->GetRoot(),10,10,kMainFrame | kHorizontalFrame, argc, argv);
29 
30  theApp->Run();
31  return 0;
32 
33 
34  // HarpoRunHeader *hdr;
35  // //HarpoEvent *hevent;
36  // // gDebug = 1;
37  // HarpoConfig::gHReaderType = hRootReader;
38  // HarpoConfig *cfg = new HarpoConfig(argc,argv);
39  // cfg->Init();
40 
41  // cfg->print();
42 
43  // HarpoReader *rdr = new HarpoReader( cfg );
44 
45  // if ( rdr->Init(hNoCMPTime) ) {
46  // hdr = rdr->GetRunHeader();
47  // hdr->print();
48  // }
49  // else
50  // {
51  // printf ("Int ERROR exiting ...\n");
52  // return 1;
53  // }
54 
55  // TApplication *theApp = new TApplication("App", &argc, argv);
56  // gROOT->SetStyle("Plain"); gStyle->SetPalette(1);
57 
58  // // theApp->Run();
59 
60  // HarpoAnalyseRecoMonitor *hana = new HarpoAnalyseRecoMonitor();
61 
62  // hana-> Init(); // if errors ???
63 
64  // rdr->SetAnalyseFunction(hana);
65 
66  // //if ( rdr->NextEvent() ) printf("\n Next Event OK\n");
67  // //processed = rdr->Loop();
68 
69  // Int_t evt = 0;
70  // while(1){
71  // Int_t test = rdr->Find(evt);
72  // if(!rdr->Find(evt)) break;
73  // HarpoEvent* event = rdr->GetEvent();
74  // hana->ProcessEvent(event);
75 
76 
77  // Int_t iscan;
78  // printf("Event %d done. Show event (0 to next): ",evt);
79  // // scanf("%d",&iscan);
80  // //char *iscan;
81  // std::cin >> iscan;
82  // if(iscan==0) evt++;
83  // else evt = iscan;
84  // }
85 
86  // printf("\n Done processed Events %li\n",processed);
87 
88  // theApp->Run();
89 
90  // delete hana;
91  // delete rdr;
92  // delete cfg;
93 
94  return 0;
95 }
96 
97 
98 
Harpo Event Simulation.
Definition: HarpoConfig.h:32
int main(int argc, char **argv)
static hReaderType gHReaderType
Reader Type.
Definition: HarpoConfig.h:179
GUI for monitoring/testing reconstruction processes.