1 |
querten |
1.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 |
querten |
1.5 |
#define _CRT_SECURE_NO_DEPRECATE 1
|
12 |
querten |
1.1 |
|
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 |
|
|
#define C_EVENT 10000 // Contains Chunks related to the Event
|
32 |
|
|
// [10000,19999] is reserved for Event data
|
33 |
|
|
|
34 |
|
|
#define C_SIM 11000 // Contains Chunks related to Simulation
|
35 |
|
|
// [11000,11999] is reserved for Simulation data
|
36 |
|
|
#define C_SIM_TRACKHIT 11010 // Contains PSimHits
|
37 |
|
|
#define C_SIM_CALOHIT 11020 // Contains PCaloHits
|
38 |
|
|
#define C_SIM_VERTEX 11030 // Contains SimVertex
|
39 |
|
|
#define C_SIM_TRACK 11040 // Contains SimTracks
|
40 |
|
|
|
41 |
|
|
#define C_RECO 12000 // Contains Chunks related to Reconstruction
|
42 |
|
|
// [12000,12999] is reserved for Reconstruction data
|
43 |
querten |
1.2 |
#define C_RECO_TRACK 12110 // Contains Chunks related to RecoTracks
|
44 |
querten |
1.5 |
#define C_RECO_TRACKHIT 12111 // Contains RecHits
|
45 |
querten |
1.10 |
#define C_RECO_TRACKINFO 12112 // Contains Pt, Collection, Chi2
|
46 |
querten |
1.5 |
|
47 |
|
|
#define C_RECO_ECALHIT 12210 // Contains Chunks related to Ecal Clusters/Hits
|
48 |
|
|
#define C_RECO_HCALHIT 12310 // Contains Chunks related to Hcal Clusters/Hits
|
49 |
querten |
1.1 |
|
50 |
querten |
1.8 |
#define C_RECO_MUONSEG 12410 // Contains Chunks related to Muon Segment
|
51 |
|
|
#define C_RECO_MUONHIT 12420 // Contains Chunks related to Muon Hits
|
52 |
|
|
|
53 |
querten |
1.1 |
#define C_GEOMETRY 20000 // Contains Chunks related to the Geometry
|
54 |
|
|
// [20000,29999] is reserved for geometry
|
55 |
|
|
|
56 |
querten |
1.9 |
|
57 |
querten |
1.2 |
#define C_TRACKER 21000 // Contains Chunks related to the Tracker Geometry
|
58 |
|
|
// [21000,21999] is reserved for the Tracker Geometry
|
59 |
querten |
1.9 |
#define C_TRACKER_MOD 21100 // Contains data of a Module
|
60 |
querten |
1.2 |
|
61 |
|
|
|
62 |
querten |
1.3 |
#define C_ECAL 22000 // Contains Chunks related to the ECAL Geometry
|
63 |
querten |
1.4 |
// [22000,22999] is reserved for the ECAL Geometry
|
64 |
querten |
1.9 |
#define C_ECAL_MOD 22100 // Contains data of a Module
|
65 |
querten |
1.3 |
|
66 |
querten |
1.4 |
|
67 |
|
|
#define C_HCAL 23000 // Contains Chunks related to the HCAL Geometry
|
68 |
|
|
// [23000,23999] is reserved for the HCAL Geometry
|
69 |
querten |
1.9 |
#define C_HCAL_MOD 23100 // Contains data of a Module
|
70 |
querten |
1.4 |
|
71 |
querten |
1.3 |
|
72 |
querten |
1.6 |
#define C_MUON 24000 // Contains Chunks related to the Muon Geometry
|
73 |
querten |
1.7 |
// [24000,24999] is reserved for the Muon Geometry
|
74 |
querten |
1.9 |
#define C_MUON_MOD 24100 // Contains data of a Module
|
75 |
querten |
1.1 |
|
76 |
querten |
1.11 |
#define C_FWD 25000 // Contains Chunks related to the FWD Geometry
|
77 |
|
|
// [23000,23999] is reserved for the FWD Geometry
|
78 |
|
|
#define C_FWD_MOD 25100 // Contains data of a Module
|
79 |
|
|
|
80 |
querten |
1.1 |
|
81 |
|
|
void ReadChunk (FILE* pFile, stChunk* pChunk);
|
82 |
|
|
void WriteChunk(FILE* pFile, stChunkToSave* pChunk);
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
#endif
|