ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FastOpenGlDisplayer/interface/Chunk.h
Revision: 1.12
Committed: Sun Jun 8 06:42:32 2008 UTC (16 years, 11 months ago) by querten
Content type: text/plain
Branch: MAIN
Changes since 1.11: +74 -37 lines
Log Message:
Geometry changed to allow display of custom geometry

File Contents

# Content
1 // Chunk.h: Contains everything related to chunk.
2 // Structure declaration
3 // List of Chunk ID
4 // ...
5 //
6 //////////////////////////////////////////////////////////////////////
7
8 #ifndef _CHUNK_H__
9 #define _CHUNK_H__
10
11 #define _CRT_SECURE_NO_DEPRECATE 1
12
13 #include <stdio.h>
14 #include <vector>
15
16 struct stChunk{ unsigned short type;
17 unsigned int size;
18 unsigned int read; };
19
20 struct stChunkToSave{ unsigned short type;
21 unsigned int size;
22 void* data;
23 void* buffer;
24 std::vector<stChunkToSave*> daughters; };
25
26
27 #define C_PRIMARY 55555 // Primary ChunkId
28 // Other Chunks are daughters of
29 // this PrimaryChunk
30
31
32 #define C_FEB_DETID 1000 // Contains a FROG_ELEMENT_BASE_WITH_DETID
33 #define C_FEB_DETID_COMPACT 2000 // Contains a FROG_ELEMENT_BASE_WITH_DETID
34
35
36
37
38 #define C_EVENT 10000 // Contains Chunks related to the Event
39 // [10000,19999] is reserved for Event data
40
41 #define C_SIM 11000 // Contains Chunks related to Simulation
42 // [11000,11999] is reserved for Simulation data
43 #define C_SIM_TRACKHIT 11010 // Contains PSimHits
44 #define C_SIM_CALOHIT 11020 // Contains PCaloHits
45 #define C_SIM_VERTEX 11030 // Contains SimVertex
46 #define C_SIM_TRACK 11040 // Contains SimTracks
47
48 #define C_RECO 12000 // Contains Chunks related to Reconstruction
49 // [12000,12999] is reserved for Reconstruction data
50 #define C_RECO_TRACK 12110 // Contains Chunks related to RecoTracks
51 #define C_RECO_TRACKHIT 12111 // Contains RecHits
52 #define C_RECO_TRACKINFO 12112 // Contains Pt, Collection, Chi2
53
54 #define C_RECO_ECALHIT 12210 // Contains Chunks related to Ecal Clusters/Hits
55 #define C_RECO_HCALHIT 12310 // Contains Chunks related to Hcal Clusters/Hits
56
57 #define C_RECO_MUONSEG 12410 // Contains Chunks related to Muon Segment
58 #define C_RECO_MUONHIT 12420 // Contains Chunks related to Muon Hits
59
60 #define C_GEOMETRY 20000 // Contains Chunks related to the Geometry
61 // [20000,29999] is reserved for geometry
62
63
64 #define C_TRACKER 21000 // Contains Chunks related to the Tracker Geometry
65 // [21000,21999] is reserved for the Tracker Geometry
66 #define C_TRACKER_MOD 21100 // Contains data of a Module
67
68
69 #define C_CALO_MOD 11999 // Contains data of a CaloModule //CHUNCK ID TO FIX
70
71 #define C_ECAL 22000 // Contains Chunks related to the ECAL Geometry
72 // [22000,22999] is reserved for the ECAL Geometry
73 #define C_ECAL_MOD 22100 // Contains data of a Module
74
75
76
77 #define C_HCAL 23000 // Contains Chunks related to the HCAL Geometry
78 // [23000,23999] is reserved for the HCAL Geometry
79 #define C_HCAL_MOD 23100 // Contains data of a Module
80
81
82
83
84 #define C_MUON 24000 // Contains Chunks related to the Muon Geometry
85 // [24000,24999] is reserved for the Muon Geometry
86 #define C_MUON_MOD 24100 // Contains data of a Module
87
88 #define C_FWD 25000 // Contains Chunks related to the FWD Geometry
89 // [23000,23999] is reserved for the FWD Geometry
90 #define C_FWD_MOD 25100 // Contains data of a Module
91
92
93
94 #define C_PRIMITIVE 40000 // Contains Chunks related to Primtive (very basic shape)
95 // [40000,49999] is reserved for primitive
96
97 #define C_PRIMITIVE_SOLID 41000 // Contains Chunks related to Solid Primtive (Cube, Sphere, ...)
98 // [41000,41999] is reserved for primitive
99
100 #define C_PRIMITIVE_CUSTOM_CUBE 41010 // Contains a custom solid defined by 8 corners
101 #define C_PRIMITIVE_CUBE 41020 // Contains a cube
102 #define C_PRIMITIVE_SPHERE 41030 // Contains a sphere
103 #define C_PRIMITIVE_PARTIALSPHERE 41031 // Contains a sphere
104 #define C_PRIMITIVE_CYLINDER 41040 // Contains a cylinder
105
106 #define C_PRIMITIVE_SURFACE 42000 // Contains Chunks related to Surface Primtive (Plane, Disc, ...)
107 // [42000,42999] is reserved for primitive
108
109 #define C_PRIMITIVE_CUSTOM_SURFACE 42010 // Contains a custom surface defined by 4 corners
110 #define C_PRIMITIVE_RECTANGLE 42020 // Contains a rectangle
111 #define C_PRIMITIVE_DISC 42030 // Contains a disc
112
113 #define C_PRIMITIVE_LINES 43000 // Contains Chunks related to Lines Primtive (Line Segment, Circle, ...)
114 #define C_PRIMITIVE_POINT 43010 // Contains Chunks related to Lines Primtive (Line Segment, Circle, ...)
115 #define C_PRIMITIVE_LINE 43020 // Contains Chunks related to Lines Primtive (Line Segment, Circle, ...)
116 #define C_PRIMITIVE_CIRCLE 43030 // Contains Chunks related to Lines Primtive (Line Segment, Circle, ...)
117
118 void ReadChunk (FILE* pFile, stChunk* pChunk);
119 void WriteChunk(FILE* pFile, stChunkToSave* pChunk);
120
121
122 #endif