98 |
|
while(CurrentChunk->read<CurrentChunk->size){ |
99 |
|
MyRecoHit* temp_RecoHit = new MyRecoHit; |
100 |
|
CurrentChunk->read += fread(temp_RecoHit,sizeof(MyRecoHit),1,pFile) * sizeof(MyRecoHit); |
101 |
< |
MyRecoTrackCollection[MyRecoTrackCollection.size()-1]->Hits.push_back(temp_RecoHit); |
101 |
> |
MyRecoTrackCollection[MyRecoTrackCollection.size()-1]->Hits.push_back(temp_RecoHit); |
102 |
|
} |
103 |
|
}break; |
104 |
|
|
105 |
< |
case C_RECO_ECALHIT:{ // RecHits |
105 |
> |
case C_RECO_TRACKINFO:{ // TrackInfo |
106 |
> |
MyRecoTrackInfo* temp_Info = new MyRecoTrackInfo; |
107 |
> |
CurrentChunk->read += fread(temp_Info,sizeof(MyRecoTrackInfo),1,pFile) * sizeof(MyRecoTrackInfo); |
108 |
> |
MyRecoTrackCollection[MyRecoTrackCollection.size()-1]->Info = temp_Info; |
109 |
> |
}break; |
110 |
> |
|
111 |
> |
case C_RECO_ECALHIT:{ // ECAL Hits |
112 |
|
while(CurrentChunk->read<CurrentChunk->size){ |
113 |
|
MyCaloHit* temp_EcalHit = new MyCaloHit; |
114 |
|
CurrentChunk->read += fread(temp_EcalHit,sizeof(MyCaloHit),1,pFile) * sizeof(MyCaloHit); |
116 |
|
} |
117 |
|
}break; |
118 |
|
|
119 |
< |
case C_RECO_HCALHIT:{ // RecHits |
119 |
> |
case C_RECO_HCALHIT:{ // HCAL Hits |
120 |
|
while(CurrentChunk->read<CurrentChunk->size){ |
121 |
|
MyCaloHit* temp_HcalHit = new MyCaloHit; |
122 |
|
CurrentChunk->read += fread(temp_HcalHit,sizeof(MyCaloHit),1,pFile) * sizeof(MyCaloHit); |
314 |
|
data_buffer = (void*)((unsigned long)data_buffer + sizeof(MyRecoHit)); |
315 |
|
} |
316 |
|
ParentChunk->daughters.push_back(CurrentChunk); |
317 |
+ |
|
318 |
+ |
if(((MyRecoTrack*)ParentChunk->buffer)->Info!=NULL){ |
319 |
+ |
CurrentChunk = new stChunkToSave; |
320 |
+ |
CurrentChunk->type = C_RECO_TRACKINFO; |
321 |
+ |
CurrentChunk->size = 6 + sizeof(MyRecoTrackInfo); |
322 |
+ |
data_buffer = new void*[CurrentChunk->size-6]; |
323 |
+ |
CurrentChunk->data = data_buffer; |
324 |
+ |
memcpy( data_buffer, ((MyRecoTrack*)ParentChunk->buffer)->Info, sizeof(MyRecoTrackInfo) ); |
325 |
+ |
ParentChunk->daughters.push_back(CurrentChunk); |
326 |
+ |
} |
327 |
|
} |
328 |
|
break; |
329 |
|
|
420 |
|
FILE* f = fopen(path,"rb" ); |
421 |
|
if(f==NULL){ |
422 |
|
printf("The file %s can not be open !\n",path); |
423 |
< |
return; |
423 |
> |
exit(0); |
424 |
|
} |
425 |
|
|
426 |
|
stChunk* PrimaryChunk = new stChunk; |