Changeset 20046 for trunk/FACT++/src/getevent.cc
- Timestamp:
- 03/23/21 11:25:26 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/getevent.cc
r18969 r20046 214 214 } 215 215 216 float energy , impact, phi, theta;216 float energy=0, impact, phi, theta; 217 217 if (isMC) 218 218 { 219 file.SetRefAddress("MMcEvtBasic.fEnergy", energy); 220 file.SetRefAddress("MMcEvtBasic.fImpact", impact); 221 file.SetRefAddress("MMcEvtBasic.fTelescopeTheta", theta); 222 file.SetRefAddress("MMcEvtBasic.fTelescopePhi", phi); 219 try 220 { 221 file.SetRefAddress("MMcEvtBasic.fEnergy", energy); 222 file.SetRefAddress("MMcEvtBasic.fImpact", impact); 223 file.SetRefAddress("MMcEvtBasic.fTelescopeTheta", theta); 224 file.SetRefAddress("MMcEvtBasic.fTelescopePhi", phi); 225 } 226 catch (const std::runtime_error &) 227 { 228 } 223 229 } 224 230 … … 253 259 cout.write((char*)data.data(), sizeof(int16_t)*nRoi*nPix); 254 260 261 if (energy!=0) 262 { 263 cout.write((char*)&energy, sizeof(float)); 264 cout.write((char*)&impact, sizeof(float)); 265 cout.write((char*)&phi, sizeof(float)); 266 cout.write((char*)&theta, sizeof(float)); 267 } 268 255 269 return 0; 256 270 }
Note:
See TracChangeset
for help on using the changeset viewer.