ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FastOpenGlDisplayer/soft/main.h
(Generate patch)

Comparing UserCode/FastOpenGlDisplayer/soft/main.h (file contents):
Revision 1.6 by querten, Sat Apr 19 14:34:58 2008 UTC vs.
Revision 1.21 by querten, Sun Jun 8 06:41:29 2008 UTC

# Line 6 | Line 6
6   #ifndef _MAIN_H__
7   #define _MAIN_H__
8  
9
9   #ifdef linux
10   #include <GL/gl.h>
11   #include <GL/glu.h>
12 < #include "../interface/glut.h"
12 > #include "Includes/GLUT/glut.h"
13 > #include <ext/hash_map>
14 > using namespace __gnu_cxx;
15 > typedef hash_map<unsigned int, char*, hash<unsigned int>, equal_to<unsigned int> > HASH_Map;
16   #else
17   #define _CRT_SECURE_NO_DEPRECATE 1
18 < #include <windows.h>
18 > #include <windows.h>
19   #include <gl/gl.h>
20   #include <gl/glu.h>
21   #include <gl/glut.h>
# Line 22 | Line 24
24   #pragma comment (lib,"opengl32.lib")
25   #pragma comment (lib,"glut.lib")
26   #pragma comment (lib,"glut32.lib")
27 +
28 + #include <hash_map>
29 + using namespace stdext;
30 + typedef hash_map<unsigned int, char*, hash_compare<unsigned int, std::less<unsigned int> > > HASH_Map;
31   #endif
32 +
33 +
34 + HASH_Map test;
35 +
36 + #include <time.h>
37 + time_t start;
38 + time_t end;
39  
40   #include <stdio.h>
41   #include <math.h>
42  
43   #include "../interface/SimEvent.h"
44   #include "../interface/Geometry.h"
45 + #include "../interface/DetId.h"
46 +
47 + #include "Includes/FROG/FROG_Define.h"
48 + #include "Includes/FROG/FROG_Element_Tools.h"
49 +
50 + #include "Includes/FROG/DrawPrimitive.h"
51 + #include "Includes/FROG/Logo.h"
52 + #include "Includes/FROG/Texture.h"
53 + #include "Includes/FROG/ReadCards.h"
54 + #include "Includes/FROG/FROG_Struct.h"
55 + #include "Includes/FROG/FROG_Camera.h"
56 + #include "Includes/FROG/ObjectInfo.h"
57  
58 < #include "DrawPrimitive.h"
59 < #include "ScreenShot.h"
35 < #include "Logo.h"
36 < #include "Texture.h"
37 < #include "ReadCards.h"
38 < #include "FROG_Struct.h"
58 >
59 > FROG_Element_Base *prim2;
60  
61   int SAVE_WINDOW_W = 800;
62   int SAVE_WINDOW_H = 600;
63   int SAVE_WINDOW_X = 10;
64   int SAVE_WINDOW_Y = 10;
65  
66 < bool FULLSCREEN = false;
67 < int WINDOW_WIDTH = 800;
68 < int WINDOW_HEIGHT = 600;
69 < int SCREENSHOT = 0;
70 <
71 < float CAM_R  = 700;
72 < float CAM_tx = 0.0;
73 < float CAM_ty = 0.0;
66 >
67 > bool  FULLSCREEN        = false;
68 > int   WINDOW_WIDTH      = 800;
69 > int   WINDOW_HEIGHT     = 600;
70 > int   SCREENSHOT        = 0;
71 > char* SCREENSHOT_FORMAT = new char[255];
72 >
73 > int TEMP_I = 0;
74 >
75 > FROG_Camera Cam;
76  
77   int CMS_TRACKER_RADIUS = 129;
78   int CMS_TRACKER_LENGTH = 300;
# Line 58 | Line 81 | int TRACKING_RADIUS = 129;//295;
81   int TRACKING_LENGTH = 300;//645;
82  
83   float PT_CUTOFF = 1.0;
84 < float EHCAL_CUTOFF = 4.0;
85 < float EECAL_CUTOFF = 4.0;
84 > double EECAL_CUTOFF[3] = {0.2,0.6,0.0001};
85 > double EHCAL_CUTOFF[4] = {1.5,1.5,0.5,5.0};
86  
87   bool MouseStates[3];
88  
89   std::vector<GLuint> theSimTracks;
90 < GLuint theGeomMuon[3];
90 >
91   GLuint theGeomMuonInEvent;
69 GLuint theGeomTracker[6];
92   GLuint theGeomTrackerInEvent;
71 GLuint theGeomEcal[3];
93   GLuint theGeomEcalInEvent;
73 GLuint theGeomHcal[4];
94   GLuint theGeomHcalInEvent;
95 <
95 > GLuint theGeomFwdInEvent;
96   GLuint LogoTexture;
97  
98   double t = 0;
99  
100   std::string inputVisFile;
101   std::string inputTrackerGeom;
102 + std::string inputMuonGeom;
103   std::string inputEcalGeom;
104   std::string inputHcalGeom;
105 < std::string inputMuonGeom;
105 > std::string inputFwdGeom;
106 >
107  
108   MySimEvent*  event;
109   MySimEvents* events;
110  
111   Geometry* geom;
112  
113 < char gTracker   = 0;
114 < char gEcal      = 0;
93 < char gHcal      = 0;
94 < char gMuon      = 0;
95 < char gSim       = 2;
96 < char gReco      = 7;
113 > char gSim       = 0;
114 > char gReco      = 15;
115  
116 < int   mTrackI   = -1;
116 > unsigned int mCLicked_DetId = 0;
117 > bool mDisplayMother  = false;
118 > int  mObj_I     = -1;
119 > int  mColl_I    = -1;
120   bool mLoading   = true;
121   int  mLoading_I = 0;
122  
# Line 103 | Line 124 | int eventNumber = 0;
124  
125   bool  mHelpScreen= false;
126   bool  mRotate    = true;
127 +
128 +
129 + bool stateChanged = false;
130   float mDt                = 0.005f;
131  
132 + bool print_FrameWork = false;
133  
109 GLint Menu_Geom_Tracker = 0;
110 GLint Menu_Geom_Ecal    = 0;
111 GLint Menu_Geom_Hcal    = 0;
112 GLint Menu_Geom_Muon    = 0;
134   GLint Menu_Geom         = 0;
135   GLint Menu_SimEvent     = 0;
136   GLint Menu_RecoEvent    = 0;
# Line 120 | Line 141 | WidthAndColor WaC_Txt               = {1
141   WidthAndColor WaC_CMS_Framework     = {1.0 , 1.0 , 0.5 , 1.0 , 0.3};
142   WidthAndColor WaC_LHC_Axis          = {3.0 , 1.0 , 0.5 , 1.0 , 0.3};
143   WidthAndColor WaC_Default_SimTrack  = {2.0 , 0.0 , 1.0 , 1.0 , 1.0};
144 < WidthAndColor WaC_Selected_SimTrack = {2.0 , 1.0 , 1.0 , 0.0 , 1.0};
144 > WidthAndColor WaC_Selected_Object   = {2.0 , 1.0 , 1.0 , 0.0 , 1.0};
145 >
146 > std::vector<IdAndWidthAndColor*> WaC_SimTracks;
147 > std::vector<IdAndWidthAndColor*> WaC_RecoTracks;
148  
149   void DrawTrack(MySimTrack* track, MySimVertex* vertex1, MySimVertex* vertex2);
150   void reshape (int w, int h);
151   void display();
152 < void initGeomMuon();
129 < void initGeomMuonInEvent();
130 < void initGeomTracker();
152 >
153   void initGeomTrackerInEvent();
154 < void initGeomEcal();
154 > void initGeomMuonInEvent();
155   void initGeomEcalInEvent();
134 void initGeomHcal();
156   void initGeomHcalInEvent();
157 + void initGeomFwdInEvent();
158 + void defineColorForSimTrack(int i);
159  
160   void initSimTrack();
161   void init();
162   void menu_callback(int value);
163   void menu_create();
164   void LoadCard(const char* inputCard );
165 + void gl_select(int x, int y);
166 + void list_hits(GLint hits, GLuint *names);
167  
168   #endif
169  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines