Fork me on GitHub

source: svn/trunk/Utilities/FROG/main.h@ 419

Last change on this file since 419 was 100, checked in by severine ovyn, 16 years ago

Remove datacard bug + CaloTowers OK

File size: 3.8 KB
RevLine 
[95]1
2// main.h
3//
4//////////////////////////////////////////////////////////////////////
5
6#ifndef _MAIN_H__
7#define _MAIN_H__
8
[100]9#define FROG_VERSION 1.106
[95]10#define FROG_AUTHORLIST "Loic.Quertenmont@cern.ch\nVincent.Roberfroid@cern.ch"
11
12#include "Includes/GL/glew.h"
13#ifdef linux
14 #include "Includes/GL/glxew.h"
15 #include <GL/gl.h>
16 #include <GL/glu.h>
17 #include "Includes/GLUT/glut.h"
18#elif macos
19 #include "Includes/GL/glxew.h"
20 #include <OpenGL/gl.h>
21 #include <OpenGL/glu.h>
22 #include <GLUT/glut.h>
23#else
24 #include <windows.h>
25 #include <atlconv.h>
26 #include "Includes/GL/wglew.h"
27 #include <gl/gl.h>
28 #include <gl/glu.h>
29 #include <gl/glut.h>
30 #pragma comment (lib,"glaux.lib")
31 #pragma comment (lib,"glu32.lib")
32 #pragma comment (lib,"opengl32.lib")
33 #pragma comment (lib,"glut.lib")
34 #pragma comment (lib,"glut32.lib")
35 #pragma comment (lib,"Includes/CURL/Lib/libcurl.lib")
36 #pragma comment (lib,"Includes/ZLIB/Lib/zdll.lib")
37
38#endif
39
40 bool SCREENSAVER = false;
41 bool SHOOTER = false;
42
43#include <time.h>
44time_t start;
45time_t end;
46
47#include <stdio.h>
48#include <math.h>
49
50#include "Includes/FROG/FROG_Objects.h"
51#include "Includes/FROG/FROG_Events.h"
52#include "Includes/FROG/FROG_Geometry.h"
53
54#include "Includes/FROG/FROG_Fonts.h"
55#include "Includes/FROG/FROG_Element_Tools.h"
56
57#include "Includes/FROG/FROG_Texture.h"
58#include "Includes/FROG/FROG_ReadCards.h"
59#include "Includes/FROG/FROG_Net_Tools.h"
60#include "Includes/FROG/FROG_View_Tools.h"
61
62FROG_Fonts* Fonts;
63FROG_ReadCards* Card;
64FROG_Objects_Extended* frogObjects_;
65
66std::vector<FROG_View*> ActiveViews;
67FROG_View_Screen* ViewScreen;
68FROG_View* ViewMain;
69FROG_View_Menu* ViewMenu;
70
71int SAVE_WINDOW_W = 800;
72int SAVE_WINDOW_H = 600;
73int SAVE_WINDOW_X = 10;
74int SAVE_WINDOW_Y = 10;
75
76
77bool FULLSCREEN = false;
78int WINDOW_WIDTH = 800;
79int WINDOW_HEIGHT = 600;
80int SCREENSHOT = 0;
81char SCREENSHOT_FORMAT[255] = {"png"};
82
83
84
85int TEMP_I = 0;
86bool MouseStates[3];
87
88GLuint LogoTexture;
89GLuint LogoTxtTexture;
90
[100]91char ScreenShotName[1024] = {"screenshot"};
92std::string AbsolutePath;
93std::string inputConfig = "config.txt";
[95]94std::string inputVisFile;
95std::string inputVisFileFromCard;
[100]96std::vector<string> inputVisFileFromCommand;
[95]97std::vector<std::string> inputGeom;
98
99// MultiThreading Variables
100#ifdef linux
101 pthread_t Thread_H;
102#elif macos
103 pthread_t Thread_H;
104#else
105 HANDLE Thread_H = NULL;
106 DWORD Thread_Id = 0;
107#endif
108bool Thread_Run = false;
109
110float SelectedObject_color[4] = {1,1,1,1};
111int SelectedObject_Counter = 0;
112//bool SelectedObject_DrawFlag = true;
113
114bool Geometry_WireFrame = false;
115
116int updateVisFileTime = -1;
117
118FROG_Events* events;
119FROG_Element_Event* event;
120
121FROG_Geometry* geom;
122
123char gSim = 0;
124char gReco = 15;
125
126//unsigned int mCLicked_DetId = (unsigned int) -1;
127bool mDisplayMother = false;
128bool mLoading = true;
129int mLoading_I = 0;
130bool mEventChanging = true;
131
132unsigned int mAutomaticShooter_LastEvent = 0;
133bool mAutomaticShooter = false;
134
135
136int eventNumber = 0;
137int eventTime = 5;
138
139bool mHelpScreen= false;
140
141bool stateChanged = false;
142
143bool print_FrameWork = false;
144
145float BackGround_Color[4] = {0.0 , 0.0 , 0.0 , 1.0};
146float Txt_Color[4] = {0.0 , 1.0 , 1.0 , 1.0};
147float Framework_Color[4] = {1.0 , 0.5 , 1.0 , 0.3};
148float Framework_Thickness = 1.0;
149float ZAxis_Color[4] = {1.0 , 0.5 , 1.0 , 0.3};
150float ZAxis_Thickness = 3;
151
152void reshape (int w, int h);
153void display();
154void display2();
155void displayForScreenShot();
156void displaytext();
[100]157void processNormalKeys(unsigned char key, int x, int y);
158void processSpecialKeys(int key, int x, int y) ;
159void processMouse(int button, int state, int x, int y);
160void processMotion(int x, int y);
161void processPassiveMotion(int x, int y);
[95]162
163void LoadCard(const char* inputCard );
164void gl_select(int x, int y);
165void list_hits(GLint hits, GLuint *names);
166
167void AutomaticEventChanging (int Extra);
168
169
170void updateEventsFile();
171
172#endif
173
Note: See TracBrowser for help on using the repository browser.