Changeset 17657
- Timestamp:
- 04/06/14 13:53:38 (11 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DataWriteFits.cc
r17329 r17657 188 188 } 189 189 190 // This is a workaround for the missing information in the event builder 191 fTstart[0] = 0; 192 fTstop[0] = 0; 190 fTstart[0] = h.RunTime; 191 fTstart[1] = h.RunUsec; 192 193 fTstop[0] = 0; 194 fTstop[1] = 0; 193 195 194 196 fTriggerCounter.fill(0); … … 208 210 return false; 209 211 210 fTriggerCounter = evt.runCtrl->triggerCounter; 212 // Remember the counter of the last written event 213 fTriggerCounter = evt.triggerCounter; 214 215 // Remember the time of the last event 216 fTstop[0] = evt.time.tv_sec; 217 fTstop[1] = evt.time.tv_usec; 211 218 212 219 const EVENT &e = *evt.fEvent; 213 214 memcpy(fTstop, &e.PCTime, 2*sizeof(uint32_t));215 if (fTstart[0]==0)216 memcpy(fTstart, fTstop, 2*sizeof(uint32_t));217 220 218 221 const int realRoiTM = (e.RoiTM > e.Roi) ? e.Roi : 0; … … 258 261 "Time when last event received"); 259 262 260 fFile.WriteKey("NTRG", fTriggerCounter[0], "N umber of physics triggers written");261 fFile.WriteKey("NTRGPED", fTriggerCounter[1], "N umber of pure pedestal triggers written");262 fFile.WriteKey("NTRGLPE", fTriggerCounter[2], "N umber of external light pulser triggers written");263 fFile.WriteKey("NTRGTIM", fTriggerCounter[3], "N umber of time calibration triggers written");264 fFile.WriteKey("NTRGLPI", fTriggerCounter[4], "N umber of internal light pulser triggers written");265 fFile.WriteKey("NTRGEXT1", fTriggerCounter[5], "N umber of triggers from ext1 written");266 fFile.WriteKey("NTRGEXT2", fTriggerCounter[6], "N umber of triggers from ext2 written");267 fFile.WriteKey("NTRGMISC", fTriggerCounter[7], "N umber of triggers belonging to no other category written");263 fFile.WriteKey("NTRG", fTriggerCounter[0], "No of physics triggered events"); 264 fFile.WriteKey("NTRGPED", fTriggerCounter[1], "No of pure pedestal triggered events"); 265 fFile.WriteKey("NTRGLPE", fTriggerCounter[2], "No of external light pulser triggered events"); 266 fFile.WriteKey("NTRGTIM", fTriggerCounter[3], "No of time calibration triggered events"); 267 fFile.WriteKey("NTRGLPI", fTriggerCounter[4], "No of internal light pulser triggered events"); 268 fFile.WriteKey("NTRGEXT1", fTriggerCounter[5], "No of triggers from ext1 triggered events"); 269 fFile.WriteKey("NTRGEXT2", fTriggerCounter[6], "No of triggers from ext2 triggered events"); 270 fFile.WriteKey("NTRGMISC", fTriggerCounter[7], "No of all other triggered events"); 268 271 } 269 272 catch (const CCfits::FitsException &e) … … 280 283 //! @param rt the pointer to the RUN_TAIL data structure 281 284 // 282 bool DataWriteFits::Close(const EVT_CTRL2 & evt)285 bool DataWriteFits::Close(const EVT_CTRL2 &) 283 286 { 284 287 if (!fFile.IsOpen()) 285 288 return false; 286 289 287 // Just for safety288 fTriggerCounter = evt.triggerCounter;289 290 WriteFooter(); 290 291 -
trunk/FACT++/src/DataWriteFits2.cc
r17329 r17657 249 249 bool DataWriteFits2::WriteEvt(const EVT_CTRL2 &evt) 250 250 { 251 fTriggerCounter = evt.runCtrl->triggerCounter; 252 251 // Remember the counter of the last written event 252 fTriggerCounter = evt.triggerCounter; 253 254 // Remember the time of the last event 253 255 fTstop[0] = evt.time.tv_sec; 254 256 fTstop[1] = evt.time.tv_usec; … … 301 303 "Time when last event received"); 302 304 303 fFile->SetInt("NTRG", fTriggerCounter[0], "No of physics trigger s written");304 fFile->SetInt("NTRGPED", fTriggerCounter[1], "No of pure pedestal trigger s written");305 fFile->SetInt("NTRGLPE", fTriggerCounter[2], "No of external light pulser trigger s written");306 fFile->SetInt("NTRGTIM", fTriggerCounter[3], "No of time calibration trigger s written");307 fFile->SetInt("NTRGLPI", fTriggerCounter[4], "No of internal light pulser trigger s written");308 fFile->SetInt("NTRGEXT1", fTriggerCounter[5], "No of triggers from ext1 written");309 fFile->SetInt("NTRGEXT2", fTriggerCounter[6], "No of triggers from ext2 written");310 fFile->SetInt("NTRGMISC", fTriggerCounter[7], "No of all other trigger s");305 fFile->SetInt("NTRG", fTriggerCounter[0], "No of physics triggered events"); 306 fFile->SetInt("NTRGPED", fTriggerCounter[1], "No of pure pedestal triggered events"); 307 fFile->SetInt("NTRGLPE", fTriggerCounter[2], "No of external light pulser triggered events"); 308 fFile->SetInt("NTRGTIM", fTriggerCounter[3], "No of time calibration triggered events"); 309 fFile->SetInt("NTRGLPI", fTriggerCounter[4], "No of internal light pulser triggered events"); 310 fFile->SetInt("NTRGEXT1", fTriggerCounter[5], "No of triggers from ext1 triggered events"); 311 fFile->SetInt("NTRGEXT2", fTriggerCounter[6], "No of triggers from ext2 triggered events"); 312 fFile->SetInt("NTRGMISC", fTriggerCounter[7], "No of all other triggered events"); 311 313 } 312 314 … … 326 328 try 327 329 { 328 // Just for safety329 fTriggerCounter = evt.triggerCounter;330 331 330 WriteFooter(); 332 331 }
Note:
See TracChangeset
for help on using the changeset viewer.